mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Li Ningke <lnk_01@hust.edu.cn>
Cc: hust-os-kernel-patches@googlegroups.com,
	Dongliang Mu <dzm91@hust.edu.cn>,
	linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] spi: davinci: Remove dead code in `davinci_spi_probe()`
Date: Mon, 24 Apr 2023 12:48:19 +0100	[thread overview]
Message-ID: <d29c4b3e-9e82-4ea9-9f0c-a8e2c7637eb9@sirena.org.uk> (raw)
In-Reply-To: <20230423032446.34347-1-lnk_01@hust.edu.cn>

[-- Attachment #1: Type: text/plain, Size: 479 bytes --]

On Sun, Apr 23, 2023 at 03:24:46AM +0000, Li Ningke wrote:
> Smatch complains that
> drivers/spi/spi-davinci.c:915 davinci_spi_probe() warn:
> platform_get_irq() does not return zero
> 
> There is no need to check whether the return value is zero as
> `platform_get_irq()` only returns non-zero IRQ number on success
> or negative error number on failure, removing them to solve this
> problem.

Is that check valid?  0 was a valid interrupt for some architectures...

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2023-04-24 11:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-23  3:24 Li Ningke
2023-04-24 11:48 ` Mark Brown [this message]
2023-04-24 12:03   ` Dongliang Mu
2023-04-24 15:52     ` Mark Brown
2023-04-26  1:50       ` Dongliang Mu
2023-04-26 14:13         ` Mark Brown
2023-04-26 15:07           ` Dongliang Mu

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=d29c4b3e-9e82-4ea9-9f0c-a8e2c7637eb9@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=dzm91@hust.edu.cn \
    --cc=hust-os-kernel-patches@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=lnk_01@hust.edu.cn \
    /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

all inboxes | Powered by JetHome®