From patchwork Sat Mar 12 00:52:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Rae X-Patchwork-Id: 596556 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 4C96D140297 for ; Sat, 12 Mar 2016 12:04:33 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 71DD8A771D; Sat, 12 Mar 2016 02:04:21 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id t_A4stzs5UQ5; Sat, 12 Mar 2016 02:04:21 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D1F8AA76DA; Sat, 12 Mar 2016 02:04:20 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BA4C0A76DA for ; Sat, 12 Mar 2016 02:04:18 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id V77acJuV906w for ; Sat, 12 Mar 2016 02:04:18 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-gw3-out.broadcom.com (mail-gw3-out.broadcom.com [216.31.210.64]) by theia.denx.de (Postfix) with ESMTP id 04CA2A76DF for ; Sat, 12 Mar 2016 02:04:13 +0100 (CET) X-IronPort-AV: E=Sophos;i="5.24,322,1455004800"; d="scan'208";a="89876747" Received: from mail-irv-18.broadcom.com ([10.15.198.37]) by mail-gw3-out.broadcom.com with ESMTP; 11 Mar 2016 16:59:32 -0800 Received: from mail-irva-13.broadcom.com (mail-irva-13.broadcom.com [10.11.16.103]) by mail-irv-18.broadcom.com (Postfix) with ESMTP id 4942282026; Fri, 11 Mar 2016 16:53:45 -0800 (PST) Received: from VM-host64-64-A1.ric.broadcom.com (unknown [10.136.4.105]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id 4B1D240FE5; Fri, 11 Mar 2016 16:53:24 -0800 (PST) From: Steve Rae To: u-boot@lists.denx.de, Scott Wood Date: Fri, 11 Mar 2016 16:52:20 -0800 Message-Id: <1457743999-27433-2-git-send-email-srae@broadcom.com> X-Mailer: git-send-email 1.8.5 In-Reply-To: <1457743999-27433-1-git-send-email-srae@broadcom.com> References: <1457743999-27433-1-git-send-email-srae@broadcom.com> Cc: Steve Rae , Tom Rini , Scott Wood , Joe Hershberger , Przemyslaw Marczak , Jiandong Zheng Subject: [U-Boot] [RFC PATCH v2 2/4] mtd: fix compiler warnings X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" - add missing declaration - update debug output format specifiers Signed-off-by: Steve Rae --- 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 v2: None cmd/mtdparts.c | 4 ++-- include/linux/mtd/mtd.h | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) 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__ */