[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOgh=Fx6hcJdbQpna2JJhnzp=YG_nyg-gpd=ZH7CewudtgDhAA@mail.gmail.com>
Date: Fri, 12 Jul 2024 15:29:21 +0100
From: Eric Curtin <ecurtin@...hat.com>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: Hector Martin <marcan@...can.st>, Sven Peter <sven@...npeter.dev>,
Alyssa Rosenzweig <alyssa@...enzweig.io>, Keith Busch <kbusch@...nel.org>, Jens Axboe <axboe@...nel.dk>,
Christoph Hellwig <hch@....de>, Sagi Grimberg <sagi@...mberg.me>, asahi@...ts.linux.dev,
linux-arm-kernel@...ts.infradead.org, linux-nvme@...ts.infradead.org,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] nvme: apple: remove some dead code
On Fri, 12 Jul 2024 at 15:13, Dan Carpenter <dan.carpenter@...aro.org> wrote:
>
> platform_get_irq() never returns zero so we can remove his dead code.
> Checking for zero is a historical artifact from over ten years ago.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
There's quite a few return paths in platform_get_irq_optional, are we
sure it can never be zero?
Not calling out a specific case here, but it's not so clear to me how
we can guarantee platform_get_irq() is never zero,
Is mise le meas/Regards,
Eric Curtin
> ---
> drivers/nvme/host/apple.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/nvme/host/apple.c b/drivers/nvme/host/apple.c
> index b1387dc459a3..f5a3a4e8b1e5 100644
> --- a/drivers/nvme/host/apple.c
> +++ b/drivers/nvme/host/apple.c
> @@ -1417,10 +1417,6 @@ static struct apple_nvme *apple_nvme_alloc(struct platform_device *pdev)
> ret = anv->irq;
> goto put_dev;
> }
> - if (!anv->irq) {
> - ret = -ENXIO;
> - goto put_dev;
> - }
>
> anv->mmio_coproc = devm_platform_ioremap_resource_byname(pdev, "ans");
> if (IS_ERR(anv->mmio_coproc)) {
> --
> 2.43.0
>
>
Powered by blists - more mailing lists