diff mbox series

[1/3] iio: light: stk3310: relax chipid check warning

Message ID 20240712152417.97726-1-kauschluss@disroot.org (mailing list archive)
State Changes Requested
Headers show
Series [1/3] iio: light: stk3310: relax chipid check warning | expand

Commit Message

Kaustabh Chakraborty July 12, 2024, 3:24 p.m. UTC
In order to allow newer devices which are compatible with existing
sensors, issuing a warning for an unknown chipid indicates that
something has gone wrong with the init process, which isn't ideal.
Swap it with a friendlier info message to get things right.

Suggested-by: Conor Dooley <conor@kernel.org>
Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
---
 drivers/iio/light/stk3310.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jonathan Cameron July 13, 2024, 12:06 p.m. UTC | #1
On Fri, 12 Jul 2024 20:54:00 +0530
Kaustabh Chakraborty <kauschluss@disroot.org> wrote:

> In order to allow newer devices which are compatible with existing
> sensors, issuing a warning for an unknown chipid indicates that
> something has gone wrong with the init process, which isn't ideal.
> Swap it with a friendlier info message to get things right.
> 
> Suggested-by: Conor Dooley <conor@kernel.org>
> Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Give the patch series a cover letter next time as it makes it easy for
people to comment on whole series together + gives the series a nice
name in patchwork etc.

Plus this isn't (I think) version 1.  So that should be in the patch naming.

Actual change looks fine to me.

Thanks,

Jonathan

> ---
>  drivers/iio/light/stk3310.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/light/stk3310.c b/drivers/iio/light/stk3310.c
> index e3470d6743ef..48a971de6a04 100644
> --- a/drivers/iio/light/stk3310.c
> +++ b/drivers/iio/light/stk3310.c
> @@ -496,7 +496,7 @@ static int stk3310_init(struct iio_dev *indio_dev)
>  
>  	ret = stk3310_check_chip_id(chipid);
>  	if (ret < 0)
> -		dev_warn(&client->dev, "unknown chip id: 0x%x\n", chipid);
> +		dev_info(&client->dev, "new unknown chip id: 0x%x\n", chipid);
>  
>  	state = STK3310_STATE_EN_ALS | STK3310_STATE_EN_PS;
>  	ret = stk3310_set_state(data, state);
Kaustabh Chakraborty July 14, 2024, 8:51 a.m. UTC | #2
On 2024-07-13 12:06, Jonathan Cameron wrote:
> On Fri, 12 Jul 2024 20:54:00 +0530
> Kaustabh Chakraborty <kauschluss@disroot.org> wrote:
> 
>> In order to allow newer devices which are compatible with existing
>> sensors, issuing a warning for an unknown chipid indicates that
>> something has gone wrong with the init process, which isn't ideal.
>> Swap it with a friendlier info message to get things right.
>> 
>> Suggested-by: Conor Dooley <conor@kernel.org>
>> Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
> Give the patch series a cover letter next time as it makes it easy for
> people to comment on whole series together + gives the series a nice
> name in patchwork etc.

Sure, I assume I can add one in the next version, right?

> 
> Plus this isn't (I think) version 1.  So that should be in the patch naming.

Sorry, forgot adding v2 to the messages. I'll properly send a v3.

> 
> Actual change looks fine to me.
> 
> Thanks,
> 
> Jonathan
> 
>> ---
>>  drivers/iio/light/stk3310.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/drivers/iio/light/stk3310.c b/drivers/iio/light/stk3310.c
>> index e3470d6743ef..48a971de6a04 100644
>> --- a/drivers/iio/light/stk3310.c
>> +++ b/drivers/iio/light/stk3310.c
>> @@ -496,7 +496,7 @@ static int stk3310_init(struct iio_dev *indio_dev)
>>  
>>  	ret = stk3310_check_chip_id(chipid);
>>  	if (ret < 0)
>> -		dev_warn(&client->dev, "unknown chip id: 0x%x\n", chipid);
>> +		dev_info(&client->dev, "new unknown chip id: 0x%x\n", chipid);
>>  
>>  	state = STK3310_STATE_EN_ALS | STK3310_STATE_EN_PS;
>>  	ret = stk3310_set_state(data, state);
diff mbox series

Patch

diff --git a/drivers/iio/light/stk3310.c b/drivers/iio/light/stk3310.c
index e3470d6743ef..48a971de6a04 100644
--- a/drivers/iio/light/stk3310.c
+++ b/drivers/iio/light/stk3310.c
@@ -496,7 +496,7 @@  static int stk3310_init(struct iio_dev *indio_dev)
 
 	ret = stk3310_check_chip_id(chipid);
 	if (ret < 0)
-		dev_warn(&client->dev, "unknown chip id: 0x%x\n", chipid);
+		dev_info(&client->dev, "new unknown chip id: 0x%x\n", chipid);
 
 	state = STK3310_STATE_EN_ALS | STK3310_STATE_EN_PS;
 	ret = stk3310_set_state(data, state);