All of lore.kernel.org
 help / color / mirror / Atom feed
From: Louis Peens <louis.peens@corigine.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Denis Arefev <arefev@swemel.ru>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	oss-drivers@corigine.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org
Subject: Re: [PATCH] nfp: flower: Added pointer check and continue.
Date: Mon, 20 Nov 2023 09:04:36 +0200	[thread overview]
Message-ID: <ZVsFBACC05VrrCfw@LouisNoVo> (raw)
In-Reply-To: <20231118202207.16a60834@kernel.org>

On Sat, Nov 18, 2023 at 08:22:07PM -0800, Jakub Kicinski wrote:
> On Fri, 17 Nov 2023 16:27:17 +0200 Louis Peens wrote:
> > >                 acti_netdevs = kmalloc_array(entry->slave_cnt,
> > >                                              sizeof(*acti_netdevs), GFP_KERNEL);
> > > 
> 
> Unnecessary new line, please remove it.
> There should be no empty lines between call and error check.
> 
> > > +               if (!acti_netdevs) {
> > > +                       schedule_delayed_work(&lag->work, NFP_FL_LAG_DELAY);
> > > +                       continue;
> > > +               }
> > > +  
> > Thanks for reporting this Denis, it definitely seems to be an oversight.
> > Would you mind adding a 'nfp_flower_cmsg_warn' here as well, so that
> > this case does not go undetected? Maybe something like "cannot
> > allocate memory for group processing" can work.
> 
> There's a checkpatch check against printing warnings on allocation
> failures. Kernel will complain loudly on OOM, anyway, there's no need
> for a local print.
Ah, thanks Jakub, I did not know that this is frowned upon. But I have
not thought about OOM - it would indeed not be a silent failure.

In that case I would be quite happy to add my Ack to v2 with the newline
comment addressed.
> -- 
> pw-bot: cr

      reply	other threads:[~2023-11-20  7:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-17 12:57 [PATCH] nfp: flower: Added pointer check and continue Denis Arefev
2023-11-17 14:27 ` Louis Peens
2023-11-19  4:22   ` Jakub Kicinski
2023-11-20  7:04     ` Louis Peens [this message]

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=ZVsFBACC05VrrCfw@LouisNoVo \
    --to=louis.peens@corigine.com \
    --cc=arefev@swemel.ru \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lvc-project@linuxtesting.org \
    --cc=netdev@vger.kernel.org \
    --cc=oss-drivers@corigine.com \
    --cc=pabeni@redhat.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.