lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1fc711e8-93e8-0d30-9198-2b73eccbee4f@redhat.com>
Date:   Tue, 15 Dec 2020 16:14:39 -0800
From:   Tom Rix <trix@...hat.com>
To:     Joe Perches <joe@...ches.com>, hverkuil@...all.nl,
        mchehab@...nel.org
Cc:     linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [media] radio-si470x: remove h from printk format
 specifier


On 12/15/20 2:07 PM, Joe Perches wrote:
> On Tue, 2020-12-15 at 13:33 -0800, trix@...hat.com wrote:
>> From: Tom Rix <trix@...hat.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.
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ