All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee@kernel.org>
To: Yang Li <yang.lee@linux.alibaba.com>
Cc: pavel@ucw.cz, linux-leds@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Abaci Robot <abaci@linux.alibaba.com>
Subject: Re: [PATCH -next] leds: trigger: netdev: NULL check before dev_{put, hold}
Date: Thu, 18 May 2023 13:20:47 +0100	[thread overview]
Message-ID: <20230518122047.GK404509@google.com> (raw)
In-Reply-To: <20230511070820.52731-1-yang.lee@linux.alibaba.com>

On Thu, 11 May 2023, Yang Li 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 warnings:
> 
> ./drivers/leds/trigger/ledtrig-netdev.c:291:3-10: WARNING: NULL check before dev_{put, hold} functions is not needed.
> ./drivers/leds/trigger/ledtrig-netdev.c:401:2-9: 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=4929
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
> ---
>  drivers/leds/trigger/ledtrig-netdev.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)

Don't forget to run checkpatch.pl before submission.

WARNING: Reported-by: should be immediately followed by Closes: with a URL to the report

Fixed and applied, thanks.

-- 
Lee Jones [李琼斯]

      reply	other threads:[~2023-05-18 12:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-11  7:08 [PATCH -next] leds: trigger: netdev: NULL check before dev_{put, hold} Yang Li
2023-05-18 12:20 ` Lee Jones [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=20230518122047.GK404509@google.com \
    --to=lee@kernel.org \
    --cc=abaci@linux.alibaba.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --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.