From: Stephen Hemminger <stephen@networkplumber.org>
To: Yang Li <yang.lee@linux.alibaba.com>
Cc: 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: Thu, 11 May 2023 08:54:53 -0700 [thread overview]
Message-ID: <20230511085453.25ef33fc@hermes.local> (raw)
In-Reply-To: <20230511072119.72536-1-yang.lee@linux.alibaba.com>
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?
next prev parent reply other threads:[~2023-05-11 15:55 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 [this message]
2023-05-12 14:08 ` Simon Horman
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=20230511085453.25ef33fc@hermes.local \
--to=stephen@networkplumber.org \
--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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox