Skip to content

Commit 9168d12

Browse files
Bob Pearsonjgunthorpe
authored andcommitted
RDMA/rxe: Replace exists by rxe in rxe.c
'exists' looks like a boolean. This patch replaces it by the normal name used for the rxe device, 'rxe', which should be a little less confusing. The second rxe_dbg() message is incorrect since rxe is known to be NULL and this will cause a seg fault if this message were ever sent. Replace it by pr_debug for the moment. Fixes: c6aba5e ("RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe.c") Link: https://lore.kernel.org/r/20230303221623.8053-2-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
1 parent aa4d540 commit 9168d12

File tree

1 file changed

+6
-6
lines changed
  • drivers/infiniband/sw/rxe

1 file changed

+6
-6
lines changed

drivers/infiniband/sw/rxe/rxe.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ int rxe_add(struct rxe_dev *rxe, unsigned int mtu, const char *ibdev_name)
175175

176176
static int rxe_newlink(const char *ibdev_name, struct net_device *ndev)
177177
{
178-
struct rxe_dev *exists;
178+
struct rxe_dev *rxe;
179179
int err = 0;
180180

181181
if (is_vlan_dev(ndev)) {
@@ -184,17 +184,17 @@ static int rxe_newlink(const char *ibdev_name, struct net_device *ndev)
184184
goto err;
185185
}
186186

187-
exists = rxe_get_dev_from_net(ndev);
188-
if (exists) {
189-
ib_device_put(&exists->ib_dev);
190-
rxe_dbg(exists, "already configured on %s\n", ndev->name);
187+
rxe = rxe_get_dev_from_net(ndev);
188+
if (rxe) {
189+
ib_device_put(&rxe->ib_dev);
190+
rxe_dbg(rxe, "already configured on %s\n", ndev->name);
191191
err = -EEXIST;
192192
goto err;
193193
}
194194

195195
err = rxe_net_add(ibdev_name, ndev);
196196
if (err) {
197-
rxe_dbg(exists, "failed to add %s\n", ndev->name);
197+
pr_debug("failed to add %s\n", ndev->name);
198198
goto err;
199199
}
200200
err:

0 commit comments

Comments
 (0)