* [PATCH v2 1/2] sh: cache: remove unused but set variables in sh4_flush_cache_range
@ 2026-04-23 16:43 Thorsten Blum
2026-04-23 16:43 ` [PATCH v2 2/2] gdrom: remove unused but set variable in gdrom_get_last_session Thorsten Blum
0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Blum @ 2026-04-23 16:43 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. Update the function
comment accordingly.
Reviewed-by: Zi Yan <ziy@nvidia.com>
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
Changes in v2:
- Update the comment as suggested by Zi Yan (thanks!)
- v1: https://lore.kernel.org/lkml/20260423145301.245374-4-thorsten.blum@linux.dev/
---
arch/sh/mm/cache-sh4.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/arch/sh/mm/cache-sh4.c b/arch/sh/mm/cache-sh4.c
index 83fb34b39ca7..c7635beb4f1f 100644
--- a/arch/sh/mm/cache-sh4.c
+++ b/arch/sh/mm/cache-sh4.c
@@ -274,8 +274,6 @@ static void sh4_flush_cache_page(void *args)
/*
* Write back and invalidate D-caches.
*
- * START, END: Virtual Address (U0 address)
- *
* NOTE: We need to flush the _physical_ page entry.
* Flushing the cache lines for U0 only isn't enough.
* We need to flush for P1 too, which may contain aliases.
@@ -284,11 +282,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] 2+ messages in thread
* [PATCH v2 2/2] gdrom: remove unused but set variable in gdrom_get_last_session
2026-04-23 16:43 [PATCH v2 1/2] sh: cache: remove unused but set variables in sh4_flush_cache_range Thorsten Blum
@ 2026-04-23 16:43 ` Thorsten Blum
0 siblings, 0 replies; 2+ messages in thread
From: Thorsten Blum @ 2026-04-23 16:43 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>
---
No changes in patch 2/2.
---
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] 2+ messages in thread
end of thread, other threads:[~2026-04-23 16:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-23 16:43 [PATCH v2 1/2] sh: cache: remove unused but set variables in sh4_flush_cache_range Thorsten Blum
2026-04-23 16:43 ` [PATCH v2 2/2] gdrom: remove unused but set variable in gdrom_get_last_session Thorsten Blum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox