From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Breno Rodrigues Alves <breno3011alves@gmail.com>
Cc: Dan Carpenter <error27@gmail.com>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] staging: axis-fifo: remove unused r_mem local variable
Date: Fri, 23 Oct 2026 15:31:17 +0200 [thread overview]
Message-ID: <2026102319-qualifier-closable-a65b@gregkh> (raw)
In-Reply-To: <20261023103943.20995-1-breno3011alves@gmail.com>
On Fri, Oct 23, 2026 at 07:39:43AM -0300, Breno Rodrigues Alves wrote:
> Remove 'struct resource *r_mem' from axis_fifo_probe(). It is filled
> in by devm_platform_get_and_ioremap_resource() but never read; pass
> NULL instead.
>
> This is v2 of a three-change series. The debugfs_create_dir() check
> was dropped because debugfs has handled ERR_PTR parents gracefully
> since 2019 (thanks Greg and Dan for the correction). The
> -EINVAL -> -ENOBUFS change was dropped as well, after Dan Carpenter
> noted that -EINVAL is the common errno for this path and that he
> would leave the choice to the author.
>
> Signed-off-by: Breno Rodrigues Alves <breno3011alves@gmail.com>
> ---
> drivers/staging/axis-fifo/axis-fifo.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-fifo/axis-fifo.c
> index 3d358f919..464368e04 100644
> --- a/drivers/staging/axis-fifo/axis-fifo.c
> +++ b/drivers/staging/axis-fifo/axis-fifo.c
> @@ -428,7 +428,6 @@ static int axis_fifo_parse_dt(struct axis_fifo *fifo)
>
> static int axis_fifo_probe(struct platform_device *pdev)
> {
> - struct resource *r_mem;
> struct device *dev = &pdev->dev;
> struct axis_fifo *fifo = NULL;
> int rc = 0; /* error return value */
> @@ -447,7 +446,7 @@ static int axis_fifo_probe(struct platform_device *pdev)
> mutex_init(&fifo->read_lock);
> mutex_init(&fifo->write_lock);
>
> - fifo->base_addr = devm_platform_get_and_ioremap_resource(pdev, 0, &r_mem);
> + fifo->base_addr = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
This doesn't make sense, if r_mem is really not needed, then call the
proper function instead (exercise left to the reader to determine what
that is...)
And how was this found?
How was this tested?
thanks,
greg k-h
prev parent reply other threads:[~2026-10-23 13:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-22 21:53 [PATCH] staging: axis-fifo: Fix three real issues Breno Rodrigues Alves
2026-10-23 6:08 ` Greg Kroah-Hartman
2026-10-23 8:52 ` Breno Rodrigues Alves
2026-10-23 9:27 ` Dan Carpenter
2026-10-23 10:39 ` [PATCH v2] staging: axis-fifo: remove unused r_mem local variable Breno Rodrigues Alves
2026-10-23 10:44 ` Dan Carpenter
2026-10-23 13:31 ` Greg Kroah-Hartman [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=2026102319-qualifier-closable-a65b@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=breno3011alves@gmail.com \
--cc=error27@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/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®