[PATCH V3 -next] cs5535: fix printk format warnings

Previous thread: linux-next: build failure after merge of the final tree (ieee1394 tree related) by Stephen Rothwell on Sunday, December 12, 2010 - 9:44 pm. (2 messages)

Next thread: [PATCH v2] Typecasting required for comparing unlike datatypes by Harsh Prateek Bora on Sunday, December 12, 2010 - 11:11 pm. (1 message)
From: Stephen Rothwell
Date: Sunday, December 12, 2010 - 10:36 pm

Hi all,

Changes since 20101210:

The v4l-dvb tree lost its build failure.

The acpi tree lost its build failure.

The ieee1394 tree gained a build failure so I used the version from
next-20101210.

The net tree lost a conflict.

The trivial tree gained a conflict against the omap tree.

The swiotlb-xen tree gained conflicts against the xen tree and a build
failure so I used the version from next-20101210.

----------------------------------------------------------------------------

I have created today's linux-next tree at
git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
(patches at http://www.kernel.org/pub/linux/kernel/v2.6/next/ ).  If you
are tracking the linux-next tree using git, you should not use "git pull"
to do so as that will try to merge the new linux-next release with the
old one.  You should use "git fetch" as mentioned in the FAQ on the wiki
(see below).

You can see which trees have been included by looking in the Next/Trees
file in the source.  There are also quilt-import.log and merge.log files
in the Next directory.  Between each merge, the tree was built with
a ppc64_defconfig for powerpc and an allmodconfig for x86_64. After the
final fixups (if any), it is also built with powerpc allnoconfig (32 and
64 bit), ppc44x_defconfig and allyesconfig (minus
CONFIG_PROFILE_ALL_BRANCHES - this fails its final link) and i386, sparc
and sparc64 defconfig. These builds also have
CONFIG_ENABLE_WARN_DEPRECATED, CONFIG_ENABLE_MUST_CHECK and
CONFIG_DEBUG_INFO disabled when necessary.

Below is a summary of the state of the merge.

We are up to 181 trees (counting Linus' and 26 trees of patches pending
for Linus' tree), more are welcome (even if they are currently empty).
Thanks to those who have contributed, and to those who haven't, please do.

Status of my local build tests will be at
http://kisskb.ellerman.id.au/linux-next .  If maintainers want to give
advice about cross compilers/configs that work, we are always open to add
more ...
From: Randy Dunlap
Date: Monday, December 13, 2010 - 12:20 pm

From: Randy Dunlap <randy.dunlap@oracle.com>

ERROR: "genl_register_family" [drivers/thermal/thermal_sys.ko] undefined!
ERROR: "genl_unregister_family" [drivers/thermal/thermal_sys.ko] undefined!
ERROR: "init_net" [drivers/thermal/thermal_sys.ko] undefined!
ERROR: "__alloc_skb" [drivers/thermal/thermal_sys.ko] undefined!
ERROR: "netlink_broadcast" [drivers/thermal/thermal_sys.ko] undefined!
ERROR: "kfree_skb" [drivers/thermal/thermal_sys.ko] undefined!
ERROR: "genl_register_mc_group" [drivers/thermal/thermal_sys.ko] undefined!
ERROR: "nla_reserve" [drivers/thermal/thermal_sys.ko] undefined!
ERROR: "skb_put" [drivers/thermal/thermal_sys.ko] undefined!

Reported-by: Zimny Lech <napohybelskurwysynom2010@gmail.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Zhang Rui <rui.zhang@intel.com>
---
 drivers/thermal/Kconfig |    1 +
 1 file changed, 1 insertion(+)

--- linux-next-20101213.orig/drivers/thermal/Kconfig
+++ linux-next-20101213/drivers/thermal/Kconfig
@@ -4,6 +4,7 @@
 
 menuconfig THERMAL
 	tristate "Generic Thermal sysfs driver"
+	depends on NET
 	help
 	  Generic Thermal Sysfs driver offers a generic mechanism for
 	  thermal management. Usually it's made up of one or more thermal
--

From: Randy Dunlap
Date: Monday, December 20, 2010 - 9:47 am

This is still needed in linux-next 20101220.




---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
desserts:  http://www.xenotime.net/linux/recipes/
--

From: Randy Dunlap
Date: Tuesday, January 4, 2011 - 10:10 am

On Mon, 13 Dec 2010 11:20:33 -0800 Randy Dunlap wrote:



---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
desserts:  http://www.xenotime.net/linux/recipes/
--

From: Randy Dunlap
Date: Monday, December 13, 2010 - 12:44 pm

From: Randy Dunlap <randy.dunlap@oracle.com>

Fix printk format warnings in cs5535 drivers:

drivers/gpio/cs5535-gpio.c:269: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'resource_size_t'
drivers/gpio/cs5535-gpio.c:269: warning: format '%x' expects type 'unsigned int', but argument 4 has type 'resource_size_t'
drivers/misc/cs5535-mfgpt.c:320: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'resource_size_t'
drivers/misc/cs5535-mfgpt.c:320: warning: format '%x' expects type 'unsigned int', but argument 4 has type 'resource_size_t'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Andres Salomon <dilinger@collabora.co.uk>
---
 drivers/gpio/cs5535-gpio.c  |    5 +++--
 drivers/misc/cs5535-mfgpt.c |    5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

--- linux-next-20101213.orig/drivers/gpio/cs5535-gpio.c
+++ linux-next-20101213/drivers/gpio/cs5535-gpio.c
@@ -266,8 +266,9 @@ static int __devinit cs5535_gpio_probe(s
 	cs5535_gpio_chip.pdev = pdev;
 	spin_lock_init(&cs5535_gpio_chip.lock);
 
-	dev_info(&pdev->dev, "region 0x%x - 0x%x reserved\n",
-			res->start, res->end);
+	dev_info(&pdev->dev, "region 0x%llx - 0x%llx reserved\n",
+			(unsigned long long)res->start,
+			(unsigned long long)res->end);
 
 	/* mask out reserved pins */
 	mask &= 0x1F7FFFFF;
--- linux-next-20101213.orig/drivers/misc/cs5535-mfgpt.c
+++ linux-next-20101213/drivers/misc/cs5535-mfgpt.c
@@ -317,8 +317,9 @@ static int __devinit cs5535_mfgpt_probe(
 	cs5535_mfgpt_chip.pdev = pdev;
 	spin_lock_init(&cs5535_mfgpt_chip.lock);
 
-	dev_info(&pdev->dev, "region 0x%x - 0x%x reserved\n", res->start,
-			res->end);
+	dev_info(&pdev->dev, "region 0x%llx - 0x%llx reserved\n",
+			(unsigned long long)res->start,
+			(unsigned long long)res->end);
 
 	/* detect the available timers */
 	t = scan_timers(&cs5535_mfgpt_chip);
--

From: Joe Perches
Date: Monday, December 13, 2010 - 1:28 pm

Use vsprintf extension %pR to format resource.

Original-patch-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Joe Perches <joe@perches.com>

---

 drivers/gpio/cs5535-gpio.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/gpio/cs5535-gpio.c b/drivers/gpio/cs5535-gpio.c
index b566fd5e..d7da7a1 100644
--- a/drivers/gpio/cs5535-gpio.c
+++ b/drivers/gpio/cs5535-gpio.c
@@ -266,8 +266,7 @@ static int __devinit cs5535_gpio_probe(struct platform_device *pdev)
 	cs5535_gpio_chip.pdev = pdev;
 	spin_lock_init(&cs5535_gpio_chip.lock);
 
-	dev_info(&pdev->dev, "region 0x%x - 0x%x reserved\n",
-			res->start, res->end);
+	dev_info(&pdev->dev, "reserved resource region %pR\n", res);
 
 	/* mask out reserved pins */
 	mask &= 0x1F7FFFFF;


--

From: Randy Dunlap
Date: Monday, December 13, 2010 - 1:42 pm

OK.  How about similar patch for the other warnings:

drivers/misc/cs5535-mfgpt.c:320: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'resource_size_t'
drivers/misc/cs5535-mfgpt.c:320: warning: format '%x' expects type 'unsigned int', but argument 4 has type 'resource_size_t'

-- 
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
--

From: Joe Perches
Date: Monday, December 13, 2010 - 1:57 pm

Use vsprintf extension %pR to format resource.

Original-patch-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Joe Perches <joe@perches.com>

---

V3 - Might as well do both files, thanks Randy...

Removed Andres Salomon <dilinger@collabora.co.uk> from cc.
It seems that he's not there anymore.

 drivers/gpio/cs5535-gpio.c  |    3 +--
 drivers/misc/cs5535-mfgpt.c |    3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/cs5535-gpio.c b/drivers/gpio/cs5535-gpio.c
index b566fd5e..d7da7a1 100644
--- a/drivers/gpio/cs5535-gpio.c
+++ b/drivers/gpio/cs5535-gpio.c
@@ -266,8 +266,7 @@ static int __devinit cs5535_gpio_probe(struct platform_device *pdev)
 	cs5535_gpio_chip.pdev = pdev;
 	spin_lock_init(&cs5535_gpio_chip.lock);
 
-	dev_info(&pdev->dev, "region 0x%x - 0x%x reserved\n",
-			res->start, res->end);
+	dev_info(&pdev->dev, "reserved resource region %pR\n", res);
 
 	/* mask out reserved pins */
 	mask &= 0x1F7FFFFF;
diff --git a/drivers/misc/cs5535-mfgpt.c b/drivers/misc/cs5535-mfgpt.c
index 2669306..e90506b 100644
--- a/drivers/misc/cs5535-mfgpt.c
+++ b/drivers/misc/cs5535-mfgpt.c
@@ -317,8 +317,7 @@ static int __devinit cs5535_mfgpt_probe(struct platform_device *pdev)
 	cs5535_mfgpt_chip.pdev = pdev;
 	spin_lock_init(&cs5535_mfgpt_chip.lock);
 
-	dev_info(&pdev->dev, "region 0x%x - 0x%x reserved\n", res->start,
-			res->end);
+	dev_info(&pdev->dev, "reserved resource region %pR\n", res);
 
 	/* detect the available timers */
 	t = scan_timers(&cs5535_mfgpt_chip);


--

Previous thread: linux-next: build failure after merge of the final tree (ieee1394 tree related) by Stephen Rothwell on Sunday, December 12, 2010 - 9:44 pm. (2 messages)

Next thread: [PATCH v2] Typecasting required for comparing unlike datatypes by Harsh Prateek Bora on Sunday, December 12, 2010 - 11:11 pm. (1 message)