linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build warnings after merge of the akpm-current tree
@ 2020-01-06  6:14 Stephen Rothwell
  2020-01-06 14:53 ` [PATCH] iwlwifi: fix build warnings with format string Akinobu Mita
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Rothwell @ 2020-01-06  6:14 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Akinobu Mita

[-- Attachment #1: Type: text/plain, Size: 6306 bytes --]

Hi all,

After merging the akpm-current tree, today's linux-next build (x86_64
allmodconfig) produced these warnings:

In file included from include/linux/device.h:15,
                 from include/linux/pci.h:37,
                 from drivers/net/wireless/intel/iwlegacy/4965.c:14:
drivers/net/wireless/intel/iwlegacy/4965.c: In function 'il4965_hw_get_temperature':
drivers/net/wireless/intel/iwlegacy/common.h:2928:32: warning: format '%d' expects argument of type 'int', but argument 6 has type 'long int' [-Wformat=]
 2928 |   dev_err(&il->hw->wiphy->dev, "%c %s " fmt,  \
      |                                ^~~~~~~~
include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
   19 | #define dev_fmt(fmt) fmt
      |                      ^~~
drivers/net/wireless/intel/iwlegacy/common.h:2928:3: note: in expansion of macro 'dev_err'
 2928 |   dev_err(&il->hw->wiphy->dev, "%c %s " fmt,  \
      |   ^~~~~~~
drivers/net/wireless/intel/iwlegacy/common.h:3027:26: note: in expansion of macro 'IL_DBG'
 3027 | #define D_TEMP(f, a...)  IL_DBG(IL_DL_TEMP, f, ## a)
      |                          ^~~~~~
drivers/net/wireless/intel/iwlegacy/4965.c:1614:2: note: in expansion of macro 'D_TEMP'
 1614 |  D_TEMP("Calibrated temperature: %dK, %dC\n", temperature,
      |  ^~~~~~
drivers/net/wireless/intel/iwlegacy/4965.c:1614:40: note: format string is defined here
 1614 |  D_TEMP("Calibrated temperature: %dK, %dC\n", temperature,
      |                                       ~^
      |                                        |
      |                                        int
      |                                       %ld
In file included from include/linux/device.h:15,
                 from include/linux/pci.h:37,
                 from drivers/net/wireless/intel/iwlegacy/4965.c:14:
drivers/net/wireless/intel/iwlegacy/4965.c: In function 'il4965_temperature_calib':
drivers/net/wireless/intel/iwlegacy/common.h:2928:32: warning: format '%d' expects argument of type 'int', but argument 5 has type 'long int' [-Wformat=]
 2928 |   dev_err(&il->hw->wiphy->dev, "%c %s " fmt,  \
      |                                ^~~~~~~~
include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
   19 | #define dev_fmt(fmt) fmt
      |                      ^~~
drivers/net/wireless/intel/iwlegacy/common.h:2928:3: note: in expansion of macro 'dev_err'
 2928 |   dev_err(&il->hw->wiphy->dev, "%c %s " fmt,  \
      |   ^~~~~~~
drivers/net/wireless/intel/iwlegacy/common.h:3027:26: note: in expansion of macro 'IL_DBG'
 3027 | #define D_TEMP(f, a...)  IL_DBG(IL_DL_TEMP, f, ## a)
      |                          ^~~~~~
drivers/net/wireless/intel/iwlegacy/4965.c:1674:4: note: in expansion of macro 'D_TEMP'
 1674 |    D_TEMP("Temperature changed " "from %dC to %dC\n",
      |    ^~~~~~
drivers/net/wireless/intel/iwlegacy/4965.c:1674:41: note: format string is defined here
 1674 |    D_TEMP("Temperature changed " "from %dC to %dC\n",
      |                                        ~^
      |                                         |
      |                                         int
      |                                        %ld
In file included from include/linux/device.h:15,
                 from include/linux/pci.h:37,
                 from drivers/net/wireless/intel/iwlegacy/4965.c:14:
drivers/net/wireless/intel/iwlegacy/common.h:2928:32: warning: format '%d' expects argument of type 'int', but argument 6 has type 'long int' [-Wformat=]
 2928 |   dev_err(&il->hw->wiphy->dev, "%c %s " fmt,  \
      |                                ^~~~~~~~
include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
   19 | #define dev_fmt(fmt) fmt
      |                      ^~~
drivers/net/wireless/intel/iwlegacy/common.h:2928:3: note: in expansion of macro 'dev_err'
 2928 |   dev_err(&il->hw->wiphy->dev, "%c %s " fmt,  \
      |   ^~~~~~~
drivers/net/wireless/intel/iwlegacy/common.h:3027:26: note: in expansion of macro 'IL_DBG'
 3027 | #define D_TEMP(f, a...)  IL_DBG(IL_DL_TEMP, f, ## a)
      |                          ^~~~~~
drivers/net/wireless/intel/iwlegacy/4965.c:1674:4: note: in expansion of macro 'D_TEMP'
 1674 |    D_TEMP("Temperature changed " "from %dC to %dC\n",
      |    ^~~~~~
drivers/net/wireless/intel/iwlegacy/4965.c:1674:48: note: format string is defined here
 1674 |    D_TEMP("Temperature changed " "from %dC to %dC\n",
      |                                               ~^
      |                                                |
      |                                                int
      |                                               %ld
In file included from include/linux/device.h:15,
                 from include/linux/pci.h:37,
                 from drivers/net/wireless/intel/iwlegacy/4965.c:14:
drivers/net/wireless/intel/iwlegacy/common.h:2928:32: warning: format '%d' expects argument of type 'int', but argument 5 has type 'long int' [-Wformat=]
 2928 |   dev_err(&il->hw->wiphy->dev, "%c %s " fmt,  \
      |                                ^~~~~~~~
include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
   19 | #define dev_fmt(fmt) fmt
      |                      ^~~
drivers/net/wireless/intel/iwlegacy/common.h:2928:3: note: in expansion of macro 'dev_err'
 2928 |   dev_err(&il->hw->wiphy->dev, "%c %s " fmt,  \
      |   ^~~~~~~
drivers/net/wireless/intel/iwlegacy/common.h:3027:26: note: in expansion of macro 'IL_DBG'
 3027 | #define D_TEMP(f, a...)  IL_DBG(IL_DL_TEMP, f, ## a)
      |                          ^~~~~~
drivers/net/wireless/intel/iwlegacy/4965.c:1678:4: note: in expansion of macro 'D_TEMP'
 1678 |    D_TEMP("Temperature " "initialized to %dC\n",
      |    ^~~~~~
drivers/net/wireless/intel/iwlegacy/4965.c:1678:43: note: format string is defined here
 1678 |    D_TEMP("Temperature " "initialized to %dC\n",
      |                                          ~^
      |                                           |
      |                                           int
      |                                          %ld

Presumably introduced by commit

  7a24660b5c25 ("iwlegacy: use <linux/units.h> helpers")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] iwlwifi: fix build warnings with format string
  2020-01-06  6:14 linux-next: build warnings after merge of the akpm-current tree Stephen Rothwell
@ 2020-01-06 14:53 ` Akinobu Mita
  2020-01-10 13:16   ` Kalle Valo
  0 siblings, 1 reply; 3+ messages in thread
From: Akinobu Mita @ 2020-01-06 14:53 UTC (permalink / raw)
  To: linux-kernel, akpm, linux-next, sfr
  Cc: Akinobu Mita, Kalle Valo, Stanislaw Gruszka

This fixes build warnings introduced by commit "iwlegacy: use
<linux/units.h> helpers" (iwlegacy-use-linux-unitsh-helpers.patch in -mm)

The format '%d' has to be changed to '%ld' because the return type of
kelvin_to_celsius() is 'long'.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Link: https://lore.kernel.org/r/20200106171452.201c3b4c@canb.auug.org.au
Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: Stanislaw Gruszka <stf_xl@wp.pl>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
---
 drivers/net/wireless/intel/iwlegacy/4965.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlegacy/4965.c b/drivers/net/wireless/intel/iwlegacy/4965.c
index 31b346c..34d0579 100644
--- a/drivers/net/wireless/intel/iwlegacy/4965.c
+++ b/drivers/net/wireless/intel/iwlegacy/4965.c
@@ -1611,7 +1611,7 @@ il4965_hw_get_temperature(struct il_priv *il)
 	temperature =
 	    (temperature * 97) / 100 + TEMPERATURE_CALIB_KELVIN_OFFSET;
 
-	D_TEMP("Calibrated temperature: %dK, %dC\n", temperature,
+	D_TEMP("Calibrated temperature: %dK, %ldC\n", temperature,
 	       kelvin_to_celsius(temperature));
 
 	return temperature;
@@ -1671,11 +1671,11 @@ il4965_temperature_calib(struct il_priv *il)
 
 	if (il->temperature != temp) {
 		if (il->temperature)
-			D_TEMP("Temperature changed " "from %dC to %dC\n",
+			D_TEMP("Temperature changed " "from %ldC to %ldC\n",
 			       kelvin_to_celsius(il->temperature),
 			       kelvin_to_celsius(temp));
 		else
-			D_TEMP("Temperature " "initialized to %dC\n",
+			D_TEMP("Temperature " "initialized to %ldC\n",
 			       kelvin_to_celsius(temp));
 	}
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] iwlwifi: fix build warnings with format string
  2020-01-06 14:53 ` [PATCH] iwlwifi: fix build warnings with format string Akinobu Mita
@ 2020-01-10 13:16   ` Kalle Valo
  0 siblings, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2020-01-10 13:16 UTC (permalink / raw)
  Cc: linux-kernel, akpm, linux-next, sfr, Stanislaw Gruszka, linux-wireless

(please cc linux-wireless on all wireless patches)

Akinobu Mita <akinobu.mita@gmail.com> writes:

> This fixes build warnings introduced by commit "iwlegacy: use
> <linux/units.h> helpers" (iwlegacy-use-linux-unitsh-helpers.patch in -mm)
>
> The format '%d' has to be changed to '%ld' because the return type of
> kelvin_to_celsius() is 'long'.
>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Link: https://lore.kernel.org/r/20200106171452.201c3b4c@canb.auug.org.au
> Cc: Kalle Valo <kvalo@codeaurora.org>
> Cc: Stanislaw Gruszka <stf_xl@wp.pl>
> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>

I don't know what's Andrew's workflow, but shouldn't the original patch
be fixed instead?

-- 
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-01-10 13:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-06  6:14 linux-next: build warnings after merge of the akpm-current tree Stephen Rothwell
2020-01-06 14:53 ` [PATCH] iwlwifi: fix build warnings with format string Akinobu Mita
2020-01-10 13:16   ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).