From: Paolo Abeni <pabeni@redhat.com>
To: Nick Child <nnac123@linux.ibm.com>
Cc: Simon Horman <horms@kernel.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
haren@linux.ibm.com, ricklind@us.ibm.com, nick.child@ibm.com,
jacob.e.keller@intel.com,
David Laight <david.laight.linux@gmail.com>
Subject: Re: [PATCH 1/3] hexdump: Implement macro for converting large buffers
Date: Tue, 18 Feb 2025 13:31:38 +0100 [thread overview]
Message-ID: <6fb9612f-b049-427f-a643-e1123a7478c7@redhat.com> (raw)
In-Reply-To: <Z7NRLmcWJFNkyHGN@li-4c4c4544-0047-5210-804b-b8c04f323634.ibm.com>
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
next prev parent reply other threads:[~2025-02-18 12:31 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-14 16:24 [PATCH v2 0/3] Use new for_each macro to create hexdumps Nick Child
2025-02-14 16:24 ` [PATCH 1/3] hexdump: Implement macro for converting large buffers Nick Child
[not found] ` <87tt8wflt5.fsf@linux.ibm.com>
2025-02-14 18:33 ` Nick Child
2025-02-15 16:36 ` Simon Horman
2025-02-15 17:40 ` David Laight
2025-02-15 17:46 ` David Laight
2025-02-16 9:32 ` Simon Horman
2025-02-16 11:24 ` David Laight
2025-02-17 15:09 ` Nick Child
2025-02-18 12:31 ` Paolo Abeni [this message]
2025-02-14 16:24 ` [PATCH v2 2/3] hexdump: Use for_each macro in print_hex_dump Nick Child
2025-02-14 16:24 ` [PATCH v2 3/3] ibmvnic: Print data buffers with kernel API's Nick Child
-- strict thread matches above, loose matches on Subject: below --
2025-01-13 22:17 [PATCH 0/3] Use new for_each macro to create hexdumps Nick Child
2025-01-13 22:17 ` [PATCH 1/3] hexdump: Implement macro for converting large buffers Nick Child
2025-01-14 14:48 ` Simon Horman
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=6fb9612f-b049-427f-a643-e1123a7478c7@redhat.com \
--to=pabeni@redhat.com \
--cc=david.laight.linux@gmail.com \
--cc=haren@linux.ibm.com \
--cc=horms@kernel.org \
--cc=jacob.e.keller@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nick.child@ibm.com \
--cc=nnac123@linux.ibm.com \
--cc=ricklind@us.ibm.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®