drm/bridge: sn65dsi86: ti_sn65dsi86_read_u16() __maybe_unused
Subsystems (5)
PATCH 1/1 drm/bridge: sn65dsi86: ti_sn65dsi86_read_u16() __maybe_unused
When built without CONFIG_PWM there are no references to ti_sn65dsi86_read_u16(), avoid the W=1 build warning by marking the function as __maybe_unused.
__maybe_unused is used insted of a #ifdef guard as it looks slighly cleaner and it avoids issues if in the future other permutations of the config options would use the function.
---
Robert, I believe you pushed out the driver patch introducing this issue yesterday. Can you please add the relevant Fixes?
drivers/gpu/drm/bridge/ti-sn65dsi86.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/bridge/ti-sn65dsi86.c +2 -2
@@ -215,8 +215,8 @@ static const struct regmap_config ti_sn65dsi86_regmap_config = { .cache_type = REGCACHE_NONE, }; -static int ti_sn65dsi86_read_u16 (struct ti_sn65dsi86 *pdata, -unsigned int reg,u16 *val) +static int __maybe_unused ti_sn65dsi86_read_u16 (struct ti_sn65dsi86 *pdata, +unsigned int reg,u16 *val) {u8 buf[2 ];int ret;
Signature · 1 line
2.33.1
Hey Bjorn,
Thanks for fixing this quickly.
Quoted 9 lines · Bjorn Andersson
When built without
CONFIG_PWMthere are no references toti_sn65dsi86_read_u16(), avoid the W=1 build warning by marking the function as__maybe_unused.
__maybe_unusedis used insted of a #ifdef guard as it looks slighly cleaner and it avoids issues if in the future other permutations of the config options would use the function.
Quoted 6 lines
Reported-by kernel test robot <[email protected]>Signed-off-by Bjorn Andersson <[email protected]>---
Robert, I believe you pushed out the driver patch introducing this issue yesterday. Can you please add the relevant Fixes?
Added fixes & r-b tags.
Applied to drm-misc-next
Quoted 22 lines
drivers/gpu/drm/bridge/ti-sn65dsi86.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/bridge/ti-sn65dsi86.c +2
-3@@ -215,8 +215,8 @@ static const struct regmap_config ti_sn65dsi86_regmap_config = { .cache_type = REGCACHE_NONE, }; -static int ti_sn65dsi86_read_u16 (struct ti_sn65dsi86 *pdata, -unsigned int reg,u16 *val) +static int __maybe_unused ti_sn65dsi86_read_u16 (struct ti_sn65dsi86 *pdata, +unsigned int reg,u16 *val) {u8 buf[2 ];int ret; --2.33.1