From: Tom Rix <trix@redhat.com>
To: Joe Perches <joe@perches.com>, hverkuil@xs4all.nl, mchehab@kernel.org
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [media] radio-si470x: remove h from printk format specifier
Date: Tue, 15 Dec 2020 16:14:39 -0800 [thread overview]
Message-ID: <1fc711e8-93e8-0d30-9198-2b73eccbee4f@redhat.com> (raw)
In-Reply-To: <75eb199376d65f2c2b4c746ca9be8cfc9f774453.camel@perches.com>
On 12/15/20 2:07 PM, Joe Perches wrote:
> On Tue, 2020-12-15 at 13:33 -0800, trix@redhat.com wrote:
>> From: Tom Rix <trix@redhat.com>
>>
>> See Documentation/core-api/printk-formats.rst.
>>
>> commit cbacb5ab0aa0 ("docs: printk-formats: Stop encouraging use of unnecessary %h[xudi] and %hh[xudi]")
>>
>> Standard integer promotion is already done and %hx and %hhx is useless
>> so do not encourage the use of %hh[xudi] or %h[xudi].
> []
>> diff --git a/drivers/media/radio/si470x/radio-si470x-i2c.c b/drivers/media/radio/si470x/radio-si470x-i2c.c
> []
>> @@ -410,7 +410,7 @@ static int si470x_i2c_probe(struct i2c_client *client)
>> radio->registers[DEVICEID], radio->registers[SI_CHIPID]);
>> if ((radio->registers[SI_CHIPID] & SI_CHIPID_FIRMWARE) < RADIO_FW_VERSION) {
>> dev_warn(&client->dev,
>> - "This driver is known to work with firmware version %hu,\n",
>> + "This driver is known to work with firmware version %u,\n",
>> RADIO_FW_VERSION);
>> dev_warn(&client->dev,
>> "but the device has firmware version %hu.\n",
> Tom? Do you know why your script missed this %hu?
Boooo..
I am making an assumption that there is only string.
Let me fix that and resend.
Thanks for catching the problem,
Tom
>
> btw: this would probably better as a single line something like:
>
> dev_warn(&client->dev,
> "Firmware version: %u is older than known working version %u\n",
> radio->registers[SI_CHIPID] & SI_CHIPID_FIRMWARE
> RADIO_FW_VERSION);
>
> Also a few lines above is:
>
> dev_info(&client->dev, "DeviceID=0x%4.4hx ChipID=0x%4.4hx\n",
> radio->registers[DEVICEID], radio->registers[SI_CHIPID])
>
> and these %4.4hx uses are also not changed by this patch.
>
>
prev parent reply other threads:[~2020-12-16 0:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-15 21:33 [PATCH] [media] radio-si470x: remove h from printk format specifier trix
2020-12-15 22:07 ` Joe Perches
2020-12-16 0:14 ` Tom Rix [this message]
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=1fc711e8-93e8-0d30-9198-2b73eccbee4f@redhat.com \
--to=trix@redhat.com \
--cc=hverkuil@xs4all.nl \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
/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