[PATCH -next v2] drm/bridge: fix -Wunused-const-variable= warning

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Fri Jul 28 09:49:02 UTC 2023


On Fri, Jul 28, 2023 at 05:12:08PM +0800, Zhu Wang wrote:
> When building with W=1, the following warning occurs.
> 
> drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c:48:17: warning: ‘anx781x_i2c_addresses’ defined but not used [-Wunused-const-variable=]  static const u8 anx781x_i2c_addresses[] = {
>                  ^~~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c:40:17: warning: ‘anx7808_i2c_addresses’ defined but not used [-Wunused-const-variable=]  static const u8 anx7808_i2c_addresses[] = {
> 
> When CONFIG_IO is disabled, above two variables are not used,
> since the place where it is used is inclueded in the macro
> CONFIG_OF.
> 
> The drivers under the directory drivers/gpu/drm/bridge depends
> on the macro CONFIG_OF, it is not necessary to use CONFIG_OF
> or of_match_ptr in related files in this directory, so we just
> remove them all.
> 
> Fixes: 0647e7dd3f7a ("drm/bridge: Add Analogix anx78xx support")
> Signed-off-by: Zhu Wang <wangzhu9 at huawei.com>
> 
> Changes in v2
> - remove CONFIG_OF and of_match_ptr in following files:
>   drivers/gpu/drm/bridge/analogix/analogix-anx6345.c
>   drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c
>   drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c
>   drivers/gpu/drm/bridge/chrontel-ch7033.c
>   drivers/gpu/drm/bridge/sil-sii8620.c
>   drivers/gpu/drm/bridge/ti-tfp410.c
> ---

Note that the changelog between patch series version usually goes below
the triple-dash.

Otherwise looks good to me,
Acked-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>

Thanks
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20230728/228c2a0e/attachment.sig>


More information about the dri-devel mailing list