Skip to contentSkip to conversation

drm/komeda: Remove useless variable assignment

PATCH In review [email protected] 3 participants 3 messages Nov 27, 2020

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

PATCH 1/1 drm/komeda: Remove useless variable assignment

From: Carsten Haitzler <[email protected]>

ret is not actually read after this (only written in one case then returned), so this assign line is useless. This removes that assignment.

---
 drivers/gpu/drm/arm/display/komeda/komeda_dev.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/arm/display/komeda/komeda_dev.c +0 -1
index 1d767473ba8a..eea76f51f662 100644
@@ -163,7 +163,6 @@ static int komeda_parse_dt(struct device *dev, struct komeda_dev *mdev)
 	ret = of_reserved_mem_device_init(dev);
 	if (ret && ret != -ENODEV)
 		return ret;
-	ret = 0;
 
 	for_each_available_child_of_node(np, child) {
 		if (of_node_name_eq(child, "pipeline")) {
Signature · 6 lines
2.29.2

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · On 27/11/2020 11:00, [email protected] wrote:

From: Carsten Haitzler <[email protected]>

ret is not actually read after this (only written in one case then returned), so this assign line is useless. This removes that assignment.

Quoted 10 lines
---
  drivers/gpu/drm/arm/display/komeda/komeda_dev.c | 1 -
  1 file changed, 1 deletion(-)
drivers/gpu/drm/arm/display/komeda/komeda_dev.c +0 -0
index 1d767473ba8a..eea76f51f662 100644

drivers/gpu/drm/arm/display/komeda/komeda_dev.c static int komeda_parse_dt(struct device *dev, struct komeda_dev *mdev) · line 168

Quoted 7 lines
drivers/gpu/drm/arm/display/komeda/komeda_dev.c +0 -1
@@ -163,7 +163,6 @@ static int komeda_parse_dt(struct device *dev, struct komeda_dev *mdev)
  	ret = of_reserved_mem_device_init(dev);
  	if (ret && ret != -ENODEV)
  		return ret;
-	ret = 0;
 
  	for_each_available_child_of_node(np, child) {
  		if (of_node_name_eq(child, "pipeline")) {

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

maintainer Acked-by on v1 1/1
#2 lore raw
In reply to [email protected]
Quoted 6 lines · On Fri, Nov 27, 2020 at 11:00:27AM +0000, [email protected] wrote:

From: Carsten Haitzler <[email protected]>

ret is not actually read after this (only written in one case then returned), so this assign line is useless. This removes that assignment.

Best regards,
Liviu

Quoted 19 lines
---
 drivers/gpu/drm/arm/display/komeda/komeda_dev.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/arm/display/komeda/komeda_dev.c +0 -1
index 1d767473ba8a..eea76f51f662 100644
@@ -163,7 +163,6 @@ static int komeda_parse_dt(struct device *dev, struct komeda_dev *mdev)
 	ret = of_reserved_mem_device_init(dev);
 	if (ret && ret != -ENODEV)
 		return ret;
-	ret = 0;
 
 	for_each_available_child_of_node(np, child) {
 		if (of_node_name_eq(child, "pipeline")) {
Signature · 1 line
2.29.2
Signature · 12 lines
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel