From: Akinobu Mita <akinobu.mita@gmail.com>
To: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
linux-next@vger.kernel.org, sfr@canb.auug.org.au
Cc: Akinobu Mita <akinobu.mita@gmail.com>,
Kalle Valo <kvalo@codeaurora.org>,
Stanislaw Gruszka <stf_xl@wp.pl>
Subject: [PATCH] iwlwifi: fix build warnings with format string
Date: Mon, 6 Jan 2020 23:53:09 +0900 [thread overview]
Message-ID: <1578322389-13716-1-git-send-email-akinobu.mita@gmail.com> (raw)
In-Reply-To: <20200106171452.201c3b4c@canb.auug.org.au>
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
next prev parent reply other threads:[~2020-01-06 14:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2020-01-10 13:16 ` [PATCH] iwlwifi: fix build warnings with format string Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1578322389-13716-1-git-send-email-akinobu.mita@gmail.com \
--to=akinobu.mita@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=stf_xl@wp.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).