From: Yu Kuai <yukuai1@huaweicloud.com>
To: Donglei Wei <veidongray@qq.com>, linux-block@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, "yukuai (C)" <yukuai3@huawei.com>
Subject: Re: [PATCH] block: Modify the escape character
Date: Thu, 13 Feb 2025 11:38:21 +0800 [thread overview]
Message-ID: <f5182f1c-eec9-9144-114c-1bdbd2571990@huaweicloud.com> (raw)
In-Reply-To: <tencent_208A5FC4C96DBFC52E02FC3CC394272EFB0A@qq.com>
Hi,
Please change the title.
在 2025/02/09 20:35, Donglei Wei 写道:
> The iocg->cfg_weight/WEIGHT_ONE code has a data type of long unsigned int,
> which is escaped using %u, which generates a compilation warning.
>
> Signed-off-by: Donglei Wei <veidongray@qq.com>
> ---
I never see this warning, is this because USEC_PER_MSEC is long, causing
other fields in the same enum to be long?
Thanks,
Kuai
> block/blk-iocost.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/block/blk-iocost.c b/block/blk-iocost.c
> index 65a1d4427ccf..693e642d4235 100644
> --- a/block/blk-iocost.c
> +++ b/block/blk-iocost.c
> @@ -3078,7 +3078,7 @@ static u64 ioc_weight_prfill(struct seq_file *sf, struct blkg_policy_data *pd,
> struct ioc_gq *iocg = pd_to_iocg(pd);
>
> if (dname && iocg->cfg_weight)
> - seq_printf(sf, "%s %u\n", dname, iocg->cfg_weight / WEIGHT_ONE);
> + seq_printf(sf, "%s %lu\n", dname, iocg->cfg_weight / WEIGHT_ONE);
> return 0;
> }
>
> @@ -3088,7 +3088,7 @@ static int ioc_weight_show(struct seq_file *sf, void *v)
> struct blkcg *blkcg = css_to_blkcg(seq_css(sf));
> struct ioc_cgrp *iocc = blkcg_to_iocc(blkcg);
>
> - seq_printf(sf, "default %u\n", iocc->dfl_weight / WEIGHT_ONE);
> + seq_printf(sf, "default %lu\n", iocc->dfl_weight / WEIGHT_ONE);
> blkcg_print_blkgs(sf, blkcg, ioc_weight_prfill,
> &blkcg_policy_iocost, seq_cft(sf)->private, false);
> return 0;
>
prev parent reply other threads:[~2025-02-13 3:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-09 12:35 Donglei Wei
2025-02-13 3:38 ` Yu Kuai [this message]
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=f5182f1c-eec9-9144-114c-1bdbd2571990@huaweicloud.com \
--to=yukuai1@huaweicloud.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=veidongray@qq.com \
--cc=yukuai3@huawei.com \
/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
all inboxes | Powered by JetHome®