This is a note to let you know that I've just added the patch titled block/blk-iocost (gcc13): keep large values in a new enum to the 6.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: block-blk-iocost-gcc13-keep-large-values-in-a-new-enum.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From ff1cc97b1f4c10db224f276d9615b22835b8c424 Mon Sep 17 00:00:00 2001 From: "Jiri Slaby (SUSE)" <jirislaby@xxxxxxxxxx> 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) <jirislaby@xxxxxxxxxx> 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 <mliska@xxxxxxx> Cc: Tejun Heo <tj@xxxxxxxxxx> Cc: Josef Bacik <josef@xxxxxxxxxxxxxx> Cc: Jens Axboe <axboe@xxxxxxxxx> Cc: cgroups@xxxxxxxxxxxxxxx Cc: linux-block@xxxxxxxxxxxxxxx Signed-off-by: Jiri Slaby (SUSE) <jirislaby@xxxxxxxxxx> Link: https://lore.kernel.org/r/20221213120826.17446-1-jirislaby@xxxxxxxxxx Signed-off-by: Jens Axboe <axboe@xxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- 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 Patches currently in stable-queue which might be from jirislaby@xxxxxxxxxx are queue-6.1/linux-vt_buffer.h-allow-either-builtin-or-modular-fo.patch queue-6.1/net-wwan-t7xx-do-not-compile-with-werror.patch queue-6.1/bonding-gcc13-synchronize-bond_-a-t-lb_xmit-types.patch queue-6.1/wifi-ath11k-synchronize-ath11k_mac_he_gi_to_nl80211_he_gi-s-return-type.patch queue-6.1/thunderbolt-use-correct-type-in-tb_port_is_clx_enabled-prototype.patch queue-6.1/block-blk-iocost-gcc13-keep-large-values-in-a-new-enum.patch queue-6.1/wireguard-timers-cast-enum-limits-members-to-int-in-prints.patch