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] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 8 Jul 2014 08:22:27 +0200
From:	Fabio Falzoi <fabio.falzoi84@...il.com>
To:	micky <micky_ching@...lsil.com.cn>
Cc:	gregkh@...uxfoundation.org, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org, Joe Perches <joe@...ches.com>,
	wei_wang@...lsil.com.cn
Subject: Re: [PATCH v2 4/4] Staging: rts5208: Fix a format specifier for dev_err

Hi Micky,

in the latest linux-tree sources, lun field in struct scsi_device from
include/scsi/scsi_device.h is a u64:

        unsigned int id, channel;
        u64 lun;
        unsigned int manufacturer;

so we get a compiler warning if we keep the %u specifier.

Regards,
Fabio

On Tue, Jul 8, 2014 at 4:13 AM, micky <micky_ching@...lsil.com.cn> wrote:
> On 07/07/2014 03:10 PM, Fabio Falzoi wrote:
>>
>> Fix an incorrect use of the %d format specifier in dev_err that caused a
>> warning.
>>
>> Signed-off-by: Fabio Falzoi <fabio.falzoi84@...il.com>
>> ---
>>   drivers/staging/rts5208/rtsx.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/staging/rts5208/rtsx.c
>> b/drivers/staging/rts5208/rtsx.c
>> index 4f5f7a3..9aae7ac 100644
>> --- a/drivers/staging/rts5208/rtsx.c
>> +++ b/drivers/staging/rts5208/rtsx.c
>> @@ -463,14 +463,14 @@ static int rtsx_control_thread(void *__dev)
>>                  * the maximum known LUN
>>                  */
>>                 else if (chip->srb->device->id) {
>> -                       dev_err(&dev->pci->dev, "Bad target number
>> (%d:%d)\n",
>> +                       dev_err(&dev->pci->dev, "Bad target number
>> (%d:%llu)\n",
>
> here exist some compile warning.
> drivers/staging/rts5208/rtsx.c:468:5: warning: format ‘%llu’ expects
> argument of type ‘long long unsigned int’, but argument 4 has type ‘unsigned
> int’ [-Wformat]
>
>
>>                                 chip->srb->device->id,
>>                                 chip->srb->device->lun);
>>                         chip->srb->result = DID_BAD_TARGET << 16;
>>                 }
>>                 else if (chip->srb->device->lun > chip->max_lun) {
>> -                       dev_err(&dev->pci->dev, "Bad LUN (%d:%d)\n",
>> +                       dev_err(&dev->pci->dev, "Bad LUN (%d:%llu)\n",
>>                                 chip->srb->device->id,
>>                                 chip->srb->device->lun);
>>                         chip->srb->result = DID_BAD_TARGET << 16;
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ