All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <simon.horman@corigine.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Yang Li <yang.lee@linux.alibaba.com>,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Abaci Robot <abaci@linux.alibaba.com>
Subject: Re: [PATCH] ipvlan: Remove NULL check before dev_{put, hold}
Date: Fri, 12 May 2023 16:08:36 +0200	[thread overview]
Message-ID: <ZF5IZIlUwncUXBHS@corigine.com> (raw)
In-Reply-To: <20230511085453.25ef33fc@hermes.local>

On Thu, May 11, 2023 at 08:54:53AM -0700, Stephen Hemminger wrote:
> On Thu, 11 May 2023 15:21:19 +0800
> Yang Li <yang.lee@linux.alibaba.com> wrote:
> 
> > The call netdev_{put, hold} of dev_{put, hold} will check NULL,
> > so there is no need to check before using dev_{put, hold},
> > remove it to silence the warning:
> > 
> > ./drivers/net/ipvlan/ipvlan_core.c:559:3-11: WARNING: NULL check before dev_{put, hold} functions is not needed.
> > 
> > Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> > Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4930
> > Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
> 
> Maybe add new coccinelle script for this? scripts/free/dev_hold.cocci?

FWIIW, I observe that Coccinelle flags this problem as per the log above.
But perhaps I am missing your point.

  reply	other threads:[~2023-05-12 14:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-11  7:21 [PATCH] ipvlan: Remove NULL check before dev_{put, hold} Yang Li
2023-05-11 12:56 ` Simon Horman
2023-05-11 15:54 ` Stephen Hemminger
2023-05-12 14:08   ` Simon Horman [this message]
2023-05-12  8:00 ` patchwork-bot+netdevbpf

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=ZF5IZIlUwncUXBHS@corigine.com \
    --to=simon.horman@corigine.com \
    --cc=abaci@linux.alibaba.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=stephen@networkplumber.org \
    --cc=yang.lee@linux.alibaba.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.