Jiri Slaby (SUSE) ff1cc97b1f block/blk-iocost (gcc13): keep large values in a new enum
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@suse.cz>
Cc: Tejun Heo <tj@kernel.org>
Cc: Josef Bacik <josef@toxicpanda.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: cgroups@vger.kernel.org
Cc: linux-block@vger.kernel.org
Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20221213120826.17446-1-jirislaby@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-12-14 09:56:10 -07:00
..
2022-12-06 10:18:27 -07:00
2022-12-13 10:43:59 -08:00
2022-12-13 10:43:59 -08:00
2022-12-13 10:43:59 -08:00
2022-10-07 09:19:14 -07:00
2022-11-01 09:12:24 -06:00
2022-12-13 10:43:59 -08:00
2022-12-13 10:43:59 -08:00
2022-12-13 10:43:59 -08:00
2022-02-02 07:49:59 -07:00
2022-11-16 11:32:53 -07:00
2022-12-13 10:43:59 -08:00
2022-12-13 10:43:59 -08:00
2022-03-07 12:48:35 -07:00