mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH v2 02/10] devfs_add_partition: make flags parameter unsigned
Date: Thu, 27 Feb 2014 21:39:02 +0100	[thread overview]
Message-ID: <1393533550-1865-3-git-send-email-u.kleine-koenig@pengutronix.de> (raw)
In-Reply-To: <1393533550-1865-1-git-send-email-u.kleine-koenig@pengutronix.de>

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@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


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

  parent reply	other threads:[~2014-02-27 20:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-27 20:39 [PATCH v2 00/10] new partitioning helper Uwe Kleine-König
2014-02-27 20:39 ` [PATCH v2 01/10] devfs: partitioning: add missing free in error path Uwe Kleine-König
2014-02-27 20:39 ` Uwe Kleine-König [this message]
2014-02-27 20:39 ` [PATCH v2 03/10] Documentation: fix example call to devfs_add_partition Uwe Kleine-König
2014-02-27 20:39 ` [PATCH v2 04/10] mtd/nand: constify filename parameter Uwe Kleine-König
2014-02-27 20:39 ` [PATCH v2 05/10] devfs: partitioning: add new helper devfs_create_partitions Uwe Kleine-König
2014-02-27 20:39 ` [PATCH v2 06/10] ARM: a9m2410: convert to devfs_create_partitions Uwe Kleine-König
2014-02-27 20:41   ` Sebastian Hesselbarth
2014-02-27 20:39 ` [PATCH v2 07/10] ARM: freescale-mx35-3-stack: " Uwe Kleine-König
2014-02-27 20:39 ` [PATCH v2 08/10] ARM: pca100: " Uwe Kleine-König
2014-02-27 20:39 ` [PATCH v2 09/10] ARM: pcm038: " Uwe Kleine-König
2014-02-27 20:39 ` [PATCH v2 10/10] ARM: sama5d3xek: " Uwe Kleine-König
2014-02-28  7:25 ` [PATCH v2 00/10] new partitioning helper Sascha Hauer
2014-02-28  7:45   ` Sascha Hauer
2014-02-28 14:09     ` Uwe Kleine-König

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=1393533550-1865-3-git-send-email-u.kleine-koenig@pengutronix.de \
    --to=u.kleine-koenig@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