soc: loongson: use resource_size() helper function
Subsystems (2)
PATCH 1/1 soc: loongson: use resource_size() helper function
Use the resource_size() function instead of a open coded computation resource size. It makes the code more readable.
Issue identified using resource_size.cocci coccinelle semantic patch.
---
Note: Proposed change is compile tested only.
drivers/soc/loongson/loongson2_guts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/loongson/loongson2_guts.c +1 -1
@@ -107,7 +107,7 @@ static int loongson2_guts_probe(struct platform_device *pdev) guts->little_endian =of_property_read_bool (np,"little-endian" ); res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); - guts->regs =ioremap (res->start, res->end - res->start +1 ); + guts->regs =ioremap (res->start,resource_size (res));if (IS_ERR (guts->regs))return PTR_ERR (guts->regs);
--
2.34.1
Quoted 7 lines · Deepak R Varma
Use the
resource_size()function instead of a open coded computation resource size. It makes the code more readable.Issue identified using
resource_size.coccicoccinelle semantic patch.Signed-off-by Deepak R Varma <[email protected]>---
Hello,
Requesting a review and feedback on this patch proposal?
Thank you,
./drv
Quoted 5 lines · Deepak R Varma
Quoted 3 lines · Deepak R Varma
Use the
resource_size()function instead of a open coded computation resource size. It makes the code more readable.
Quoted 7 lines
Quoted 4 lines
Issue identified using
resource_size.coccicoccinelle semantic patch.Signed-off-by Deepak R Varma <[email protected]>---
Hello,
Requesting a review and feedback on this patch proposal?
But I think this should be merged through [email protected] maintained by Arnd.
Huacai
Quoted 6 lines
Thank you,
./drv
Quoted 8 lines · Huacai Chen
Quoted 7 lines · Deepak R Varma
Quoted 5 lines · Deepak R Varma
Use the
resource_size()function instead of a open coded computation resource size. It makes the code more readable.Issue identified using
resource_size.coccicoccinelle semantic patch.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Signed-off-by Deepak R Varma <[email protected]>---
Hello,
Requesting a review and feedback on this patch proposal?Reviewed-by Huacai Chen <[email protected]>But I think this should be merged through [email protected] maintained by Arnd.
Thank you Huacai. Appreciate your time.
Hello Arnd,
Can you please tell me if I need to do anything further to have this merged as suggested by Huacai?
Thanks,
./drv
Quoted 8 lines
Huacai
Quoted 6 lines
Thank you,
./drv