linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nvmem: sprd: Fix an error message
@ 2021-05-07 17:02 Christophe JAILLET
  2021-05-10  7:18 ` Chunyan Zhang
  2021-05-17  9:15 ` Srinivas Kandagatla
  0 siblings, 2 replies; 3+ messages in thread
From: Christophe JAILLET @ 2021-05-07 17:02 UTC (permalink / raw)
  To: srinivas.kandagatla, orsonzhai, baolin.wang7, zhang.lyra, gregkh,
	freeman.liu
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET

'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@wanadoo.fr>
---
 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);
 
 		writel(SPRD_EFUSE_ERR_CLR_MASK,
 		       efuse->base + SPRD_EFUSE_ERR_CLR);
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] nvmem: sprd: Fix an error message
  2021-05-07 17:02 [PATCH] nvmem: sprd: Fix an error message Christophe JAILLET
@ 2021-05-10  7:18 ` Chunyan Zhang
  2021-05-17  9:15 ` Srinivas Kandagatla
  1 sibling, 0 replies; 3+ messages in thread
From: Chunyan Zhang @ 2021-05-10  7:18 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Srinivas Kandagatla, Orson Zhai, Baolin Wang, Greg Kroah-Hartman,
	Freeman Liu, Linux Kernel Mailing List, kernel-janitors

On Sat, 8 May 2021 at 01:02, Christophe JAILLET
<christophe.jaillet@wanadoo.fr> wrote:
>
> '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@wanadoo.fr>

Thanks.
Acked-by: Chunyan Zhang <zhang.lyra@gmail.com>


> ---
>  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);
>
>                 writel(SPRD_EFUSE_ERR_CLR_MASK,
>                        efuse->base + SPRD_EFUSE_ERR_CLR);
> --
> 2.30.2
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] nvmem: sprd: Fix an error message
  2021-05-07 17:02 [PATCH] nvmem: sprd: Fix an error message Christophe JAILLET
  2021-05-10  7:18 ` Chunyan Zhang
@ 2021-05-17  9:15 ` Srinivas Kandagatla
  1 sibling, 0 replies; 3+ messages in thread
From: Srinivas Kandagatla @ 2021-05-17  9:15 UTC (permalink / raw)
  To: Christophe JAILLET, orsonzhai, baolin.wang7, zhang.lyra, gregkh,
	freeman.liu
  Cc: linux-kernel, kernel-janitors



On 07/05/2021 18:02, Christophe JAILLET wrote:
> '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@wanadoo.fr>
> ---

Applied thanks,

--srini
>   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);
>   
>   		writel(SPRD_EFUSE_ERR_CLR_MASK,
>   		       efuse->base + SPRD_EFUSE_ERR_CLR);
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-17  9:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-07 17:02 [PATCH] nvmem: sprd: Fix an error message Christophe JAILLET
2021-05-10  7:18 ` Chunyan Zhang
2021-05-17  9:15 ` Srinivas Kandagatla

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).