mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 1/4] bbu: reserve upper 16 bits for handler specific flags
Date: Mon,  2 Jul 2018 06:41:05 +0200	[thread overview]
Message-ID: <20180702044108.11466-2-s.hauer@pengutronix.de> (raw)
In-Reply-To: <20180702044108.11466-1-s.hauer@pengutronix.de>

Let the handler store 16 bit of handler specific flags in
the generic handler struct. The setup functions of some
bbu handlers let the user specify a flags field. With this
change they can now pass generic and handler specific flags
in a single variable without having to use a second parameter.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 include/bbu.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/bbu.h b/include/bbu.h
index def568e498..d1ab9f5638 100644
--- a/include/bbu.h
+++ b/include/bbu.h
@@ -25,6 +25,10 @@ struct bbu_handler {
 	struct list_head list;
 #define BBU_HANDLER_FLAG_DEFAULT	(1 << 0)
 #define BBU_HANDLER_CAN_REFRESH		(1 << 1)
+	/*
+	 * The lower 16bit are generic flags, the upper 16bit are reserved
+	 * for handler specific flags.
+	 */
 	unsigned long flags;
 
 	/* default device file, can be overwritten on the command line */
-- 
2.17.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2018-07-02  4:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-02  4:41 [PATCH v2 0/4] bbu: i.MX: Generalize IMX_INTERNAL_FLAG_KEEP_DOSPART flag Sascha Hauer
2018-07-02  4:41 ` Sascha Hauer [this message]
2018-07-02  4:41 ` [PATCH 2/4] ARM: i.MX: bbu: remove handler specific flags variable Sascha Hauer
2018-07-02  4:41 ` [PATCH 3/4] ARM: i.MX: bbu: reimplement IMX_INTERNAL_FLAG_KEEP_DOSPART flag Sascha Hauer
2018-07-02  4:41 ` [PATCH 4/4] ARM: i.MX: bbu: support partitions starting at i.MX header Sascha Hauer

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=20180702044108.11466-2-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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