Re: [PATCH v3 net-next] net/intel: Replace manual array size calculation with ARRAY_SIZE

Dan Carpenter
2026-04-29T10:25:01Z

On Wed, Apr 29, 2026 at 11:01:46AM +0200, Przemek Kitszel wrote:
> F: Documentation/networking/device_drivers/ethernet/intel/
> F: drivers/net/ethernet/intel/
> F: drivers/net/ethernet/intel/*/
> F: include/linux/avf/virtchnl.h
> F: include/linux/net/intel/*/
>

Fine. Thanks. I can add this.

> Perhaps instead of you managing your script, and everybody else doing
> the same, there could be some extension added to MAINTAINERS file to
> encode the prefix?
>
> In our case, the prefix itself is a message for net maintainers:
> iwl or iwl-next means the patch will go first via our tree, and be sent
> later as a PR for net/net-next.
>
> Without the prefix it requires guessing what was the submitter intent.

We don't have any intent. So long as it gets merged who cares how it
happens?

> Most patches that go through IWL receive additional round of testing on
> real HW too, thanks to our VAL.
> Patches that go straight to net are just merged faster.
> As intel ethernet maintainer, I want our code tested more, instead of
> merged faster (in most cases).

All of this scripting could be done on your end. No matter how many
dozens of people you educate to add a different prefix it's always
going to be less reliable than just scripting it on your side.

Anyway, here is the relevant bit from my script. The other subsystem
that requires these is BPF but I only send bug reports for BPF issues.
You also need to do a git fetch of all the trees with subsystem rules.

regards,
dan carpenter

# Is this networking?
if grep -q netdev $MAIL_FILE && ! grep -q wireless $MAIL_FILE ; then
if [ "$FIXES_COMMIT" != "" ] ; then
if git merge-base --is-ancestor $FIXES_COMMIT net/main ; then
TREE="net"
elif git merge-base --is-ancestor $FIXES_COMMIT net-next/main ; then
TREE="net-next"
else
TREE="net-other"
fi
else
TREE="net-next"
fi
fi

# Is this Intel Wireless
if grep -q -w /iwlwifi/ $MAIL_FILE ; then
if [ "$FIXES_COMMIT" != "" ] ; then
if git merge-base --is-ancestor $FIXES_COMMIT iwlwifi/fixes ; then
TREE="iwlwifi"
elif git merge-base --is-ancestor $FIXES_COMMIT iwlwifi/next ; then
TREE="iwlwifi-next"
else
TREE="iwlwifi-other"
fi
else
TREE="iwlwifi-next"
fi
fi

# Otherwise if the commit is only required in next then put [PATCH next]
# in the subject.
if [ "$TREE" == "" ] ; then
if [ "$FIXES_COMMIT" != "" ] ; then
if ! git merge-base --is-ancestor $FIXES_COMMIT origin/master ; then
TREE="next"
fi
fi
fi