* [PATCH] media: ov5693: Simplify an error message
@ 2023-04-15 16:28 Christophe JAILLET
2023-04-17 8:05 ` Dan Scally
2023-04-21 7:38 ` Matthias Schwarzott
0 siblings, 2 replies; 5+ messages in thread
From: Christophe JAILLET @ 2023-04-15 16:28 UTC (permalink / raw)
To: Daniel Scally, Mauro Carvalho Chehab
Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-media
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@wanadoo.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)
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) {
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] media: ov5693: Simplify an error message
2023-04-15 16:28 [PATCH] media: ov5693: Simplify an error message Christophe JAILLET
@ 2023-04-17 8:05 ` Dan Scally
2023-04-21 7:38 ` Matthias Schwarzott
1 sibling, 0 replies; 5+ messages in thread
From: Dan Scally @ 2023-04-17 8:05 UTC (permalink / raw)
To: Christophe JAILLET, Daniel Scally, Mauro Carvalho Chehab
Cc: linux-kernel, kernel-janitors, linux-media
Hi Christophe
On 15/04/2023 17:28, Christophe JAILLET wrote:
> 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@wanadoo.fr>
> ---
Thanks for the patch:
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
> 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)
> 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) {
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] media: ov5693: Simplify an error message
2023-04-15 16:28 [PATCH] media: ov5693: Simplify an error message Christophe JAILLET
2023-04-17 8:05 ` Dan Scally
@ 2023-04-21 7:38 ` Matthias Schwarzott
2023-04-21 15:50 ` Christophe JAILLET
1 sibling, 1 reply; 5+ messages in thread
From: Matthias Schwarzott @ 2023-04-21 7:38 UTC (permalink / raw)
To: Christophe JAILLET, Daniel Scally, Mauro Carvalho Chehab
Cc: linux-kernel, kernel-janitors, linux-media
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@wanadoo.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.
> 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) {
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] media: ov5693: Simplify an error message
2023-04-21 7:38 ` Matthias Schwarzott
@ 2023-04-21 15:50 ` Christophe JAILLET
2023-04-30 7:17 ` Matthias Schwarzott
0 siblings, 1 reply; 5+ messages in thread
From: Christophe JAILLET @ 2023-04-21 15:50 UTC (permalink / raw)
To: Matthias Schwarzott, Daniel Scally, Mauro Carvalho Chehab
Cc: linux-kernel, kernel-janitors, linux-media
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@wanadoo.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.
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) {
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] media: ov5693: Simplify an error message
2023-04-21 15:50 ` Christophe JAILLET
@ 2023-04-30 7:17 ` Matthias Schwarzott
0 siblings, 0 replies; 5+ messages in thread
From: Matthias Schwarzott @ 2023-04-30 7:17 UTC (permalink / raw)
To: Christophe JAILLET, Daniel Scally, Mauro Carvalho Chehab
Cc: linux-kernel, kernel-janitors, linux-media
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@wanadoo.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) {
>>
>>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-04-30 7:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-15 16:28 [PATCH] media: ov5693: Simplify an error message Christophe JAILLET
2023-04-17 8:05 ` Dan Scally
2023-04-21 7:38 ` Matthias Schwarzott
2023-04-21 15:50 ` Christophe JAILLET
2023-04-30 7:17 ` Matthias Schwarzott
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®