Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5219751imm; Sun, 22 Jul 2018 16:30:59 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfeaSr3nCZCYQvYAVv+Yz8o/CHkYHpet6OmGkILO9aiyCbta91w7c+rT4VqmgMdvmIsPAVO X-Received: by 2002:a62:c4c3:: with SMTP id h64-v6mr10826267pfk.39.1532302259146; Sun, 22 Jul 2018 16:30:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532302259; cv=none; d=google.com; s=arc-20160816; b=VqCQmLWCXYdZ+dd6nLgxfccLaIkFMEj0tUWeHdeG4pqfLoTktRswlm5foOgXZA1qTx ntKBUxdxCCG1tCFOE7AXmiZLLCstrtoxfvf9LGsVUmGCRdIOAGooGsaN5iJaN++ttT33 sr07Y14Boc1KJTQ3S/2TusDxConTOP3aLUQO17xs35b8ugk8GXWQNPreF8qjdr98mD2n RCaQj13ruSpDk5wjddrrwL3jFerWxImHHyYqe8khu/zraWT5vxclgZZTfm0A1MjhWre0 1bPkxRV4LgWDJY87xzIFUD0iymMLTb+q6Pf64a7t95J1zZotmhIHXRHvbxRI8bwaYSvS b0Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:subject :from:cc:to:dkim-signature:arc-authentication-results; bh=uAcTCJoXA/Bh6IMNCW3N5itDzJC6EKfXHNDFQJCYEBo=; b=a+ZxyL5BeEAE+scNOwJOHJ8r9HWVUFcEAo5vAo26RqXwQg20szgUk7Sk20WzXpEbDn V3hT6Zx/IgleWbaQLRetx8p51c2PyAWVNJz3R0NT8y+wnn6gOdah7Bi+xcZPOKpI+V4Z Bw/juAUI7t9ccqayyz0OY2WASy/Kf0ufAsDpasDyHKkSgPLzbPNZS/bTvEulMbKJv28z 43TZgKi6U+OxIAYudcRTx9MUvPfuz09fZOC1AVFRui6okNPFq6LbOnFE9LrCYcl6Ul13 loFAmDlzb+bSnhuPQmg3rsJ1cxrDmJi7Hfvh0MWNopzL1LHqNJAC8Q3Loqk7JfX76Wlp ckcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@infradead.org header.s=bombadil.20170209 header.b=pihzemn+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z77-v6si7420169pff.100.2018.07.22.16.30.44; Sun, 22 Jul 2018 16:30:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@infradead.org header.s=bombadil.20170209 header.b=pihzemn+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731150AbeGWA1h (ORCPT + 99 others); Sun, 22 Jul 2018 20:27:37 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:60302 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730317AbeGWA1h (ORCPT ); Sun, 22 Jul 2018 20:27:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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=aJyV7KSLyt2ZX6T+ESPq2IO2rm2jOiTeyZVa/ZtxfxI=; b=pihzemn+qT57L9XFFcax9JwOw 8+8NKxmG2eKw/OBAb7qSvXAaPJTyz0zBiVAeJ80kDgRPW3DOa2U3aB2dQ7h6t3vf5Nq+noOGs784u 45E2pn/sqVXK+CV5p7pB4D3PEHkqj7fBJMIiN0mldBk9/VWK3rgOD5XeFc+CIPs2lq0viOG24xJDO Mh9qOJtha7w7Ogktq4qpMkK6mypYcbXIaITnnXYBbhDrONsawMJ5m+YxgBAaPRri6YAxGVQhzN1ZM 7cVQhcssdOyc+mDXnrYn3wtSwfezFc5bqh29DSGy8C4cOotgk0Ihtr2Gb+7/2FlDE1Od31OefoWPY Pkbs+sQ3g==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=dragon.dunlab) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fhNmX-0002na-V1; Sun, 22 Jul 2018 23:28:54 +0000 To: LKML , Linux-sh list Cc: David Woodhouse , Brian Norris , Boris Brezillon , Marek Vasut , Richard Weinberger , linux-mtd@lists.infradead.org, Yoshinori Sato , Rich Felker , Sergei Shtylyov From: Randy Dunlap Subject: [PATCH v2] mtd/maps: fix solutionengine.c printk format warnings Message-ID: <0ca72308-0551-97dc-dc74-11e1d8dac5b1@infradead.org> Date: Sun, 22 Jul 2018 16:28:52 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Randy Dunlap Fix 2 printk format warnings (this driver is currently only used by arch/sh/) 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 Cc: Sergei Shtylyov Signed-off-by: Randy Dunlap --- v2: indent all lines inside the new block drivers/mtd/maps/solutionengine.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) --- linux-next-20180717.orig/drivers/mtd/maps/solutionengine.c +++ linux-next-20180717/drivers/mtd/maps/solutionengine.c @@ -59,9 +59,14 @@ 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);