Subject: Re: [net-next PATCH v5 02/10] octeontx2-pf: RVU representor driver

From: Simon Horman <[email-masked]>
Date: Mon, 17 Jun 2024 20:49:53 +0100

On Sat, Jun 15, 2024 at 05:11:53PM +0200, Markus Elfring wrote:
> > This patch adds basic driver for the RVU representor.
> …
> 
> Please improve such a change description with imperative wordings.
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.10-rc3#n94
> 
> Can an adjusted summary phrase become also a bit more helpful?
> https://elixir.bootlin.com/linux/v6.10-rc3/source/Documentation/process/maintainer-tip.rst#L124
> 
> 
> …
> > +static int rvu_get_rep_cnt(struct otx2_nic *priv)
> > +{
> …
> > +	mutex_lock(&priv->mbox.lock);
> > +	req = otx2_mbox_alloc_msg_get_rep_cnt(&priv->mbox);
> …
> > +exit:
> > +	mutex_unlock(&priv->mbox.lock);
> > +	return err;
> > +}
> …
> 
> Would you become interested to apply a statement like “guard(mutex)(&priv->mbox.lock);”?
> https://elixir.bootlin.com/linux/v6.10-rc3/source/include/linux/mutex.h#L196
> 
> 
> …
> > +++ b/drivers/net/ethernet/marvell/octeontx2/nic/rep.h
> > @@ -0,0 +1,31 @@
> …
> > +#ifndef REP_H
> > +#define REP_H
> …
> 
> Can unique include guards be more desirable also for this software?

As Andrew Lunn said eleswhere [1]:

"We decided for netdev that guard() was too magical, at least for the
 moment. Lets wait a few years to see how it pans out. scoped_guard()
 is however O.K."

[1] https://lore.kernel.org/netdev/[email-masked]/