[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <bc9bcf4f-5075-8a60-e554-593df22d4a52@gentoo.org>
Date: Sun, 30 Apr 2023 09:17:09 +0200
From: Matthias Schwarzott <zzam@...too.org>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>,
Daniel Scally <djrscally@...il.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>
Cc: linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
linux-media@...r.kernel.org
Subject: Re: [PATCH] media: ov5693: Simplify an error message
Am 21.04.23 um 17:50 schrieb Christophe JAILLET:
> Le 21/04/2023 à 09:38, Matthias Schwarzott a écrit :
>> Am 15.04.23 um 18:28 schrieb Christophe JAILLET:
>>> dev_err_probe() already display the error code. There is no need to
>>> duplicate it explicitly in the error message.
>>>
>>> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
>>> ---
>>> drivers/media/i2c/ov5693.c | 4 ++--
>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/media/i2c/ov5693.c b/drivers/media/i2c/ov5693.c
>>> index e3c3bed69ad6..d23786afd754 100644
>>> --- a/drivers/media/i2c/ov5693.c
>>> +++ b/drivers/media/i2c/ov5693.c
>>> @@ -404,8 +404,8 @@ static int ov5693_read_reg(struct ov5693_device
>>> *ov5693, u32 addr, u32 *value)
>>> ret = i2c_transfer(client->adapter, msg, 2);
>>> if (ret < 0)
>>
>> i2c_transfer returns the number of transmitted messages. So I think
>> the values 0 <= ret < 2 also need to be handled.
>
> Ok, agreed.
>
> If ok for you, I'll send a follow-up patch when/if this one is applied,
> because what you spotted is unrelated to the dev_err_probe() behavior.
>
Sure, fine for me.
> CJ
>>
>>> return dev_err_probe(&client->dev, ret,
>>> - "Failed to read register 0x%04x: %d\n",
>>> - addr & OV5693_REG_ADDR_MASK, ret);
>>> + "Failed to read register 0x%04x\n",
>>> + addr & OV5693_REG_ADDR_MASK);
>>> *value = 0;
>>> for (i = 0; i < len; ++i) {
>>
>>
>
Powered by blists - more mailing lists