[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6fb9612f-b049-427f-a643-e1123a7478c7@redhat.com>
Date: Tue, 18 Feb 2025 13:31:38 +0100
From: Paolo Abeni <pabeni@...hat.com>
To: Nick Child <nnac123@...ux.ibm.com>
Cc: Simon Horman <horms@...nel.org>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, haren@...ux.ibm.com, ricklind@...ibm.com,
nick.child@....com, jacob.e.keller@...el.com,
David Laight <david.laight.linux@...il.com>
Subject: Re: [PATCH 1/3] hexdump: Implement macro for converting large buffers
On 2/17/25 4:09 PM, Nick Child wrote:
> Thank you David and Simon for testing and review!
>
> On Sun, Feb 16, 2025 at 11:24:30AM +0000, David Laight wrote:
>>
>> I just changed the prototypes (include/linux/printk.h) to make both
>> rowsize and groupsize 'unsigned int'.
>> The same change in lib/hexdump.c + changing the local 'i, linelen, remaining'
>> to unsigned int and it all compiled.
>>
>> FWIW that hexdump code is pretty horrid (especially if groupsize != 1).
>>
>
> Given this discussion and my own head-scratching, I think I will take a
> closer look at hex_dump_to_buffer.
>
> I was trying to avoid editing this function due the number of callers it
> has across the kernel. But I think we can get away with keeping the
> API (but change args to uint's) and editing the body of the function
> to always iterate byte-by-byte, addding space chars where necessary. At the
> cost of a few more cycles, this will allow for more dynamic values
> for rowsize and groupsize and shorten the code up a bit. This would also
> address the "Side question" in my cover letter. Will send a v3
> regardless if I can figure that out or not.
>
> The return value of hex_dump_to_buffer on error still irks me a bit but
> I don't think that can easily be changed.
For the new versions, please:
- respect the 24h grace period:
https://elixir.bootlin.com/linux/v6.11.8/source/Documentation/process/maintainer-netdev.rst#L15
- add the target tree in the subj prefix (in this case 'net-next')
- ensure all the patches in the series have consistent subj prefix,
otherwise patchwork will be fooled.
I think it would be better to avoid modifying hex_dump_to_buffer(), if
not necessary, and I think you could do so either changing the type used
in patch 2 or even dropping such patch.
/P
Powered by blists - more mailing lists