hw/display/macfb: Constify macfb_sense_table[] array
macfb_sense_table[] is only read, never updated, so can be const. Update the single call site, macfb_sense_read(). Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20260216213121.47122-2-philmd@linaro.org>
Philippe Mathieu-Daudé committed
Feb 11, 2026 at 14:45 UTC
10b63551b623ba9c22f6796aea4f6837fb579d76
1 file changed
+2
-2
hw/display/macfb.c
+2
-2
@@ -82,7 +82,7 @@ typedef struct MacFbSense {
82
uint8_t ext_sense;
83
} MacFbSense;
84
85
-static MacFbSense macfb_sense_table[] = {
85
+static const MacFbSense macfb_sense_table[] = {
86
{ MACFB_DISPLAY_APPLE_21_COLOR, 0x0, 0 },
87
{ MACFB_DISPLAY_APPLE_PORTRAIT, 0x1, 0 },
88
{ MACFB_DISPLAY_APPLE_12_RGB, 0x2, 0 },
@@ -342,7 +342,7 @@ static void macfb_invalidate_display(void *opaque)
342
343
static uint32_t macfb_sense_read(MacfbState *s)
344
{
345
- MacFbSense *macfb_sense;
345
+ const MacFbSense *macfb_sense;
346
uint8_t sense;
347
348
assert(s->type < ARRAY_SIZE(macfb_sense_table));