summaryrefslogtreecommitdiff
path: root/scripts/generate_rust_target.rs
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>2025-07-01 11:22:37 +0200
committerLee Jones <lee@kernel.org>2025-09-02 11:36:59 +0100
commitfe85a39d8402e64a60ad3b23e190140a71d98dd9 (patch)
tree1618b626009c6f14f0f3a69c44b044272a73272f /scripts/generate_rust_target.rs
parent2720c87b76215595a94fb70515438c5b64c360eb (diff)
backlight: mp3309c: Initialize backlight properties without memset
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@baylibre.com> Tested-by: Flavio Suligoi <f.suligoi@asem.it> Reviewed-by: Daniel Thompson (RISCstar) <danielt@kernel.org> Link: https://lore.kernel.org/r/14514a1b0d3df6438aa10bb74f1c4fc2367d9987.1751361465.git.u.kleine-koenig@baylibre.com Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'scripts/generate_rust_target.rs')
0 files changed, 0 insertions, 0 deletions