public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thorsten Blum <thorsten.blum@linux.dev>
To: Zi Yan <ziy@nvidia.com>
Cc: Rich Felker <dalias@libc.org>,
	John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
	"Matthew Wilcox (Oracle)" <willy@infradead.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] sh: cache: remove unused but set variables in sh4_flush_cache_range
Date: Thu, 23 Apr 2026 18:38:10 +0200	[thread overview]
Message-ID: <aepK8ucK5LJc1NbE@linux.dev> (raw)
In-Reply-To: <B1350795-6210-4C52-9100-1FF66687E3DC@nvidia.com>

On Thu, Apr 23, 2026 at 11:46:38AM -0400, Zi Yan wrote:
> On 23 Apr 2026, at 10:53, Thorsten Blum wrote:
> 
> > Remove 'start' and 'end' to avoid two "variable set but not used"
> > warnings triggered by -Wunused-but-set-variable.
> >
> > Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> > ---
> >  arch/sh/mm/cache-sh4.c | 3 ---
> >  1 file changed, 3 deletions(-)
> >
> > diff --git a/arch/sh/mm/cache-sh4.c b/arch/sh/mm/cache-sh4.c
> > index 83fb34b39ca7..9776027382cc 100644
> > --- a/arch/sh/mm/cache-sh4.c
> > +++ b/arch/sh/mm/cache-sh4.c
> > @@ -284,11 +284,8 @@ static void sh4_flush_cache_range(void *args)
> >  {
> >  	struct flusher_data *data = args;
> >  	struct vm_area_struct *vma;
> > -	unsigned long start, end;
> >
> >  	vma = data->vma;
> > -	start = data->addr1;
> > -	end = data->addr2;
> >
> >  	if (cpu_context(smp_processor_id(), vma->vm_mm) == NO_CONTEXT)
> >  		return;
> 
> Is the comment above the function considered stale too?

Yes, that should be removed too. I will send a v2.

> “START, END: Virtual Address (U0 address)” and the NOTE.

I think the NOTE is still relevant as it explains why flush_dcache_all()
is used.

> Reviewed-by: Zi Yan <ziy@nvidia.com>

Thanks,
Thorsten

      reply	other threads:[~2026-04-23 16:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-23 14:53 [PATCH 1/2] sh: cache: remove unused but set variables in sh4_flush_cache_range Thorsten Blum
2026-04-23 14:53 ` [PATCH 2/2] gdrom: remove unused but set variable in gdrom_get_last_session Thorsten Blum
2026-04-23 14:57 ` [PATCH 1/2] sh: cache: remove unused but set variables in sh4_flush_cache_range Matthew Wilcox
2026-04-23 15:46 ` Zi Yan
2026-04-23 16:38   ` Thorsten Blum [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=aepK8ucK5LJc1NbE@linux.dev \
    --to=thorsten.blum@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=dalias@libc.org \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=willy@infradead.org \
    --cc=ziy@nvidia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox