From patchwork Mon Dec 1 17:41:03 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Catalin Marinas X-Patchwork-Id: 11638 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D1851DDD0B for ; Tue, 2 Dec 2008 04:42:30 +1100 (EST) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.68 #1 (Red Hat Linux)) id 1L7Cle-0000CU-8P; Mon, 01 Dec 2008 17:41:06 +0000 Received: from cam-admin0.cambridge.arm.com ([193.131.176.58]) by bombadil.infradead.org with esmtp (Exim 4.68 #1 (Red Hat Linux)) id 1L7Clc-000083-Ie; Mon, 01 Dec 2008 17:41:05 +0000 Received: from cam-owa2.Emea.Arm.com (cam-owa2.emea.arm.com [10.1.105.18]) by cam-admin0.cambridge.arm.com (8.12.6/8.12.6) with ESMTP id mB1Hf3x2018962; Mon, 1 Dec 2008 17:41:03 GMT Received: from pc1117.cambridge.arm.com ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 1 Dec 2008 17:41:03 +0000 Subject: [PATCH] mtd: Make the third arg of mtd_concat_create() const To: linux-mtd@lists.infradead.org From: Catalin Marinas Date: Mon, 01 Dec 2008 17:41:03 +0000 Message-ID: <20081201174103.2319.36325.stgit@pc1117.cambridge.arm.com> User-Agent: StGit/0.14.3.290.gd2cf MIME-Version: 1.0 X-OriginalArrivalTime: 01 Dec 2008 17:41:03.0532 (UTC) FILETIME=[FB450EC0:01C953DB] X-Spam-Score: -4.0 (----) X-Spam-Report: SpamAssassin version 3.2.5 on bombadil.infradead.org summary: Content analysis details: (-4.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -4.0 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [193.131.176.58 listed in list.dnswl.org] Cc: David Woodhouse X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org The "name" argument of mtd_concat_create() is used to set the concat->mtd.name pointer which is already "const char *". Setting the argument type to "const char *" avoids the warning from drivers passing a "const char *" pointer (like the one returned by dev_name). Signed-off-by: Catalin Marinas Cc: David Woodhouse --- drivers/mtd/mtdconcat.c | 2 +- include/linux/mtd/concat.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/mtdconcat.c b/drivers/mtd/mtdconcat.c index 789842d..1a05cf3 100644 --- a/drivers/mtd/mtdconcat.c +++ b/drivers/mtd/mtdconcat.c @@ -691,7 +691,7 @@ static int concat_block_markbad(struct mtd_info *mtd, loff_t ofs) */ struct mtd_info *mtd_concat_create(struct mtd_info *subdev[], /* subdevices to concatenate */ int num_devs, /* number of subdevices */ - char *name) + const char *name) { /* name for the new device */ int i; size_t size; diff --git a/include/linux/mtd/concat.h b/include/linux/mtd/concat.h index c02f3d2..e80c674 100644 --- a/include/linux/mtd/concat.h +++ b/include/linux/mtd/concat.h @@ -13,7 +13,7 @@ struct mtd_info *mtd_concat_create( struct mtd_info *subdev[], /* subdevices to concatenate */ int num_devs, /* number of subdevices */ - char *name); /* name for the new device */ + const char *name); /* name for the new device */ void mtd_concat_destroy(struct mtd_info *mtd);