mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1 0/1] regulator: tps6594-regulator: Correct nr_types assignment
@ 2024-06-03 17:05 Shree Ramamoorthy
  2024-06-03 17:05 ` [PATCH v1 1/1] Correct nr_types assignment for TPS6594/3 and TPS65224 Shree Ramamoorthy
  0 siblings, 1 reply; 5+ messages in thread
From: Shree Ramamoorthy @ 2024-06-03 17:05 UTC (permalink / raw)
  To: lgirdwood, linux-kernel
  Cc: m-leonard, u-kumar1, n-francis, bhargav.r, m.nirmaladevi,
	vigneshr, Shree Ramamoorthy

Correct nr_types assignment for TPS6594/3 and TPS65224 in probe().
Fixes: 00c8265 (regulator: tps6594-regulator: Add TI TPS65224 PMIC regulators)

Shree Ramamoorthy (1):
  Fix nr_types assignment for TPS6594/3 and TPS65224

 drivers/regulator/tps6594-regulator.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
Signed-off-by: Shree Ramamoorthy <s-ramamoorthy@ti.com>


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

* [PATCH v1 1/1] Correct nr_types assignment for TPS6594/3 and TPS65224
  2024-06-03 17:05 [PATCH v1 0/1] regulator: tps6594-regulator: Correct nr_types assignment Shree Ramamoorthy
@ 2024-06-03 17:05 ` Shree Ramamoorthy
  2024-06-03 17:16   ` Kumar, Udit
  2024-06-03 17:31   ` Vignesh Raghavendra
  0 siblings, 2 replies; 5+ messages in thread
From: Shree Ramamoorthy @ 2024-06-03 17:05 UTC (permalink / raw)
  To: lgirdwood, linux-kernel
  Cc: m-leonard, u-kumar1, n-francis, bhargav.r, m.nirmaladevi,
	vigneshr, Shree Ramamoorthy

Swap nr_types assignment for TPS6594/3 and TPS65224.
Issue detected with v6.10-rc1 and tested using a TI J7200 EVM board.

Log:
[   13.974024] Call trace:
[   13.974025]  _regulator_put.part.0+0x40/0x48
[   13.974028]  regulator_register+0x2b0/0xa00
[   13.974031]  devm_regulator_register+0x58/0xa0
[   13.974035]  tps6594_regulator_probe+0x4e0/0x5f0 [tps6594_regulator]
...
[   13.974178] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000004

Signed-off-by: Shree Ramamoorthy <s-ramamoorthy@ti.com>
---
 drivers/regulator/tps6594-regulator.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/regulator/tps6594-regulator.c b/drivers/regulator/tps6594-regulator.c
index 4a859f4c0f83..b66608ab2546 100644
--- a/drivers/regulator/tps6594-regulator.c
+++ b/drivers/regulator/tps6594-regulator.c
@@ -660,11 +660,11 @@ static int tps6594_regulator_probe(struct platform_device *pdev)
 	} else if (tps->chip_id == TPS65224) {
 		nr_buck = ARRAY_SIZE(tps65224_buck_regs);
 		nr_ldo = ARRAY_SIZE(tps65224_ldo_regs);
-		nr_types = REGS_INT_NB;
+		nr_types = TPS65224_REGS_INT_NB;
 	} else {
 		nr_buck = ARRAY_SIZE(buck_regs);
 		nr_ldo = ARRAY_SIZE(tps6594_ldo_regs);
-		nr_types = TPS65224_REGS_INT_NB;
+		nr_types = REGS_INT_NB;
 	}
 
 	reg_irq_nb = nr_types * (nr_buck + nr_ldo);
--

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

* Re: [PATCH v1 1/1] Correct nr_types assignment for TPS6594/3 and TPS65224
  2024-06-03 17:05 ` [PATCH v1 1/1] Correct nr_types assignment for TPS6594/3 and TPS65224 Shree Ramamoorthy
@ 2024-06-03 17:16   ` Kumar, Udit
  2024-06-03 17:29     ` Kumar, Udit
  2024-06-03 17:31   ` Vignesh Raghavendra
  1 sibling, 1 reply; 5+ messages in thread
From: Kumar, Udit @ 2024-06-03 17:16 UTC (permalink / raw)
  To: Shree Ramamoorthy, lgirdwood, linux-kernel
  Cc: m-leonard, n-francis, bhargav.r, m.nirmaladevi, vigneshr


On 6/3/2024 10:35 PM, Shree Ramamoorthy wrote:
> Swap nr_types assignment for TPS6594/3 and TPS65224.
> Issue detected with v6.10-rc1 and tested using a TI J7200 EVM board.


Please prefix line, where you want this patch to go

like tiL6.6 or so


> Log:
> [   13.974024] Call trace:
> [   13.974025]  _regulator_put.part.0+0x40/0x48
> [   13.974028]  regulator_register+0x2b0/0xa00
> [   13.974031]  devm_regulator_register+0x58/0xa0
> [   13.974035]  tps6594_regulator_probe+0x4e0/0x5f0 [tps6594_regulator]
> ...
> [   13.974178] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000004
>
> Signed-off-by: Shree Ramamoorthy <s-ramamoorthy@ti.com>
> ---
>   drivers/regulator/tps6594-regulator.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/regulator/tps6594-regulator.c b/drivers/regulator/tps6594-regulator.c
> index 4a859f4c0f83..b66608ab2546 100644
> --- a/drivers/regulator/tps6594-regulator.c
> +++ b/drivers/regulator/tps6594-regulator.c
> @@ -660,11 +660,11 @@ static int tps6594_regulator_probe(struct platform_device *pdev)
>   	} else if (tps->chip_id == TPS65224) {
>   		nr_buck = ARRAY_SIZE(tps65224_buck_regs);
>   		nr_ldo = ARRAY_SIZE(tps65224_ldo_regs);
> -		nr_types = REGS_INT_NB;
> +		nr_types = TPS65224_REGS_INT_NB;
>   	} else {
>   		nr_buck = ARRAY_SIZE(buck_regs);
>   		nr_ldo = ARRAY_SIZE(tps6594_ldo_regs);
> -		nr_types = TPS65224_REGS_INT_NB;
> +		nr_types = REGS_INT_NB;
>   	}
>   
>   	reg_irq_nb = nr_types * (nr_buck + nr_ldo);
> --

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

* Re: [PATCH v1 1/1] Correct nr_types assignment for TPS6594/3 and TPS65224
  2024-06-03 17:16   ` Kumar, Udit
@ 2024-06-03 17:29     ` Kumar, Udit
  0 siblings, 0 replies; 5+ messages in thread
From: Kumar, Udit @ 2024-06-03 17:29 UTC (permalink / raw)
  To: Shree Ramamoorthy, lgirdwood, linux-kernel
  Cc: m-leonard, n-francis, bhargav.r, m.nirmaladevi, vigneshr, u-kumar1


Please ignore below response .

Sent by mistake.


Thanks

Udit


On 6/3/2024 10:46 PM, Kumar, Udit wrote:
>
> On 6/3/2024 10:35 PM, Shree Ramamoorthy wrote:
>> Swap nr_types assignment for TPS6594/3 and TPS65224.
>> Issue detected with v6.10-rc1 and tested using a TI J7200 EVM board.
>
>
> Please prefix line, where you want this patch to go
>
> like tiL6.6 or so
>
>
>> Log:
>> [   13.974024] Call trace:
>> [   13.974025]  _regulator_put.part.0+0x40/0x48
>> [   13.974028]  regulator_register+0x2b0/0xa00
>> [   13.974031]  devm_regulator_register+0x58/0xa0
>> [   13.974035]  tps6594_regulator_probe+0x4e0/0x5f0 [tps6594_regulator]
>> ...
>> [   13.974178] Unable to handle kernel NULL pointer dereference at 
>> virtual address 0000000000000004
>>
>> Signed-off-by: Shree Ramamoorthy <s-ramamoorthy@ti.com>
>> ---
>>   drivers/regulator/tps6594-regulator.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/regulator/tps6594-regulator.c 
>> b/drivers/regulator/tps6594-regulator.c
>> index 4a859f4c0f83..b66608ab2546 100644
>> --- a/drivers/regulator/tps6594-regulator.c
>> +++ b/drivers/regulator/tps6594-regulator.c
>> @@ -660,11 +660,11 @@ static int tps6594_regulator_probe(struct 
>> platform_device *pdev)
>>       } else if (tps->chip_id == TPS65224) {
>>           nr_buck = ARRAY_SIZE(tps65224_buck_regs);
>>           nr_ldo = ARRAY_SIZE(tps65224_ldo_regs);
>> -        nr_types = REGS_INT_NB;
>> +        nr_types = TPS65224_REGS_INT_NB;
>>       } else {
>>           nr_buck = ARRAY_SIZE(buck_regs);
>>           nr_ldo = ARRAY_SIZE(tps6594_ldo_regs);
>> -        nr_types = TPS65224_REGS_INT_NB;
>> +        nr_types = REGS_INT_NB;
>>       }
>>         reg_irq_nb = nr_types * (nr_buck + nr_ldo);
>> -- 

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

* Re: [PATCH v1 1/1] Correct nr_types assignment for TPS6594/3 and TPS65224
  2024-06-03 17:05 ` [PATCH v1 1/1] Correct nr_types assignment for TPS6594/3 and TPS65224 Shree Ramamoorthy
  2024-06-03 17:16   ` Kumar, Udit
@ 2024-06-03 17:31   ` Vignesh Raghavendra
  1 sibling, 0 replies; 5+ messages in thread
From: Vignesh Raghavendra @ 2024-06-03 17:31 UTC (permalink / raw)
  To: Shree Ramamoorthy, lgirdwood, linux-kernel
  Cc: m-leonard, u-kumar1, n-francis, bhargav.r, m.nirmaladevi



On 03/06/24 22:35, Shree Ramamoorthy wrote:
> Swap nr_types assignment for TPS6594/3 and TPS65224.
> Issue detected with v6.10-rc1 and tested using a TI J7200 EVM board.
> 
> Log:
> [   13.974024] Call trace:
> [   13.974025]  _regulator_put.part.0+0x40/0x48
> [   13.974028]  regulator_register+0x2b0/0xa00
> [   13.974031]  devm_regulator_register+0x58/0xa0
> [   13.974035]  tps6594_regulator_probe+0x4e0/0x5f0 [tps6594_regulator]
> ...
> [   13.974178] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000004
> 
> Signed-off-by: Shree Ramamoorthy <s-ramamoorthy@ti.com>
> ---

Please add a appropriate Fixes: tag

>  drivers/regulator/tps6594-regulator.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/regulator/tps6594-regulator.c b/drivers/regulator/tps6594-regulator.c
> index 4a859f4c0f83..b66608ab2546 100644
> --- a/drivers/regulator/tps6594-regulator.c
> +++ b/drivers/regulator/tps6594-regulator.c
> @@ -660,11 +660,11 @@ static int tps6594_regulator_probe(struct platform_device *pdev)
>  	} else if (tps->chip_id == TPS65224) {
>  		nr_buck = ARRAY_SIZE(tps65224_buck_regs);
>  		nr_ldo = ARRAY_SIZE(tps65224_ldo_regs);
> -		nr_types = REGS_INT_NB;
> +		nr_types = TPS65224_REGS_INT_NB;
>  	} else {
>  		nr_buck = ARRAY_SIZE(buck_regs);
>  		nr_ldo = ARRAY_SIZE(tps6594_ldo_regs);
> -		nr_types = TPS65224_REGS_INT_NB;
> +		nr_types = REGS_INT_NB;
>  	}
>  
>  	reg_irq_nb = nr_types * (nr_buck + nr_ldo);
> --

-- 
Regards
Vignesh

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

end of thread, other threads:[~2024-06-03 17:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-03 17:05 [PATCH v1 0/1] regulator: tps6594-regulator: Correct nr_types assignment Shree Ramamoorthy
2024-06-03 17:05 ` [PATCH v1 1/1] Correct nr_types assignment for TPS6594/3 and TPS65224 Shree Ramamoorthy
2024-06-03 17:16   ` Kumar, Udit
2024-06-03 17:29     ` Kumar, Udit
2024-06-03 17:31   ` Vignesh Raghavendra

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®