RDMA/mana_ib: Fix compilation error
Subsystems (2)
PATCH 1/1 RDMA/mana_ib: Fix compilation error
The compilation with CONFIG_WERROR=y is broken:
.../hw/mana/device.c:88:6: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
if (!upper_ndev) {
^~~~~~~~~~~Fix this by assigning the ret to -ENODEV in respective condition.
--- drivers/infiniband/hw/mana/device.c | 1 + 1 file changed, 1 insertion(+)
drivers/infiniband/hw/mana/device.c +1 -0
@@ -88,6 +88,7 @@ static int mana_ib_probe(struct auxiliary_device *adev,if (!upper_ndev) {rcu_read_unlock ();ibdev_err (&dev->ib_dev,"Failed to get master netdev" ); + ret = -ENODEV ; goto free_ib_device; }ether_addr_copy (mac_addr, upper_ndev->dev_addr);
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac
Quoted 6 lines
Subject: [PATCH v1 1/1] RDMA/mana_ib: Fix compilation error
The compilation with
CONFIG_WERROR=yis broken:
.../hw/mana/device.c:88:6: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
Quoted 7 lines
if (!upper_ndev) { ^~~~~~~~~~~Fix this by assigning the ret to
-ENODEVin respective condition.Fixes 8b184e4f1c32 ("RDMA/mana_ib: Enable RoCE on port 1")Signed-off-by Andy Shevchenko <[email protected]>
Quoted 19 lines
--- drivers/infiniband/hw/mana/device.c | 1 + 1 file changed, 1 insertion(+)drivers/infiniband/hw/mana/device.c +1
-1@@ -88,6 +88,7 @@ static int mana_ib_probe(struct auxiliary_device *adev,if (!upper_ndev) {rcu_read_unlock ();ibdev_err (&dev->ib_dev,"Failed to get master netdev" ); + ret = -ENODEV ; goto free_ib_device; }ether_addr_copy (mac_addr, upper_ndev->dev_addr); --2.43.0.rc1.1336.g36b5255a03ac
Jason Gunthorpe
maintainerQuoted 6 lines · Andy Shevchenko
The compilation with
CONFIG_WERROR=yis broken:
.../hw/mana/device.c:88:6: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]if (!upper_ndev) { ^~~~~~~~~~~
Quoted 7 lines
Fix this by assigning the ret to
-ENODEVin respective condition.Fixes 8b184e4f1c32 ("RDMA/mana_ib: Enable RoCE on port 1")Signed-off-by Andy Shevchenko <[email protected]>--- drivers/infiniband/hw/mana/device.c | 1 + 1 file changed, 1 insertion(+)
This was fixed in
commit f88320b698ad099a2f742adfb9f87177bfffe0c5
Author: Konstantin Taranov <[email protected]> Date: Tue Apr 23 07:15:51 2024 -0700
RDMA/mana_ib: Fix missing ret value
Thanks,
Jason
Quoted 9 lines · Jason Gunthorpe
Quoted 8 lines · Andy Shevchenko
The compilation with
CONFIG_WERROR=yis broken:
.../hw/mana/device.c:88:6: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]if (!upper_ndev) { ^~~~~~~~~~~Fix this by assigning the ret to
-ENODEVin respective condition.
Quoted 7 lines
Quoted 5 lines
Fixes 8b184e4f1c32 ("RDMA/mana_ib: Enable RoCE on port 1")Signed-off-by Andy Shevchenko <[email protected]>--- drivers/infiniband/hw/mana/device.c | 1 + 1 file changed, 1 insertion(+)This was fixed in
Hmm... The below patch had been sent _after_ mine. What's wrong with mine patch?
Quoted 5 lines
commit
f88320b698ad099a2f742adfb9f87177bfffe0c5Author: Konstantin Taranov <[email protected]> Date: Tue Apr 23 07:15:51 2024 -0700RDMA/mana_ib: Fix missing ret value
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 16 lines · Andy Shevchenko
Quoted 15 lines · Jason Gunthorpe
Quoted 13 lines · Andy Shevchenko
The compilation with
CONFIG_WERROR=yis broken:
.../hw/mana/device.c:88:6: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]if (!upper_ndev) { ^~~~~~~~~~~Fix this by assigning the ret to
-ENODEVin respective condition.Fixes 8b184e4f1c32 ("RDMA/mana_ib: Enable RoCE on port 1")Signed-off-by Andy Shevchenko <[email protected]>--- drivers/infiniband/hw/mana/device.c | 1 + 1 file changed, 1 insertion(+)
Quoted 3 lines
Quoted 1 line
This was fixed in
Hmm... The below patch had been sent _after_ mine. What's wrong with mine patch?
Oh, my... Sorry, I missed PM, it was mine sent after that one! I guess time for weekend.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Jason Gunthorpe
maintainerQuoted 16 lines · Andy Shevchenko
Quoted 15 lines · Jason Gunthorpe
Quoted 13 lines · Andy Shevchenko
The compilation with
CONFIG_WERROR=yis broken:
.../hw/mana/device.c:88:6: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]if (!upper_ndev) { ^~~~~~~~~~~Fix this by assigning the ret to
-ENODEVin respective condition.Fixes 8b184e4f1c32 ("RDMA/mana_ib: Enable RoCE on port 1")Signed-off-by Andy Shevchenko <[email protected]>--- drivers/infiniband/hw/mana/device.c | 1 + 1 file changed, 1 insertion(+)
Quoted 4 lines
Quoted 1 line
This was fixed in
Hmm... The below patch had been sent _after_ mine. What's wrong with mine patch?
It wasn't
Your's:
Date: Tue, 23 Apr 2024 23:42:58 +0300 [thread overview]
Konstantin's:
Date: Tue, 23 Apr 2024 07:15:51 -0700 [thread overview]
He beat you by 6 hours, which is why I took his, yours didn't exist at the time I took it.
Jason