[PATCH] drm/panel: ilitek-ili9881c: Use u8 for lane count
Neil Armstrong
neil.armstrong at linaro.org
Fri Jun 13 09:29:31 UTC 2025
On 12/06/2025 01:49, Marek Vasut wrote:
> Use u8 to hold lane count in struct ili9881c_desc {} to avoid
> alignment gap between default_address_mode and lanes members.
> The ili9881c controller can only operate up to 4 DSI lanes, so
> there is no chance this value can ever be larger than 4. No
> functional change.
The u8 will still take at least 4 bytes and cpu will still
do at least a 32bit memory access, so there's no point to change
it to u8.
Neil
>
> Suggested-by: Geert Uytterhoeven <geert at linux-m68k.org>
> Signed-off-by: Marek Vasut <marek.vasut+renesas at mailbox.org>
> ---
> Cc: David Airlie <airlied at gmail.com>
> Cc: Geert Uytterhoeven <geert at linux-m68k.org>
> Cc: Jessica Zhang <jessica.zhang at oss.qualcomm.com>
> Cc: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> Cc: Maxime Ripard <mripard at kernel.org>
> Cc: Neil Armstrong <neil.armstrong at linaro.org>
> Cc: Simona Vetter <simona at ffwll.ch>
> Cc: Thomas Zimmermann <tzimmermann at suse.de>
> Cc: dri-devel at lists.freedesktop.org
> Cc: linux-renesas-soc at vger.kernel.org
> ---
> drivers/gpu/drm/panel/panel-ilitek-ili9881c.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
> index ac433345a179..84927302957a 100644
> --- a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
> +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
> @@ -43,7 +43,7 @@ struct ili9881c_desc {
> const struct drm_display_mode *mode;
> const unsigned long mode_flags;
> u8 default_address_mode;
> - unsigned int lanes;
> + u8 lanes;
> };
>
> struct ili9881c {
More information about the dri-devel
mailing list