From: Simon Horman <horms@kernel.org>
To: Peter Seiderer <ps.report@gmx.net>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Shuah Khan <shuah@kernel.org>
Subject: Re: [PATCH net-next v4 09/17] net: pktgen: align some variable declarations to the most common pattern
Date: Tue, 11 Feb 2025 10:15:37 +0000 [thread overview]
Message-ID: <20250211101537.GK554665@kernel.org> (raw)
In-Reply-To: <20250211102959.4aeeb806@gmx.net>
On Tue, Feb 11, 2025 at 10:29:59AM +0100, Peter Seiderer wrote:
> Hello Simon,
>
> On Thu, 6 Feb 2025 13:25:38 +0000, Simon Horman <horms@kernel.org> wrote:
>
> > On Wed, Feb 05, 2025 at 02:11:45PM +0100, Peter Seiderer wrote:
> > > Align some variable declarations (in get_imix_entries and get_labels) to
> > > the most common pattern (int instead of ssize_t/long) and adjust function
> > > return value accordingly.
> > >
> > > Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> >
> > Hi Peter,
> >
> > These comments are is true in general of this patchset, but particularly so
> > in the case of this patch:
> >
> > * I think a more succinct subject would be nice.
> > * I think the patch description should provide some reason
> > _why_ the change is being made.
>
> Yep, will improve...
>
> >
> > Also, specifically relating to this patch, I wonder if it's scope ought to
> > be extended. For example, the two callers of num_arg(), get_imix_entries() and
> > pktgen_if_write() assign the return value of num_arg() to len, which is now
> > an int in both functions. But num_args() returns a long.
>
> Aim was to get rid of the int/long mixture in the code (which works flawless
> because no one writes to proc with more than a few bytes AND count is limited
> to INT_MAX - PAGE_SIZE in vfs_write (see [1], [2])...
>
> I believe the clean way is to use
>
> size_t i, max;
> ssize_t len;
>
> consequently through out the code and adjust the function signatures
> accordingly...., will re-spin...
Thanks Peter,
I for one am all for things being consistent.
...
next prev parent reply other threads:[~2025-02-11 10:15 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-05 13:11 [PATCH net-next v4 00/17] Some pktgen fixes/improvments Peter Seiderer
2025-02-05 13:11 ` [PATCH net-next v4 01/17] net: pktgen: replace ENOTSUPP with EOPNOTSUPP Peter Seiderer
2025-02-05 13:11 ` [PATCH net-next v4 02/17] net: pktgen: enable 'param=value' parsing Peter Seiderer
2025-02-05 13:11 ` [PATCH net-next v4 03/17] net: pktgen: fix hex32_arg parsing for short reads Peter Seiderer
2025-02-05 13:11 ` [PATCH net-next v4 04/17] net: pktgen: fix 'rate 0' error handling (return -EINVAL) Peter Seiderer
2025-02-05 13:11 ` [PATCH net-next v4 05/17] net: pktgen: fix 'ratep " Peter Seiderer
2025-02-05 13:11 ` [PATCH net-next v4 06/17] net: pktgen: fix ctrl interface command parsing Peter Seiderer
2025-02-05 13:11 ` [PATCH net-next v4 07/17] net: pktgen: fix access outside of user given buffer in pktgen_thread_write() Peter Seiderer
2025-02-05 13:11 ` [PATCH net-next v4 08/17] net: pktgen: use defines for the various dec/hex number parsing digits lengths Peter Seiderer
2025-02-06 13:14 ` Simon Horman
2025-02-05 13:11 ` [PATCH net-next v4 09/17] net: pktgen: align some variable declarations to the most common pattern Peter Seiderer
2025-02-06 13:25 ` Simon Horman
2025-02-11 9:29 ` Peter Seiderer
2025-02-11 10:15 ` Simon Horman [this message]
2025-02-05 13:11 ` [PATCH net-next v4 10/17] net: pktgen: remove extra tmp variable (re-use len instead) Peter Seiderer
2025-02-06 13:12 ` Simon Horman
2025-02-05 13:11 ` [PATCH net-next v4 11/17] net: pktgen: remove some superfluous variable initializing Peter Seiderer
2025-02-06 13:11 ` Simon Horman
2025-02-05 13:11 ` [PATCH net-next v4 12/17] net: pktgen: fix mpls maximum labels list parsing Peter Seiderer
2025-02-06 13:04 ` Simon Horman
2025-02-05 13:11 ` [PATCH net-next v4 13/17] net: pktgen: fix access outside of user given buffer in pktgen_if_write() Peter Seiderer
2025-02-06 16:01 ` Simon Horman
2025-02-05 13:11 ` [PATCH net-next v4 14/17] net: pktgen: hex32_arg/num_arg error out in case no characters are available Peter Seiderer
2025-02-06 16:04 ` Simon Horman
2025-02-05 13:11 ` [PATCH net-next v4 15/17] net: pktgen: num_arg error out in case no valid character is parsed Peter Seiderer
2025-02-05 13:11 ` [PATCH net-next v4 16/17] net: pktgen: fix mpls reset parsing Peter Seiderer
2025-02-05 13:11 ` [PATCH net-next v4 17/17] selftest: net: add proc_net_pktgen Peter Seiderer
2025-02-06 13:51 ` [PATCH net-next v4 00/17] Some pktgen fixes/improvments Simon Horman
2025-02-11 9:36 ` Peter Seiderer
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=20250211101537.GK554665@kernel.org \
--to=horms@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=ps.report@gmx.net \
--cc=shuah@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.