]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.9.129/mtd-maps-fix-solutionengine.c-printk-format-warnings.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.9.129 / mtd-maps-fix-solutionengine.c-printk-format-warnings.patch
1 From foo@baz Fri Sep 21 09:36:02 CEST 2018
2 From: Randy Dunlap <rdunlap@infradead.org>
3 Date: Tue, 24 Jul 2018 11:29:01 -0700
4 Subject: mtd/maps: fix solutionengine.c printk format warnings
5
6 From: Randy Dunlap <rdunlap@infradead.org>
7
8 [ Upstream commit 1d25e3eeed1d987404e2d2e451eebac8c15cecc1 ]
9
10 Fix 2 printk format warnings (this driver is currently only used by
11 arch/sh/) by using "%pap" instead of "%lx".
12
13 Fixes these build warnings:
14
15 ../drivers/mtd/maps/solutionengine.c: In function 'init_soleng_maps':
16 ../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=]
17 ../drivers/mtd/maps/solutionengine.c:62:54: note: format string is defined here
18 printk(KERN_NOTICE "Solution Engine: Flash at 0x%08lx, EPROM at 0x%08lx\n",
19 ~~~~^
20 %08x
21 ../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=]
22 ../drivers/mtd/maps/solutionengine.c:62:72: note: format string is defined here
23 printk(KERN_NOTICE "Solution Engine: Flash at 0x%08lx, EPROM at 0x%08lx\n",
24 ~~~~^
25 %08x
26
27 Cc: David Woodhouse <dwmw2@infradead.org>
28 Cc: Brian Norris <computersforpeace@gmail.com>
29 Cc: Boris Brezillon <boris.brezillon@bootlin.com>
30 Cc: Marek Vasut <marek.vasut@gmail.com>
31 Cc: Richard Weinberger <richard@nod.at>
32 Cc: linux-mtd@lists.infradead.org
33 Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
34 Cc: Rich Felker <dalias@libc.org>
35 Cc: linux-sh@vger.kernel.org
36 Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
37
38 Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
39 Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
40 Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
41 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
42 ---
43 drivers/mtd/maps/solutionengine.c | 6 +++---
44 1 file changed, 3 insertions(+), 3 deletions(-)
45
46 --- a/drivers/mtd/maps/solutionengine.c
47 +++ b/drivers/mtd/maps/solutionengine.c
48 @@ -59,9 +59,9 @@ static int __init init_soleng_maps(void)
49 return -ENXIO;
50 }
51 }
52 - printk(KERN_NOTICE "Solution Engine: Flash at 0x%08lx, EPROM at 0x%08lx\n",
53 - soleng_flash_map.phys & 0x1fffffff,
54 - soleng_eprom_map.phys & 0x1fffffff);
55 + printk(KERN_NOTICE "Solution Engine: Flash at 0x%pap, EPROM at 0x%pap\n",
56 + &soleng_flash_map.phys,
57 + &soleng_eprom_map.phys);
58 flash_mtd->owner = THIS_MODULE;
59
60 eprom_mtd = do_map_probe("map_rom", &soleng_eprom_map);