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]
Message-ID: <ddd9e8d3-e2dd-fa22-61d3-20c66d4815c5@linaro.org>
Date:   Fri, 11 Jun 2021 11:09:31 +0100
From:   Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
To:     Greg KH <gregkh@...uxfoundation.org>
Cc:     linux-kernel@...r.kernel.org,
        Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        Chunyan Zhang <zhang.lyra@...il.com>
Subject: Re: [PATCH 4/9] nvmem: sprd: Fix an error message



On 11/06/2021 10:45, Greg KH wrote:
> On Fri, Jun 11, 2021 at 11:17:50AM +0200, Greg KH wrote:
>> On Fri, Jun 11, 2021 at 10:05:40AM +0100, Srinivas Kandagatla wrote:
>>>
>>>
>>> On 11/06/2021 09:56, Greg KH wrote:
>>>> On Fri, Jun 11, 2021 at 09:33:43AM +0100, Srinivas Kandagatla wrote:
>>>>> From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
>>>>>
>>>>> 'ret' is known to be 0 here.
>>>>> The expected error status is stored in 'status', so use it instead.
>>>>>
>>>>> Also change %d in %u, because status is an u32, not a int.
>>>>>
>>>>> Fixes: 096030e7f449 ("nvmem: sprd: Add Spreadtrum SoCs eFuse support")
>>>>> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
>>>>> Acked-by: Chunyan Zhang <zhang.lyra@...il.com>
>>>>> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
>>>>> ---
>>>>>    drivers/nvmem/sprd-efuse.c | 2 +-
>>>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/drivers/nvmem/sprd-efuse.c b/drivers/nvmem/sprd-efuse.c
>>>>> index 5d394559edf2..e3e721d4c205 100644
>>>>> --- a/drivers/nvmem/sprd-efuse.c
>>>>> +++ b/drivers/nvmem/sprd-efuse.c
>>>>> @@ -234,7 +234,7 @@ static int sprd_efuse_raw_prog(struct sprd_efuse *efuse, u32 blk, bool doub,
>>>>>    	status = readl(efuse->base + SPRD_EFUSE_ERR_FLAG);
>>>>>    	if (status) {
>>>>>    		dev_err(efuse->dev,
>>>>> -			"write error status %d of block %d\n", ret, blk);
>>>>> +			"write error status %u of block %d\n", status, blk);
>>>>
>>>> Shouldn't this be %pe and not %u?
>>>
>>> This is not error pointer its status value read back from a register.
>>>
>>> I think %u should be good here.
>>
>> Argh, you are right, my fault.  For some reason I thought this worked
>> for integers as well.  Don't we have such a printk modifier somewhere to
>> turn error values into strings?  Let me dig...
> 
> Ah, errname() will do it.
> 
Thanks for looking this up,
looks like errname is more of stringfy rather than translating it in to 
proper description like strerror() does.

It would do something like:
  errname(EIO) -> "EIO"
  errname(-EIO) -> "-EIO"


> Looks like no one uses it, so nevermind, sorry for the noise.  I'll go
> apply this one now.


Noticed that It does not apply to your tree, I will resend it along with 
other patch.


thanks,
srini
> 
> thanks,
> 
> greg k-h
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ