All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: wei.fang@oss.nxp.com
Cc: imx@lists.linux.dev, Frank.Li@kernel.org
Subject: Re: [PATCH net-next 07/14] net: enetc: decouple BPT logical config from hardware wire format
Date: Sat, 05 Dec 2026 07:11:17 +0000	[thread overview]
Message-ID: <sashiko-outbox-251203@kernel.org> (raw)
In-Reply-To: <20261204071410.692071-8-wei.fang@oss.nxp.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] net: enetc: ntmp_bpt_update_entry() drops const on read-only
  entry parameter
--

commit fbe7cf81ae49d6c8c8ad83bd20d5b13948b8a75d
Author: Wei Fang <wei.fang@nxp.com>

net: enetc: decouple BPT logical config from hardware wire format

This commit introduces a version-agnostic struct bpt_entry_data with
native CPU types, moves the BPT hardware wire structures into
ntmp_private.h with a v0 pack callback, and updates
ntmp_bpt_update_entry() and the netc DSA driver to use the new logical
structure.

> diff --git a/include/linux/fsl/ntmp.h b/include/linux/fsl/ntmp.h
> index 23a612ec0b969..c54bf95739960 100644
> --- a/include/linux/fsl/ntmp.h
> +++ b/include/linux/fsl/ntmp.h

[ ... ]

> @@ -319,8 +320,8 @@ int ntmp_ett_update_entry(struct ntmp_user *user,
>  			  const struct ett_entry_data *entry);
>  int ntmp_ett_delete_entry(struct ntmp_user *user, u32 entry_id);
>  int ntmp_ect_update_entry(struct ntmp_user *user, u32 entry_id);
> -int ntmp_bpt_update_entry(struct ntmp_user *user, u32 entry_id,
> -			  const struct bpt_cfge_data *cfge);
> +int ntmp_bpt_update_entry(struct ntmp_user *user,
> +			  struct bpt_entry_data *entry);

[Severity: Low]
Should entry remain const in ntmp_bpt_update_entry() (both here and in
drivers/net/ethernet/freescale/enetc/ntmp.c)?

ntmp_bpt_update_entry() only reads entry->entry_id and passes entry to
ops->pack(), which takes a const void *.  Dropping const prevents callers
with a const struct bpt_entry_data pointer from calling it without a cast
and diverges from sibling helpers like ntmp_ett_update_entry().

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261204071410.692071-1-wei.fang@oss.nxp.com?part=7

  reply	other threads:[~2026-12-05  7:11 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04  7:13 [PATCH net-next 00/14] net: enetc: refactor NTMP table handling and add generic helpers wei.fang
2026-12-04  7:13 ` [PATCH net-next 01/14] net: enetc: use an ID-indexed array to track NTMP table versions wei.fang
2026-12-04  7:13 ` [PATCH net-next 02/14] net: enetc: decouple MAFT logical config from hardware wire format wei.fang
2026-12-04  7:13 ` [PATCH net-next 03/14] net: enetc: decouple IPFT " wei.fang
2026-12-04  7:14 ` [PATCH net-next 04/14] net: enetc: decouple FDBT " wei.fang
2026-12-05  7:11   ` sashiko-bot
2026-12-04  7:14 ` [PATCH net-next 05/14] net: enetc: decouple VFT " wei.fang
2026-12-05  7:11   ` sashiko-bot
2026-12-04  7:14 ` [PATCH net-next 06/14] net: enetc: decouple ETT " wei.fang
2026-12-04  7:14 ` [PATCH net-next 07/14] net: enetc: decouple BPT " wei.fang
2026-12-05  7:11   ` sashiko-bot [this message]
2026-12-04  7:14 ` [PATCH net-next 08/14] net: enetc: add generic ntmp_add_entry_by_id() helper wei.fang
2026-12-05  7:11   ` sashiko-bot
2026-12-04  7:14 ` [PATCH net-next 09/14] net: enetc: simplify callers of ntmp_query_entry_by_id() wei.fang
2026-12-04  7:14 ` [PATCH net-next 10/14] net: enetc: add kernel-doc for ntmp_delete_entry_by_id() wei.fang
2026-12-04  7:14 ` [PATCH net-next 11/14] net: enetc: add a generic helper to update an NTMP entry by entry ID wei.fang
2026-12-05  7:11   ` sashiko-bot
2026-12-04  7:14 ` [PATCH net-next 12/14] net: enetc: convert ntmp_ect_update_entry() to the generic update helper wei.fang
2026-12-04  7:14 ` [PATCH net-next 13/14] net: enetc: add a generic helper to add an NTMP entry by key wei.fang
2026-12-05  7:11   ` sashiko-bot
2026-12-04  7:14 ` [PATCH net-next 14/14] net: enetc: convert the RSST to the generic NTMP entry helpers wei.fang

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=sashiko-outbox-251203@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=Frank.Li@kernel.org \
    --cc=imx@lists.linux.dev \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=wei.fang@oss.nxp.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 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.