[PATCH 02/10] devfs_add_partition: make flags parameter unsigned
Uwe Kleine-König
u.kleine-koenig at pengutronix.de
Tue Feb 25 17:51:13 EST 2014
The value is only used to assign to a (*struct cdev)->flags which is an
unsigned int and it is passed as fourth parameter of mtd_add_partition which
is an unsigned long.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
---
fs/devfs-core.c | 2 +-
include/driver.h | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/fs/devfs-core.c b/fs/devfs-core.c
index 5a120c64879a..f92a07c43d3e 100644
--- a/fs/devfs-core.c
+++ b/fs/devfs-core.c
@@ -261,7 +261,7 @@ int devfs_remove(struct cdev *cdev)
}
struct cdev *devfs_add_partition(const char *devname, loff_t offset, loff_t size,
- int flags, const char *name)
+ unsigned int flags, const char *name)
{
struct cdev *cdev, *new;
diff --git a/include/driver.h b/include/driver.h
index bbe789b51ead..33b82c3e969b 100644
--- a/include/driver.h
+++ b/include/driver.h
@@ -482,13 +482,13 @@ ssize_t cdev_write(struct cdev *cdev, const void *buf, size_t count, loff_t offs
int cdev_ioctl(struct cdev *cdev, int cmd, void *buf);
int cdev_erase(struct cdev *cdev, size_t count, loff_t offset);
-#define DEVFS_PARTITION_FIXED (1 << 0)
-#define DEVFS_PARTITION_READONLY (1 << 1)
+#define DEVFS_PARTITION_FIXED (1U << 0)
+#define DEVFS_PARTITION_READONLY (1U << 1)
#define DEVFS_IS_PARTITION (1 << 2)
#define DEVFS_IS_CHARACTER_DEV (1 << 3)
-struct cdev *devfs_add_partition(const char *devname, loff_t offset, loff_t size,
- int flags, const char *name);
+struct cdev *devfs_add_partition(const char *devname, loff_t offset,
+ loff_t size, unsigned int flags, const char *name);
int devfs_del_partition(const char *name);
#define DRV_OF_COMPAT(compat) \
--
1.8.5.3
More information about the barebox
mailing list