* [PATCH] m68k/mac: Fix macintosh_config for Mac II
@ 2025-04-24 0:07 Finn Thain
2025-04-24 7:28 ` Geert Uytterhoeven
0 siblings, 1 reply; 2+ messages in thread
From: Finn Thain @ 2025-04-24 0:07 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Joshua Thompson, linux-m68k, linux-kernel
When booted on my Mac II, the kernel prints this:
Detected Macintosh model: 6
Apple Macintosh Unknown
The catch-all entry ("Unknown") is mac_data_table[0] which is only needed
in the unlikely event that the bootinfo model ID can't be matched.
When model ID is 6, the search should begin and end at mac_data_table[1].
Fix the off-by-one error that causes this problem.
Cc: Joshua Thompson <funaho@jurai.org>
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Finn Thain <fthain@linux-m68k.org>
---
arch/m68k/mac/config.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c
index e324410ef239..d26c7f4f8c36 100644
--- a/arch/m68k/mac/config.c
+++ b/arch/m68k/mac/config.c
@@ -793,7 +793,7 @@ static void __init mac_identify(void)
}
macintosh_config = mac_data_table;
- for (m = macintosh_config; m->ident != -1; m++) {
+ for (m = &mac_data_table[1]; m->ident != -1; m++) {
if (m->ident == model) {
macintosh_config = m;
break;
--
2.45.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] m68k/mac: Fix macintosh_config for Mac II
2025-04-24 0:07 [PATCH] m68k/mac: Fix macintosh_config for Mac II Finn Thain
@ 2025-04-24 7:28 ` Geert Uytterhoeven
0 siblings, 0 replies; 2+ messages in thread
From: Geert Uytterhoeven @ 2025-04-24 7:28 UTC (permalink / raw)
To: Finn Thain; +Cc: Joshua Thompson, linux-m68k, linux-kernel
On Thu, 24 Apr 2025 at 02:13, Finn Thain <fthain@linux-m68k.org> wrote:
> When booted on my Mac II, the kernel prints this:
>
> Detected Macintosh model: 6
> Apple Macintosh Unknown
>
> The catch-all entry ("Unknown") is mac_data_table[0] which is only needed
> in the unlikely event that the bootinfo model ID can't be matched.
> When model ID is 6, the search should begin and end at mac_data_table[1].
> Fix the off-by-one error that causes this problem.
>
> Cc: Joshua Thompson <funaho@jurai.org>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Signed-off-by: Finn Thain <fthain@linux-m68k.org>
Nice catch!
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
i.e. will queue in the m68k tree for v6.16.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-04-24 7:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-24 0:07 [PATCH] m68k/mac: Fix macintosh_config for Mac II Finn Thain
2025-04-24 7:28 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).