Skip to contentSkip to conversation

IB/core: missing curly braces in ib_find_gid()

PATCH Applied Dan Carpenter 4 participants 6 messages Aug 18, 2015 – Sep 3, 2015 1 message not in the archive

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

PATCH 1/1 IB/core: missing curly braces in ib_find_gid()

Smatch says that, based on the indenting, we should probably add curly braces here.

Fixes 230145ff8124 ('IB/core: Add RoCE GID table management')
drivers/infiniband/core/device.c +2 -1
index 258b3f7..5d5bbae 100644
@@ -807,9 +807,10 @@ int ib_find_gid(struct ib_device *device, union ib_gid *gid,
 	for (port = rdma_start_port(device); port <= rdma_end_port(device); ++port) {
 		if (rdma_cap_roce_gid_table(device, port)) {
 			if (!ib_cache_gid_find_by_port(device, gid, port,
-						       NULL, index))
+						       NULL, index)) {
 				*port_num = port;
 				return 0;
+			}
 		}
 
 		for (i = 0; i < device->port_immutable[port].gid_tbl_len; ++i) {
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Dan Carpenter

Smatch says that, based on the indenting, we should probably add curly braces here.

Fixes 230145ff8124 ('IB/core: Add RoCE GID table management')
Quoted 17 lines
drivers/infiniband/core/device.c +2 -1
index 258b3f7..5d5bbae 100644
@@ -807,9 +807,10 @@ int ib_find_gid(struct ib_device *device, union ib_gid *gid,
 	for (port = rdma_start_port(device); port <= rdma_end_port(device); ++port) {
 		if (rdma_cap_roce_gid_table(device, port)) {
 			if (!ib_cache_gid_find_by_port(device, gid, port,
-						       NULL, index))
+						       NULL, index)) {
 				*port_num = port;
 				return 0;
+			}
 		}
 
 		for (i = 0; i < device->port_immutable[port].gid_tbl_len; ++i) {

A message that is not in the archive (sent off-list or not yet received): 20150829011040.GA2713-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org

#4 lore raw
Quoted 5 lines · Doug Ledford
Quoted 4 lines · ira.weiny
Quoted 3 lines · Dan Carpenter

Smatch says that, based on the indenting, we should probably add curly braces here.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Fixes 230145ff8124 ('IB/core: Add RoCE GID table management')

I've picked this patch up (earlier today), so I missed your reviewed-by:
tag. Added.

wait, Doug, when the offending patch goes upstream, their commit ID will not be the one
denoted here, right? I would suggest that you either hold off with this fix till the other patch
goes upstream in 4,3-rc1 and you have a proper ID or squash it there now. BTW - the way
net-next is organized/managed, pre-linus-tree commit ID remain the same also after they land there,
so in that respect and other linux-rdma maintenance related aspects we discussed during LPC - it
would be good if you can talk to Dave and see how he gets things going for net-next

Or

#5 lore raw
Quoted 10 lines · Or Gerlitz
Quoted 9 lines · Doug Ledford
Quoted 8 lines · ira.weiny
Quoted 6 lines · Dan Carpenter

Smatch says that, based on the indenting, we should probably add curly braces here.

Fixes 230145ff8124 ('IB/core: Add RoCE GID table management')
Quoted 8 lines
Quoted 4 lines
Quoted 1 line

I've picked this patch up (earlier today), so I missed your reviewed-by:
tag. Added.

wait, Doug, when the offending patch goes upstream, their commit ID will not be the one
denoted here, right?

Fair point...

Quoted 3 lines

I would suggest that you either hold off with
this fix till the other patch
goes upstream in 4,3-rc1 and you have a proper ID

I have a proper ID now. Since I've put together my final k.o/for-4.3 branch, the ID is fixed.

Quoted 2 lines

or squash it there
now.

This patch is from someone different than the patch it fixes, so it wouldn't be right to squash it into their patch. I fixed up the Fixes:
line instead.

Quoted 7 lines

BTW - the way
net-next is organized/managed, pre-linus-tree commit ID remain the same also after they land there,
so in that respect and other linux-rdma maintenance related aspects we discussed during LPC - it
would be good if you can talk to Dave and see how he gets things going for net-next

I'm going to be doing things differently for 4.4. We'll see if that resolves the issues you are unhappy about.

Signature · 2 lines
Doug Ledford <[email protected]>
              GPG KeyID: 0E572FDD
Applied
#6 lore raw
In reply to Dan Carpenter
Quoted 5 lines · Dan Carpenter

Smatch says that, based on the indenting, we should probably add curly braces here.

Fixes 230145ff8124 ('IB/core: Add RoCE GID table management')

Thanks, applied.

Quoted 17 lines
drivers/infiniband/core/device.c +2 -1
index 258b3f7..5d5bbae 100644
@@ -807,9 +807,10 @@ int ib_find_gid(struct ib_device *device, union ib_gid *gid,
 	for (port = rdma_start_port(device); port <= rdma_end_port(device); ++port) {
 		if (rdma_cap_roce_gid_table(device, port)) {
 			if (!ib_cache_gid_find_by_port(device, gid, port,
-						       NULL, index))
+						       NULL, index)) {
 				*port_num = port;
 				return 0;
+			}
 		}
 
 		for (i = 0; i < device->port_immutable[port].gid_tbl_len; ++i) {
Signature · 2 lines
Doug Ledford <[email protected]>
              GPG KeyID: 0E572FDD