* [PATCH] cmd line partitions: use 64 bit variables to detect partitions/offsets larger than 4G.
@ 2010-09-05 11:23 Saeed Bishara
2010-09-05 13:08 ` [PATCH v2] " Saeed Bishara
0 siblings, 1 reply; 5+ messages in thread
From: Saeed Bishara @ 2010-09-05 11:23 UTC (permalink / raw)
To: linux-mtd; +Cc: Saeed Bishara
Signed-off-by: Saeed Bishara <saeed@marvell.com>
---
drivers/mtd/cmdlinepart.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/mtd/cmdlinepart.c b/drivers/mtd/cmdlinepart.c
index 1479da6..ae56c23 100644
--- a/drivers/mtd/cmdlinepart.c
+++ b/drivers/mtd/cmdlinepart.c
@@ -41,8 +41,8 @@
/* special size referring to all the remaining space in a partition */
-#define SIZE_REMAINING UINT_MAX
-#define OFFSET_CONTINUOUS UINT_MAX
+#define SIZE_REMAINING LLONG_MAX
+#define OFFSET_CONTINUOUS LLONG_MAX
struct cmdline_mtd_partition {
struct cmdline_mtd_partition *next;
@@ -74,8 +74,8 @@ static struct mtd_partition * newpart(char *s,
int extra_mem_size)
{
struct mtd_partition *parts;
- unsigned long size;
- unsigned long offset = OFFSET_CONTINUOUS;
+ unsigned long long size;
+ unsigned long long offset = OFFSET_CONTINUOUS;
char *name;
int name_len;
unsigned char *extra_mem;
@@ -93,7 +93,7 @@ static struct mtd_partition * newpart(char *s,
size = memparse(s, &s);
if (size < PAGE_SIZE)
{
- printk(KERN_ERR ERRP "partition size too small (%lx)\n", size);
+ printk(KERN_ERR ERRP "partition size too small (%llx)\n", size);
return NULL;
}
}
--
1.6.0.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] cmd line partitions: use 64 bit variables to detect partitions/offsets larger than 4G.
2010-09-05 11:23 [PATCH] cmd line partitions: use 64 bit variables to detect partitions/offsets larger than 4G Saeed Bishara
@ 2010-09-05 13:08 ` Saeed Bishara
2010-09-07 8:56 ` Artem Bityutskiy
0 siblings, 1 reply; 5+ messages in thread
From: Saeed Bishara @ 2010-09-05 13:08 UTC (permalink / raw)
To: linux-mtd; +Cc: Saeed Bishara
diff --git a/drivers/mtd/cmdlinepart.c b/drivers/mtd/cmdlinepart.c
index 1479da6..80036d1 100644
--- a/drivers/mtd/cmdlinepart.c
+++ b/drivers/mtd/cmdlinepart.c
@@ -41,8 +41,8 @@
/* special size referring to all the remaining space in a partition */
-#define SIZE_REMAINING UINT_MAX
-#define OFFSET_CONTINUOUS UINT_MAX
+#define SIZE_REMAINING LLONG_MAX
+#define OFFSET_CONTINUOUS LLONG_MAX
struct cmdline_mtd_partition {
struct cmdline_mtd_partition *next;
@@ -74,8 +74,8 @@ static struct mtd_partition * newpart(char *s,
int extra_mem_size)
{
struct mtd_partition *parts;
- unsigned long size;
- unsigned long offset = OFFSET_CONTINUOUS;
+ unsigned long long size;
+ unsigned long long offset = OFFSET_CONTINUOUS;
char *name;
int name_len;
unsigned char *extra_mem;
@@ -93,7 +93,7 @@ static struct mtd_partition * newpart(char *s,
size = memparse(s, &s);
if (size < PAGE_SIZE)
{
- printk(KERN_ERR ERRP "partition size too small (%lx)\n", size);
+ printk(KERN_ERR ERRP "partition size too small (%llx)\n", size);
return NULL;
}
}
@@ -304,7 +304,7 @@ static int parse_cmdline_partitions(struct mtd_info *master,
struct mtd_partition **pparts,
unsigned long origin)
{
- unsigned long offset;
+ unsigned long long offset;
int i;
struct cmdline_mtd_partition *part;
const char *mtd_id = master->name;
--
1.6.0.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] cmd line partitions: use 64 bit variables to detect partitions/offsets larger than 4G.
2010-09-05 13:08 ` [PATCH v2] " Saeed Bishara
@ 2010-09-07 8:56 ` Artem Bityutskiy
2010-09-07 9:48 ` [PATCH] " Saeed Bishara
0 siblings, 1 reply; 5+ messages in thread
From: Artem Bityutskiy @ 2010-09-07 8:56 UTC (permalink / raw)
To: Saeed Bishara; +Cc: linux-mtd
On Sun, 2010-09-05 at 16:08 +0300, Saeed Bishara wrote:
> diff --git a/drivers/mtd/cmdlinepart.c b/drivers/mtd/cmdlinepart.c
> index 1479da6..80036d1 100644
> --- a/drivers/mtd/cmdlinepart.c
> +++ b/drivers/mtd/cmdlinepart.c
> @@ -41,8 +41,8 @@
Please, send with Signed-off-by.
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] cmd line partitions: use 64 bit variables to detect partitions/offsets larger than 4G.
2010-09-07 8:56 ` Artem Bityutskiy
@ 2010-09-07 9:48 ` Saeed Bishara
2010-09-08 8:31 ` Artem Bityutskiy
0 siblings, 1 reply; 5+ messages in thread
From: Saeed Bishara @ 2010-09-07 9:48 UTC (permalink / raw)
To: linux-mtd; +Cc: Saeed Bishara
Signed-off-by: Saeed Bishara <saeed@marvell.com>
---
drivers/mtd/cmdlinepart.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/mtd/cmdlinepart.c b/drivers/mtd/cmdlinepart.c
index 1479da6..80036d1 100644
--- a/drivers/mtd/cmdlinepart.c
+++ b/drivers/mtd/cmdlinepart.c
@@ -41,8 +41,8 @@
/* special size referring to all the remaining space in a partition */
-#define SIZE_REMAINING UINT_MAX
-#define OFFSET_CONTINUOUS UINT_MAX
+#define SIZE_REMAINING LLONG_MAX
+#define OFFSET_CONTINUOUS LLONG_MAX
struct cmdline_mtd_partition {
struct cmdline_mtd_partition *next;
@@ -74,8 +74,8 @@ static struct mtd_partition * newpart(char *s,
int extra_mem_size)
{
struct mtd_partition *parts;
- unsigned long size;
- unsigned long offset = OFFSET_CONTINUOUS;
+ unsigned long long size;
+ unsigned long long offset = OFFSET_CONTINUOUS;
char *name;
int name_len;
unsigned char *extra_mem;
@@ -93,7 +93,7 @@ static struct mtd_partition * newpart(char *s,
size = memparse(s, &s);
if (size < PAGE_SIZE)
{
- printk(KERN_ERR ERRP "partition size too small (%lx)\n", size);
+ printk(KERN_ERR ERRP "partition size too small (%llx)\n", size);
return NULL;
}
}
@@ -304,7 +304,7 @@ static int parse_cmdline_partitions(struct mtd_info *master,
struct mtd_partition **pparts,
unsigned long origin)
{
- unsigned long offset;
+ unsigned long long offset;
int i;
struct cmdline_mtd_partition *part;
const char *mtd_id = master->name;
--
1.6.0.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] cmd line partitions: use 64 bit variables to detect partitions/offsets larger than 4G.
2010-09-07 9:48 ` [PATCH] " Saeed Bishara
@ 2010-09-08 8:31 ` Artem Bityutskiy
0 siblings, 0 replies; 5+ messages in thread
From: Artem Bityutskiy @ 2010-09-08 8:31 UTC (permalink / raw)
To: Saeed Bishara; +Cc: linux-mtd
On Tue, 2010-09-07 at 12:48 +0300, Saeed Bishara wrote:
> Signed-off-by: Saeed Bishara <saeed@marvell.com>
> ---
> drivers/mtd/cmdlinepart.c | 12 ++++++------
> 1 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/mtd/cmdlinepart.c b/drivers/mtd/cmdlinepart.c
> index 1479da6..80036d1 100644
> --- a/drivers/mtd/cmdlinepart.c
> +++ b/drivers/mtd/cmdlinepart.c
> @@ -41,8 +41,8 @@
>
>
> /* special size referring to all the remaining space in a partition */
> -#define SIZE_REMAINING UINT_MAX
> -#define OFFSET_CONTINUOUS UINT_MAX
> +#define SIZE_REMAINING LLONG_MAX
> +#define OFFSET_CONTINUOUS LLONG_MAX
Should be ULLONG_MAX since you use unsigned long long and also offsets
in 'struct mtd_partition' uses uint64_t.
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-09-08 8:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-05 11:23 [PATCH] cmd line partitions: use 64 bit variables to detect partitions/offsets larger than 4G Saeed Bishara
2010-09-05 13:08 ` [PATCH v2] " Saeed Bishara
2010-09-07 8:56 ` Artem Bityutskiy
2010-09-07 9:48 ` [PATCH] " Saeed Bishara
2010-09-08 8:31 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).