From: Peter Rosin <peda@axentia.se>
To: Sascha Hauer <s.hauer@pengutronix.de>, Ahmad Fatoum <ahmad@a3f.at>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 1/4] common.h: reintroduce region_overlap() as, old_region_overlap()
Date: Sat, 18 Sep 2021 00:39:01 +0200 [thread overview]
Message-ID: <3b36e00c-84fb-800a-5128-cb38f2be0868@axentia.se> (raw)
In-Reply-To: <781e128b-14f3-3577-e433-f6a13fff8159@axentia.se>
The region_overlap() function was removed as unused by patch
81ca755487 ("common.h: remove unused region_overlap()")
but only because the last user was prematurely removed by patch
070de908da ("ARM: remove PBL_FORCE_PIGGYDATA_COPY")
A clean reverts is not appropriate, as the previous name of
the function has been repurposed by patch
04e2aa516e ("common.h: move and rename lregion_overlap()")
Signed-off-by: Peter Rosin <peda@axentia.se>
---
include/common.h | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/include/common.h b/include/common.h
index 693f5bf97029..10cf5f732cbf 100644
--- a/include/common.h
+++ b/include/common.h
@@ -137,4 +137,18 @@ const char *barebox_get_hostname(void);
void barebox_set_hostname(const char *);
void barebox_set_hostname_no_overwrite(const char *);
+/*
+ * Check if two regions overlap. returns true if they do, false otherwise
+ */
+
+static inline bool old_region_overlap(unsigned long starta, unsigned long lena,
+ unsigned long startb, unsigned long lenb)
+{
+ if (starta + lena <= startb)
+ return 0;
+ if (startb + lenb <= starta)
+ return 0;
+ return 1;
+}
+
#endif /* __COMMON_H_ */
--
2.20.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2021-09-17 22:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-17 22:37 at91 sama5d3 "regressions" Peter Rosin
2021-09-17 22:39 ` Peter Rosin [this message]
2021-09-17 22:39 ` [PATCH 2/4] ARM: copy data if there is a region overlap Peter Rosin
2021-09-17 22:40 ` [PATCH 3/4] Revert "ARM: mmu: use client domain permissions to support ARMv7 eXecute Never" Peter Rosin
2021-09-19 7:06 ` Rouven Czerwinski
2021-09-19 7:50 ` Peter Rosin
2021-09-19 20:33 ` Peter Rosin
2021-09-20 9:14 ` Ahmad Fatoum
2021-09-20 10:22 ` Peter Rosin
2021-09-17 22:41 ` [PATCH 4/4] lds: the RO_DATA_SECTION macro does not work on my SAMA5D3 board Peter Rosin
2021-09-17 23:57 ` at91 sama5d3 "regressions" Peter Rosin
2021-09-19 6:32 ` Peter Rosin
2021-09-22 7:06 ` Ahmad Fatoum
2021-09-22 7:41 ` Peter Rosin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3b36e00c-84fb-800a-5128-cb38f2be0868@axentia.se \
--to=peda@axentia.se \
--cc=ahmad@a3f.at \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox