From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Cc: socketcan@hartkopp.net, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, linux-can@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Abaci Robot <abaci@linux.alibaba.com>
Subject: Re: [PATCH] can: raw: Remove NULL check before dev_{put, hold}
Date: Wed, 4 Oct 2023 12:25:55 +0200 [thread overview]
Message-ID: <20231004-shield-accurate-6b875651801b-mkl@pengutronix.de> (raw)
In-Reply-To: <20230825064656.87751-1-jiapeng.chong@linux.alibaba.com>
[-- Attachment #1: Type: text/plain, Size: 823 bytes --]
On 25.08.2023 14:46:56, Jiapeng Chong 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:
>
> ./net/can/raw.c:497:2-9: WARNING: NULL check before dev_{put, hold} functions is not needed.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=6231
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Applied to linux-can-next/testing.
regards,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung Nürnberg | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2023-10-04 10:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-25 6:46 [PATCH] can: raw: Remove NULL check before dev_{put, hold} Jiapeng Chong
2023-08-25 7:49 ` Oliver Hartkopp
2023-10-04 10:25 ` Marc Kleine-Budde [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=20231004-shield-accurate-6b875651801b-mkl@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=abaci@linux.alibaba.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jiapeng.chong@linux.alibaba.com \
--cc=kuba@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=socketcan@hartkopp.net \
/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;
as well as URLs for NNTP newsgroup(s).