Re: [PATCH] blk-throttle: Fix W=1 build issue in tg_prfill_limit()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 26, 2024 at 08:46:24AM +0000, John Garry wrote:
> On 26/03/2024 07:03, Christoph Hellwig wrote:
> > On Mon, Mar 25, 2024 at 12:19:05PM +0000, John Garry wrote:
> > > For when using gcc 8 and above, the following warnings can be seen when
> > > compiling blk-throttle.c with W=1:
> > 
> > Why is this function even using these local buffers vs a sequence
> > of separate seq_printf calls that would get rid of these pointless
> > on-stack buffers?
> 
> Currently a combo of snprintf and seq_printf is used, a strategy which seems
> to go as far back as 2ee867dcfa2ea (2015), when it was a much simpler print.
> All the other code in this area only uses seq_printf, so it seems that the
> author(s) prefer this way here.
> 
> Here's how the current code could look (using only seq_printf):

That looks much better, thanks.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux