EXTERNAL: [PATCH 2/2] backlight: mp3309c: Initialize backlight properties without memset
FLAVIO SULIGOI
f.suligoi at asem.it
Mon Jul 7 15:49:48 UTC 2025
Hi Uwe,
I've tested your patch on my board, all ok.
> -----Original Message-----
> From: Uwe Kleine-König <u.kleine-koenig at baylibre.com>
> Sent: martedì 1 luglio 2025 11:23
> To: FLAVIO SULIGOI <f.suligoi at asem.it>; Lee Jones <lee at kernel.org>;
> Daniel Thompson <danielt at kernel.org>; Jingoo Han <jingoohan1 at gmail.com>;
> Helge Deller <deller at gmx.de>
> Cc: dri-devel at lists.freedesktop.org; linux-fbdev at vger.kernel.org; linux-
> pwm at vger.kernel.org
> Subject: EXTERNAL: [PATCH 2/2] backlight: mp3309c: Initialize backlight
> properties without memset
>
> [Use caution with links & attachments]
>
>
>
> Assigning values to a struct using a compound literal (since C99) also
> guarantees that all unspecified struct members are empty-initialized, so
> it properly replaces the memset to zero.
>
> The code looks a bit nicer and more idiomatic (though that might be
> subjective?). The resulting binary is a bit smaller. On ARCH=arm with an
> allnoconfig + minimal changes to enable the mp3309c driver the
> difference is 12 bytes.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig at baylibre.com>
Tested-by: Flavio Suligoi <f.suligoi at asem.it>
More information about the dri-devel
mailing list