From: Greg Kroah-Hartman Date: Mon, 8 May 2023 05:55:25 +0000 (+0200) Subject: 6.1-stable patches X-Git-Tag: v5.15.111~45 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1314446e472b3570a25354c82c26fc580bc665c6;p=thirdparty%2Fkernel%2Fstable-queue.git 6.1-stable patches added patches: block-blk-iocost-gcc13-keep-large-values-in-a-new-enum.patch --- diff --git a/queue-6.1/block-blk-iocost-gcc13-keep-large-values-in-a-new-enum.patch b/queue-6.1/block-blk-iocost-gcc13-keep-large-values-in-a-new-enum.patch new file mode 100644 index 00000000000..8bdfae44eed --- /dev/null +++ b/queue-6.1/block-blk-iocost-gcc13-keep-large-values-in-a-new-enum.patch @@ -0,0 +1,55 @@ +From ff1cc97b1f4c10db224f276d9615b22835b8c424 Mon Sep 17 00:00:00 2001 +From: "Jiri Slaby (SUSE)" +Date: Tue, 13 Dec 2022 13:08:26 +0100 +Subject: block/blk-iocost (gcc13): keep large values in a new enum + +From: Jiri Slaby (SUSE) + +commit ff1cc97b1f4c10db224f276d9615b22835b8c424 upstream. + +Since gcc13, each member of an enum has the same type as the enum [1]. And +that is inherited from its members. Provided: + VTIME_PER_SEC_SHIFT = 37, + VTIME_PER_SEC = 1LLU << VTIME_PER_SEC_SHIFT, + ... + AUTOP_CYCLE_NSEC = 10LLU * NSEC_PER_SEC, +the named type is unsigned long. + +This generates warnings with gcc-13: + block/blk-iocost.c: In function 'ioc_weight_prfill': + block/blk-iocost.c:3037:37: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' + + block/blk-iocost.c: In function 'ioc_weight_show': + block/blk-iocost.c:3047:34: error: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int' + +So split the anonymous enum with large values to a separate enum, so +that they don't affect other members. + +[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36113 + +Cc: Martin Liska +Cc: Tejun Heo +Cc: Josef Bacik +Cc: Jens Axboe +Cc: cgroups@vger.kernel.org +Cc: linux-block@vger.kernel.org +Signed-off-by: Jiri Slaby (SUSE) +Link: https://lore.kernel.org/r/20221213120826.17446-1-jirislaby@kernel.org +Signed-off-by: Jens Axboe +Signed-off-by: Greg Kroah-Hartman +--- + block/blk-iocost.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/block/blk-iocost.c ++++ b/block/blk-iocost.c +@@ -232,7 +232,9 @@ enum { + + /* 1/64k is granular enough and can easily be handled w/ u32 */ + WEIGHT_ONE = 1 << 16, ++}; + ++enum { + /* + * As vtime is used to calculate the cost of each IO, it needs to + * be fairly high precision. For example, it should be able to diff --git a/queue-6.1/series b/queue-6.1/series index 6f2c97003b0..5ae6e771973 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -611,3 +611,4 @@ bonding-gcc13-synchronize-bond_-a-t-lb_xmit-types.patch wifi-ath11k-synchronize-ath11k_mac_he_gi_to_nl80211_he_gi-s-return-type.patch perf-auxtrace-fix-address-filter-entire-kernel-size.patch perf-intel-pt-fix-cyc-timestamps-after-standalone-cbr.patch +block-blk-iocost-gcc13-keep-large-values-in-a-new-enum.patch