From: Jens Axboe <axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org>
To: "Jiri Slaby (SUSE)"
<jirislaby-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Martin Liska <mliska-AlSwsSmVLrQ@public.gmane.org>,
Josef Bacik <josef-DigfWCa+lFGyeJad7bwFQA@public.gmane.org>,
cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-block-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v3] block/blk-iocost (gcc13): keep large values in a new enum
Date: Wed, 14 Dec 2022 09:56:48 -0700 [thread overview]
Message-ID: <974973f8-c703-59aa-5afe-40b33429fdbb@kernel.dk> (raw)
In-Reply-To: <20221213120826.17446-1-jirislaby-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
On 12/13/22 5:08 AM, Jiri Slaby (SUSE) wrote:
> 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 anonumois enum with large values to a separate enum, so
anonymous?
--
Jens Axboe
next prev parent reply other threads:[~2022-12-14 16:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-13 12:08 [PATCH v3] block/blk-iocost (gcc13): keep large values in a new enum Jiri Slaby (SUSE)
[not found] ` <20221213120826.17446-1-jirislaby-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2022-12-14 16:56 ` Jens Axboe [this message]
2022-12-14 16:56 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=974973f8-c703-59aa-5afe-40b33429fdbb@kernel.dk \
--to=axboe-tswwg44o7x1aa/9udqfwiw@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=jirislaby-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=josef-DigfWCa+lFGyeJad7bwFQA@public.gmane.org \
--cc=linux-block-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mliska-AlSwsSmVLrQ@public.gmane.org \
--cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox