Skip to contentSkip to conversation

bcma: gpio: remove redundant re-assignment of chip->owner

PATCH In review Colin Ian King 2 participants 2 messages Mar 3, 2022 – Mar 10, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bcma: gpio: remove redundant re-assignment of chip->owner

There are two identical assignments of chip->owner to the same value, the second assignment is redundant and can be removed.

Cleans up cppcheck warning:
drivers/bcma/driver_gpio.c:184:15: style: Variable 'chip->owner' is reassigned a value before the old one has been used. [redundantAssignment]

---
 drivers/bcma/driver_gpio.c | 1 -
 1 file changed, 1 deletion(-)
drivers/bcma/driver_gpio.c +0 -1
index 8a1e4705bc87..1e74ec1c7f23 100644
@@ -181,7 +181,6 @@ int bcma_gpio_init(struct bcma_drv_cc *cc)
 	chip->set		= bcma_gpio_set_value;
 	chip->direction_input	= bcma_gpio_direction_input;
 	chip->direction_output	= bcma_gpio_direction_output;
-	chip->owner		= THIS_MODULE;
 	chip->parent		= bus->dev;
 #if IS_BUILTIN(CONFIG_OF)
 	chip->of_node		= cc->core->dev.of_node;
Signature · 1 line
2.34.1
#1 lore raw
Quoted 8 lines · Colin Ian King

There are two identical assignments of chip->owner to the same value, the second assignment is redundant and can be removed.

Cleans up cppcheck warning:
drivers/bcma/driver_gpio.c:184:15: style: Variable 'chip->owner' is reassigned a value before the old one has been used. [redundantAssignment]

Patch applied to wireless-next.git, thanks.

857f837d856a bcma: gpio: remove redundant re-assignment of chip->owner

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches