]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net: mctp: tests: use actual address when creating dev with addr
authorJeremy Kerr <jk@codeconstruct.com.au>
Fri, 3 Apr 2026 02:21:04 +0000 (10:21 +0800)
committerJakub Kicinski <kuba@kernel.org>
Tue, 7 Apr 2026 01:04:02 +0000 (18:04 -0700)
Sashiko reports:

> This isn't a bug in the core networking code, but the addr parameter
> appears to be ignored here.

In mctp_test_create_dev_with_addr(), we are ignoring the addr argument
and just using `8`. Use the passed address instead.

All invocations use 8 anyway, so no effective change at present.

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Reviewed-by: Simon Horman <horms@verge.net.au>
Link: https://patch.msgid.link/20260403-dev-mctp-fix-test-addr-v1-1-b7fa789cdd9b@codeconstruct.com.au
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mctp/test/utils.c

index 2f79f8c1a2b44beb4917a9b92ffd72955a3a03c6..c3987d5ade7adc3a48d44b09dd3aebae7a59108c 100644 (file)
@@ -95,7 +95,7 @@ struct mctp_test_dev *mctp_test_create_dev_with_addr(mctp_eid_t addr)
        }
 
        dev->mdev->num_addrs = 1;
-       dev->mdev->addrs[0] = 8;
+       dev->mdev->addrs[0] = addr;
 
        return dev;
 }