diff mbox

[U-Boot,RFC,v3,2/4] mtd: fix compiler warnings

Message ID 1457822887-32123-2-git-send-email-srae@broadcom.com
State RFC
Headers show

Commit Message

Steve Rae March 12, 2016, 10:48 p.m. UTC
- add missing declaration
- update debug output format specifiers

Signed-off-by: Steve Rae <srae@broadcom.com>
---
the checkpatch warning:
  warning: cmd/mtdparts.c,1494: quoted string split across lines
is for the existing code; it is not introduced with this change...

Changes in v3: None
Changes in v2: None

 cmd/mtdparts.c          | 4 ++--
 include/linux/mtd/mtd.h | 8 ++++++++
 2 files changed, 10 insertions(+), 2 deletions(-)

Comments

Crystal Wood June 29, 2016, 1:17 a.m. UTC | #1
On Sat, 2016-03-12 at 14:48 -0800, Steve Rae wrote:
> - add missing declaration
> - update debug output format specifiers
> 
> Signed-off-by: Steve Rae <srae@broadcom.com>
> ---
> the checkpatch warning:
>   warning: cmd/mtdparts.c,1494: quoted string split across lines
> is for the existing code; it is not introduced with this change...
> 
> Changes in v3: None
> Changes in v2: None

Why is this an RFC patch?  It seems like an attempt to fix straightforward
problems, unrelated to the iproc driver.	

>  
> diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
> index 9da77ec..9c36f02 100644
> --- a/include/linux/mtd/mtd.h
> +++ b/include/linux/mtd/mtd.h
> @@ -495,5 +495,13 @@ int mtd_arg_off(const char *arg, int *idx, loff_t *off,
> loff_t *size,
>  int mtd_arg_off_size(int argc, char *const argv[], int *idx, loff_t *off,
>  		     loff_t *size, loff_t *maxsize, int devtype,
>  		     uint64_t chipsize);
> +
> +#ifdef CONFIG_CMD_MTDPARTS_SPREAD
> +/* drivers/mtd/mtdcore.c */
> +void mtd_get_len_incl_bad(struct mtd_info *mtd, uint64_t offset,
> +			  const uint64_t length, uint64_t *len_incl_bad,
> +			  int *truncated);
> +#endif /* CONFIG_CMD_MTDPARTS_SPREAD */

Don't ifdef prototypes.

-Scott
Steve Rae June 29, 2016, 8:47 p.m. UTC | #2
Hi Scott,

On Tue, Jun 28, 2016 at 6:17 PM, Scott Wood <oss@buserror.net> wrote:
> On Sat, 2016-03-12 at 14:48 -0800, Steve Rae wrote:
>> - add missing declaration
>> - update debug output format specifiers
>>
>> Signed-off-by: Steve Rae <srae@broadcom.com>
>> ---
>> the checkpatch warning:
>>   warning: cmd/mtdparts.c,1494: quoted string split across lines
>> is for the existing code; it is not introduced with this change...
>>
>> Changes in v3: None
>> Changes in v2: None
>
> Why is this an RFC patch?  It seems like an attempt to fix straightforward
> problems, unrelated to the iproc driver.
>
True - I'll pull it out of this series and send a new patch.

>>
>> diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
>> index 9da77ec..9c36f02 100644
>> --- a/include/linux/mtd/mtd.h
>> +++ b/include/linux/mtd/mtd.h
>> @@ -495,5 +495,13 @@ int mtd_arg_off(const char *arg, int *idx, loff_t *off,
>> loff_t *size,
>>  int mtd_arg_off_size(int argc, char *const argv[], int *idx, loff_t *off,
>>                    loff_t *size, loff_t *maxsize, int devtype,
>>                    uint64_t chipsize);
>> +
>> +#ifdef CONFIG_CMD_MTDPARTS_SPREAD
>> +/* drivers/mtd/mtdcore.c */
>> +void mtd_get_len_incl_bad(struct mtd_info *mtd, uint64_t offset,
>> +                       const uint64_t length, uint64_t *len_incl_bad,
>> +                       int *truncated);
>> +#endif /* CONFIG_CMD_MTDPARTS_SPREAD */
>
> Don't ifdef prototypes.
OK - thanks
>
> -Scott
>
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
diff mbox

Patch

diff --git a/cmd/mtdparts.c b/cmd/mtdparts.c
index 86a4689..579eff1 100644
--- a/cmd/mtdparts.c
+++ b/cmd/mtdparts.c
@@ -1491,7 +1491,7 @@  static int spread_partitions(void)
 			part = list_entry(pentry, struct part_info, link);
 
 			debug("spread_partitions: device = %s%d, partition %d ="
-				" (%s) 0x%08x@0x%08x\n",
+				" (%s) 0x%08llx@0x%08llx\n",
 				MTD_DEV_TYPE(dev->id->type), dev->id->num,
 				part_num, part->name, part->size,
 				part->offset);
@@ -2009,7 +2009,7 @@  static int do_mtdparts(cmd_tbl_t *cmdtp, int flag, int argc,
 
 		if (!strcmp(&argv[1][3], ".spread")) {
 			spread_partition(mtd, p, &next_offset);
-			debug("increased %s to %d bytes\n", p->name, p->size);
+			debug("increased %s to %llu bytes\n", p->name, p->size);
 		}
 #endif
 
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index 9da77ec..9c36f02 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -495,5 +495,13 @@  int mtd_arg_off(const char *arg, int *idx, loff_t *off, loff_t *size,
 int mtd_arg_off_size(int argc, char *const argv[], int *idx, loff_t *off,
 		     loff_t *size, loff_t *maxsize, int devtype,
 		     uint64_t chipsize);
+
+#ifdef CONFIG_CMD_MTDPARTS_SPREAD
+/* drivers/mtd/mtdcore.c */
+void mtd_get_len_incl_bad(struct mtd_info *mtd, uint64_t offset,
+			  const uint64_t length, uint64_t *len_incl_bad,
+			  int *truncated);
+#endif /* CONFIG_CMD_MTDPARTS_SPREAD */
+
 #endif
 #endif /* __MTD_MTD_H__ */