From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Marco Felsch <m.felsch@pengutronix.de>, barebox@lists.infradead.org
Subject: Re: [PATCH 1/3] driver: add flag to check if cdev is an mci device
Date: Thu, 6 May 2021 13:59:07 +0200 [thread overview]
Message-ID: <c15d0311-c878-29be-2d64-e68ca7535131@pengutronix.de> (raw)
In-Reply-To: <20210506112219.27114-1-m.felsch@pengutronix.de>
On 06.05.21 13:22, Marco Felsch wrote:
> We need this during mount() to check if the cdev is an mmc/mci device.
> Later on we add the feature to pass "root=/dev/mmcblk*" as kernel
> command line.
>
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> ---
> include/driver.h | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/include/driver.h b/include/driver.h
> index 0d43b36148..d381aaf78d 100644
> --- a/include/driver.h
> +++ b/include/driver.h
> @@ -496,6 +496,7 @@ int cdev_erase(struct cdev *cdev, loff_t count, loff_t offset);
> #define DEVFS_PARTITION_READONLY (1U << 1)
> #define DEVFS_IS_CHARACTER_DEV (1U << 3)
> #define DEVFS_PARTITION_FROM_TABLE (1U << 4)
> +#define DEVFS_IS_MCI_DEV (1U << 5)
>
> struct cdev *devfs_add_partition(const char *devname, loff_t offset,
> loff_t size, unsigned int flags, const char *name);
> @@ -509,6 +510,11 @@ static inline void cdev_create_default_automount(struct cdev *cdev)
> }
> #endif
>
> +static inline bool cdev_is_mci_dev(struct cdev *cdev)
> +{
> + return !!(cdev->flags & DEVFS_IS_MCI_DEV);
> +}
Nitpick: cast to bool makes !! superfluous.
Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> +
> #define DEVFS_PARTITION_APPEND 0
>
> /**
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2021-05-06 12:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-06 11:22 Marco Felsch
2021-05-06 11:22 ` [PATCH 2/3] mci: mci-core: set the DEVFS_IS_MCI_DEV flag Marco Felsch
2021-05-06 12:06 ` Ahmad Fatoum
2021-05-06 13:07 ` Marco Felsch
2021-05-06 13:10 ` Ahmad Fatoum
2021-05-06 11:22 ` [PATCH 3/3] fs: add linux_rootarg 'root=mmcblkXpN' support Marco Felsch
2021-05-06 12:19 ` Ahmad Fatoum
2021-05-06 13:30 ` Marco Felsch
2021-05-06 11:59 ` Ahmad Fatoum [this message]
2021-05-06 13:08 ` [PATCH 1/3] driver: add flag to check if cdev is an mci device Marco Felsch
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=c15d0311-c878-29be-2d64-e68ca7535131@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=m.felsch@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