Re: [PATCH 1/2] sh: cache: remove unused but set variables in sh4_flush_cache_range

Thorsten Blum <[email protected]>
Newsgroups gmane.linux.ports.sh.devel,gmane.linux.kernel
Message-ID <[email protected]>
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 <[email protected]>
> > ---
> >  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 <[email protected]>

Thanks,
Thorsten
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.