From: Greg Kroah-Hartman Date: Fri, 24 Sep 2021 12:28:55 +0000 (+0200) Subject: drop queue-5.14/ib-qib-fix-null-pointer-subtraction-compiler-warning.patch X-Git-Tag: v4.4.285~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d905529125431acbbd7c1fb4232ac7ce579981f7;p=thirdparty%2Fkernel%2Fstable-queue.git drop queue-5.14/ib-qib-fix-null-pointer-subtraction-compiler-warning.patch --- diff --git a/queue-5.14/ib-qib-fix-null-pointer-subtraction-compiler-warning.patch b/queue-5.14/ib-qib-fix-null-pointer-subtraction-compiler-warning.patch deleted file mode 100644 index 66822324be8..00000000000 --- a/queue-5.14/ib-qib-fix-null-pointer-subtraction-compiler-warning.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 404d8ee4fb767e1c2a19d57fb7e3a5b944bedb0b Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 3 Sep 2021 10:07:28 -0300 -Subject: IB/qib: Fix null pointer subtraction compiler warning - -From: Jason Gunthorpe - -[ Upstream commit 84f969e1c48ed3825986e91a0786e363d57f69d1 ] - ->> drivers/infiniband/hw/qib/qib_sysfs.c:411:1: warning: performing pointer subtraction with a null pointer has undefined behavior -+[-Wnull-pointer-subtraction] - QIB_DIAGC_ATTR(rc_resends); - ^~~~~~~~~~~~~~~~~~~~~~~~~~ - drivers/infiniband/hw/qib/qib_sysfs.c:408:51: note: expanded from macro 'QIB_DIAGC_ATTR' - .counter = &((struct qib_ibport *)0)->rvp.n_##N - (u64 *)0, \ - -Use offsetof and accomplish the type check using static_assert. - -Fixes: 4a7aaf88c89f ("RDMA/qib: Use attributes for the port sysfs") -Link: https://lore.kernel.org/r/0-v1-43ae3c759177+65-qib_type_jgg@nvidia.com -Reported-by: kernel test robot -Acked-by: Dennis Dalessandro -Signed-off-by: Jason Gunthorpe -Signed-off-by: Sasha Levin ---- - drivers/infiniband/hw/qib/qib_sysfs.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/drivers/infiniband/hw/qib/qib_sysfs.c b/drivers/infiniband/hw/qib/qib_sysfs.c -index d57e49de6650..452e2355d24e 100644 ---- a/drivers/infiniband/hw/qib/qib_sysfs.c -+++ b/drivers/infiniband/hw/qib/qib_sysfs.c -@@ -403,9 +403,11 @@ static ssize_t diagc_attr_store(struct ib_device *ibdev, u32 port_num, - } - - #define QIB_DIAGC_ATTR(N) \ -+ static_assert(&((struct qib_ibport *)0)->rvp.n_##N != (u64 *)NULL); \ - static struct qib_diagc_attr qib_diagc_attr_##N = { \ - .attr = __ATTR(N, 0664, diagc_attr_show, diagc_attr_store), \ -- .counter = &((struct qib_ibport *)0)->rvp.n_##N - (u64 *)0, \ -+ .counter = \ -+ offsetof(struct qib_ibport, rvp.n_##N) / sizeof(u64) \ - } - - QIB_DIAGC_ATTR(rc_resends); --- -2.33.0 - diff --git a/queue-5.14/series b/queue-5.14/series index 1ccc3756c91..08522f556c2 100644 --- a/queue-5.14/series +++ b/queue-5.14/series @@ -33,7 +33,6 @@ platform-chrome-sensorhub-add-trace-events-for-sampl.patch platform-chrome-cros_ec_trace-fix-format-warnings.patch s390-entry-make-oklabel-within-chkstg-macro-local.patch sunrpc-don-t-pause-on-incomplete-allocation.patch -ib-qib-fix-null-pointer-subtraction-compiler-warning.patch math-rational_kunit_test-should-depend-on-rational-i.patch init-move-usermodehelper_enable-to-populate_rootfs.patch kconfig.debug-drop-selecting-non-existing-hardlockup.patch