From patchwork Sat Jul 21 19:37:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 947418 X-Patchwork-Delegate: boris.brezillon@free-electrons.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="e+3rcCeH"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="HVmZ84mU"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41XyhD2VvYz9s3N for ; Sun, 22 Jul 2018 05:37:32 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Date:Message-ID:Subject: From:To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=EgyYVlotOnj++cy/2jM+3RAru48rwvaDyA24j6vTlB0=; b=e+3rcCeH+QhTaG UBpo4a2ROsDd4raeRM5ql4zY3TaFpI0fGMR+1TRXZnvOy9I52B5fjib7NzikbrhCoM6vbpFTx+O6V 4L41j4tFi+kXinIyYwAzQ17BEu+aC6EF0gYhAJ8j3jJJN3NBmuZF09SlOrdMZgu64U3jC//Ahm66n SYDk8o2Xew/Ec5Fl8QnrZp4MACJZzjsRkE22G8VRr6FA2ftI7/PJ6QsLGdSyd4hTc3fjcno+7lPPu Miupc/DIb4xIcZgHj8uBc/XgIsXCx9kobSSSksB4ufujwmCtXYGwrxQhwkJjb6OukLImoLlpu1xPI CQvEXbYWsDarRUs7G8lQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fgxgu-0007fV-67; Sat, 21 Jul 2018 19:37:20 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fgxgs-0007f3-8n for linux-mtd@bombadil.infradead.org; Sat, 21 Jul 2018 19:37:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Date:Message-ID:Subject:From:Cc:To:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=pjsKMIzzrsc8pWQM+OFg2ri7Gv/iq0w69NNUuen6s9w=; b=HVmZ84mUoycrWXG2pK3cfoJBTf NzR/Vq94rZWBIJ3verVft0sz7HF/vVYg+29Jntw/FRsBPXRuq9BLsy2u56MP1tHCn1NAEZ5hc9ryd PE4BRfO5x6TuDN7U26gG9tx/JZokFpdIMUsIN459LSIhJQDYBPytGV2YqqI8kv1WX81mX0Gq8wOvB rdsrMk++VvsMF88fb2m02aR62s2A3NZzUyY9SLAORxdCZUPPGumNeSXZCz3VEK3Gvg+tyNb0Eu7gC SKWCiszGa3DhGE2/97oNtPZ/+k4Dz7sgAzuVQ19SSV1IPs1jknpz0MIVozacWnHCBTvADkTBzn2rA zFQPcaoQ==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=dragon.dunlab) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fgxgm-000427-3r; Sat, 21 Jul 2018 19:37:12 +0000 To: LKML , linux-mtd@lists.infradead.org, linux-sh@vger.kernel.org From: Randy Dunlap Subject: [PATCH] mtd: solutionengine.c: fix printk format warnings Message-ID: <02694f68-7994-d91d-6556-4f29eb284268@infradead.org> Date: Sat, 21 Jul 2018 12:37:06 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 Content-Language: en-US X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rich Felker , Yoshinori Sato , Marek Vasut , Richard Weinberger , Boris Brezillon , Brian Norris , David Woodhouse Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Randy Dunlap Fix 2 printk format warnings (this driver is currently SUPERH only) by using "%pap" instead of "%lx". (or we could just cast the physical addresses to unsigned int) Fixes these build warnings: ../drivers/mtd/maps/solutionengine.c: In function 'init_soleng_maps': ../include/linux/kern_levels.h:5:18: warning: format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=] ../drivers/mtd/maps/solutionengine.c:62:54: note: format string is defined here printk(KERN_NOTICE "Solution Engine: Flash at 0x%08lx, EPROM at 0x%08lx\n", ~~~~^ %08x ../include/linux/kern_levels.h:5:18: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=] ../drivers/mtd/maps/solutionengine.c:62:72: note: format string is defined here printk(KERN_NOTICE "Solution Engine: Flash at 0x%08lx, EPROM at 0x%08lx\n", ~~~~^ %08x Cc: David Woodhouse Cc: Brian Norris Cc: Boris Brezillon Cc: Marek Vasut Cc: Richard Weinberger Cc: linux-mtd@lists.infradead.org Cc: Yoshinori Sato Cc: Rich Felker Cc: linux-sh@vger.kernel.org Signed-off-by: Randy Dunlap --- drivers/mtd/maps/solutionengine.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) --- linux-next-20180720.orig/drivers/mtd/maps/solutionengine.c +++ linux-next-20180720/drivers/mtd/maps/solutionengine.c @@ -59,9 +59,13 @@ static int __init init_soleng_maps(void) return -ENXIO; } } - printk(KERN_NOTICE "Solution Engine: Flash at 0x%08lx, EPROM at 0x%08lx\n", - soleng_flash_map.phys & 0x1fffffff, - soleng_eprom_map.phys & 0x1fffffff); + { + resource_size_t fl_phys = soleng_flash_map.phys & 0x1fffffff; + resource_size_t ep_phys = soleng_eprom_map.phys & 0x1fffffff; + + printk(KERN_NOTICE "Solution Engine: Flash at 0x%pap, EPROM at 0x%pap\n", + &fl_phys, &ep_phys); + } flash_mtd->owner = THIS_MODULE; eprom_mtd = do_map_probe("map_rom", &soleng_eprom_map);