* [PATCH 1/2] sh: cache: remove unused but set variables in sh4_flush_cache_range
@ 2026-04-23 14:53 Thorsten Blum
2026-04-23 14:53 ` [PATCH 2/2] gdrom: remove unused but set variable in gdrom_get_last_session Thorsten Blum
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Thorsten Blum @ 2026-04-23 14:53 UTC (permalink / raw)
To: Rich Felker, John Paul Adrian Glaubitz, Matthew Wilcox (Oracle),
Zi Yan, Andrew Morton
Cc: Thorsten Blum, linux-sh, linux-kernel
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;
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 2/2] gdrom: remove unused but set variable in gdrom_get_last_session
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 ` 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
2 siblings, 0 replies; 5+ messages in thread
From: Thorsten Blum @ 2026-04-23 14:53 UTC (permalink / raw)
To: Rich Felker, John Paul Adrian Glaubitz
Cc: Thorsten Blum, linux-sh, linux-kernel
Remove 'lentry' to avoid a "variable set but not used" warning triggered
by -Wunused-but-set-variable.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
drivers/cdrom/gdrom.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/cdrom/gdrom.c b/drivers/cdrom/gdrom.c
index 4ba4dd06cbf4..5cc830501fdf 100644
--- a/drivers/cdrom/gdrom.c
+++ b/drivers/cdrom/gdrom.c
@@ -312,7 +312,7 @@ static int get_entry_track(int track)
static int gdrom_get_last_session(struct cdrom_device_info *cd_info,
struct cdrom_multisession *ms_info)
{
- int fentry, lentry, track, data, err;
+ int fentry, track, data, err;
if (!gd.toc)
return -ENOMEM;
@@ -329,7 +329,6 @@ static int gdrom_get_last_session(struct cdrom_device_info *cd_info,
}
fentry = get_entry_track(gd.toc->first);
- lentry = get_entry_track(gd.toc->last);
/* Find the first data track */
track = get_entry_track(gd.toc->last);
do {
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH 1/2] sh: cache: remove unused but set variables in sh4_flush_cache_range
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 ` Matthew Wilcox
2026-04-23 15:46 ` Zi Yan
2 siblings, 0 replies; 5+ messages in thread
From: Matthew Wilcox @ 2026-04-23 14:57 UTC (permalink / raw)
To: Thorsten Blum
Cc: Rich Felker, John Paul Adrian Glaubitz, Zi Yan, Andrew Morton,
linux-sh, linux-kernel
On Thu, Apr 23, 2026 at 04:53:01PM +0200, Thorsten Blum wrote:
> Remove 'start' and 'end' to avoid two "variable set but not used"
> warnings triggered by -Wunused-but-set-variable.
Looks like the actual uses of them were removed in 654d364e26c7. 2009!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] sh: cache: remove unused but set variables in sh4_flush_cache_range
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
2 siblings, 1 reply; 5+ messages in thread
From: Zi Yan @ 2026-04-23 15:46 UTC (permalink / raw)
To: Thorsten Blum
Cc: Rich Felker, John Paul Adrian Glaubitz, Matthew Wilcox (Oracle),
Andrew Morton, linux-sh, linux-kernel
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?
“START, END: Virtual Address (U0 address)” and the NOTE.
The change looks good to me.
Reviewed-by: Zi Yan <ziy@nvidia.com>
Best Regards,
Yan, Zi
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH 1/2] sh: cache: remove unused but set variables in sh4_flush_cache_range
2026-04-23 15:46 ` Zi Yan
@ 2026-04-23 16:38 ` Thorsten Blum
0 siblings, 0 replies; 5+ messages in thread
From: Thorsten Blum @ 2026-04-23 16:38 UTC (permalink / raw)
To: Zi Yan
Cc: Rich Felker, John Paul Adrian Glaubitz, Matthew Wilcox (Oracle),
Andrew Morton, linux-sh, linux-kernel
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-04-23 16:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox