From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 3/4] of: partitions: make macro name more generic
Date: Fri, 7 Dec 2018 07:34:35 +0100 [thread overview]
Message-ID: <20181207063433.7623-3-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20181207063433.7623-1-a.fatoum@pengutronix.de>
DEVFS_PARTITION_FROM_TABLE's only effect at the moment is to disable
device tree fixups. Rename it accordingly, so it looks less out-of-place
when using it in the next commit to implement the no-fixup property.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
common/partitions.c | 2 +-
drivers/of/partition.c | 4 ++--
include/driver.h | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/common/partitions.c b/common/partitions.c
index 574b31fbbe9b..cb4e0c8c133e 100644
--- a/common/partitions.c
+++ b/common/partitions.c
@@ -63,7 +63,7 @@ static int register_one_partition(struct block_device *blk,
goto out;
}
- cdev->flags |= DEVFS_PARTITION_FROM_TABLE;
+ cdev->flags |= DEVFS_PARTITION_NO_FIXUP;
cdev->dos_partition_type = part->dos_partition_type;
strcpy(cdev->partuuid, part->partuuid);
diff --git a/drivers/of/partition.c b/drivers/of/partition.c
index 257100112108..450dda17dfd7 100644
--- a/drivers/of/partition.c
+++ b/drivers/of/partition.c
@@ -141,7 +141,7 @@ static int of_partition_fixup(struct device_node *root, void *ctx)
return -EINVAL;
list_for_each_entry(partcdev, &cdev->partitions, partition_entry) {
- if (partcdev->flags & DEVFS_PARTITION_FROM_TABLE)
+ if (partcdev->flags & DEVFS_PARTITION_NO_FIXUP)
continue;
n_parts++;
}
@@ -201,7 +201,7 @@ static int of_partition_fixup(struct device_node *root, void *ctx)
u8 tmp[16 * 16]; /* Up to 64-bit address + 64-bit size */
loff_t partoffset;
- if (partcdev->flags & DEVFS_PARTITION_FROM_TABLE)
+ if (partcdev->flags & DEVFS_PARTITION_NO_FIXUP)
continue;
if (partcdev->mtd)
diff --git a/include/driver.h b/include/driver.h
index d509031f4980..ba2dc209c239 100644
--- a/include/driver.h
+++ b/include/driver.h
@@ -490,7 +490,7 @@ int cdev_erase(struct cdev *cdev, loff_t count, loff_t offset);
#define DEVFS_PARTITION_FIXED (1U << 0)
#define DEVFS_PARTITION_READONLY (1U << 1)
#define DEVFS_IS_CHARACTER_DEV (1U << 3)
-#define DEVFS_PARTITION_FROM_TABLE (1U << 4)
+#define DEVFS_PARTITION_NO_FIXUP (1U << 4)
struct cdev *devfs_add_partition(const char *devname, loff_t offset,
loff_t size, unsigned int flags, const char *name);
--
2.19.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2018-12-07 6:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-07 6:34 [PATCH 1/4] driver: left shift 1U instead of 1 in bitmask for consistency Ahmad Fatoum
2018-12-07 6:34 ` [PATCH 2/4] of: partition: use NULL instead of never-read argument Ahmad Fatoum
2018-12-07 6:34 ` Ahmad Fatoum [this message]
2018-12-07 6:34 ` [PATCH 4/4] of: partition: add no-fixup device tree property Ahmad Fatoum
2018-12-07 7:43 ` Sascha Hauer
2018-12-07 8:38 ` Ahmad Fatoum
2018-12-10 8:39 ` Sascha Hauer
2018-12-14 15:31 ` Ahmad Fatoum
2019-05-23 15:43 ` Ahmad Fatoum
2019-05-24 6:31 ` 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=20181207063433.7623-3-a.fatoum@pengutronix.de \
--to=a.fatoum@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