pxa27x: Reduce size of keyboard matrix mapping
PATCH 1/1 pxa27x: Reduce size of keyboard matrix mapping
The row and column values use only a very limited range (-1 ... 7), so a byte value is sufficient.
Signed-off-by Stefan Weil <[email protected]>
--- include/hw/arm/pxa.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/hw/arm/pxa.h +2 -2
@@ -102,8 +102,8 @@ void pxa2xx_pcmcia_set_irq_cb(void *opaque, qemu_irq irq, qemu_irq cd_irq);/* pxa2xx_keypad.c */ struct keymap { -int column; -int row; +int8_t column; +int8_t row; };typedef struct PXA2xxKeyPadState PXA2xxKeyPadState ; PXA2xxKeyPadState *pxa27x_keypad_init(MemoryRegion *sysmem,
Signature · 1 line
1.7.10.4
Quoted 4 lines · Stefan Weil
The row and column values use only a very limited range (-1 ... 7), so a byte value is sufficient.
Signed-off-by Stefan Weil <[email protected]>
It's not like we have a ton of pxa2xx keymaps eating up space, but yeah, this is an OK change.
Reviewed-by Peter Maydell <[email protected]>
thanks
-- PMM
Michael Tokarev
AppliedQuoted 2 lines · Stefan Weil
The row and column values use only a very limited range (-1 ... 7), so a byte value is sufficient.
Thanks, applied to the trivial-patches queue.
/mjt