]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
pinctrl: starfive: jh7110: use struct_size
authorRosen Penev <rosenp@gmail.com>
Sat, 25 Apr 2026 01:40:29 +0000 (18:40 -0700)
committerLinus Walleij <linusw@kernel.org>
Tue, 28 Apr 2026 10:37:00 +0000 (12:37 +0200)
commit87182ef0bf93c283b2ab350fa4d1e0b098eb1324
treef56e5b4ad3f47c974dea772dcf22dd5536b94c60
parentb31617184621fe6121fd4e9b19eea52ab3cdce10
pinctrl: starfive: jh7110: use struct_size

Instead of an extra kcalloc, Use a flexible array member to combine
allocations. Saves a pointer in the struct.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Acked-by: Hal Feng <hal.feng@starfivetech.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c
drivers/pinctrl/starfive/pinctrl-starfive-jh7110.h