* [PATCH] block: Modify the escape character
@ 2025-02-09 12:35 Donglei Wei
2025-02-13 3:38 ` Yu Kuai
0 siblings, 1 reply; 2+ messages in thread
From: Donglei Wei @ 2025-02-09 12:35 UTC (permalink / raw)
To: linux-block; +Cc: linux-kernel, 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>
---
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;
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] block: Modify the escape character
2025-02-09 12:35 [PATCH] block: Modify the escape character Donglei Wei
@ 2025-02-13 3:38 ` Yu Kuai
0 siblings, 0 replies; 2+ messages in thread
From: Yu Kuai @ 2025-02-13 3:38 UTC (permalink / raw)
To: Donglei Wei, linux-block; +Cc: linux-kernel, yukuai (C)
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;
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-02-13 3:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-09 12:35 [PATCH] block: Modify the escape character Donglei Wei
2025-02-13 3:38 ` Yu Kuai
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®