diff mbox series

drm/bridge: sii9234: Remove the unused function sii9234_mode_valid()

Message ID 20221104063652.82789-1-jiapeng.chong@linux.alibaba.com (mailing list archive)
State New, archived
Headers show
Series drm/bridge: sii9234: Remove the unused function sii9234_mode_valid() | expand

Commit Message

Jiapeng Chong Nov. 4, 2022, 6:36 a.m. UTC
The function sii9234_mode_valid() is defined in the sii9234.c file, but
not called elsewhere, so remove this unused function.

drivers/gpu/drm/bridge/sii9234.c:870:31: warning: unused function 'bridge_to_sii9234'.

Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2735
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/gpu/drm/bridge/sii9234.c | 5 -----
 1 file changed, 5 deletions(-)

Comments

Robert Foss Nov. 7, 2022, 3:48 p.m. UTC | #1
On Fri, 4 Nov 2022 at 07:37, Jiapeng Chong
<jiapeng.chong@linux.alibaba.com> wrote:
>
> The function sii9234_mode_valid() is defined in the sii9234.c file, but
> not called elsewhere, so remove this unused function.
>
> drivers/gpu/drm/bridge/sii9234.c:870:31: warning: unused function 'bridge_to_sii9234'.
>
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2735
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
>  drivers/gpu/drm/bridge/sii9234.c | 5 -----
>  1 file changed, 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/sii9234.c b/drivers/gpu/drm/bridge/sii9234.c
> index 5b3061d4b5c3..62b6bc8ca7af 100644
> --- a/drivers/gpu/drm/bridge/sii9234.c
> +++ b/drivers/gpu/drm/bridge/sii9234.c
> @@ -867,11 +867,6 @@ static int sii9234_init_resources(struct sii9234 *ctx,
>         return 0;
>  }
>
> -static inline struct sii9234 *bridge_to_sii9234(struct drm_bridge *bridge)
> -{
> -       return container_of(bridge, struct sii9234, bridge);
> -}
> -
>  static enum drm_mode_status sii9234_mode_valid(struct drm_bridge *bridge,
>                                          const struct drm_display_info *info,
>                                          const struct drm_display_mode *mode)
> --
> 2.20.1.7.g153144c
>

Reviewed-by: Robert Foss <robert.foss@linaro.org>
Dave Stevenson Nov. 8, 2022, 12:40 p.m. UTC | #2
On Fri, 4 Nov 2022 at 06:37, Jiapeng Chong
<jiapeng.chong@linux.alibaba.com> wrote:
>
> The function sii9234_mode_valid() is defined in the sii9234.c file, but
> not called elsewhere, so remove this unused function.

Did you mean bridge_to_sii9234() rather than sii9234_mode_valid() here?

sii9234_mode_valid() is referenced in sii9234_bridge_funcs, and it's
bridge_to_sii9234 that you've actually removed.

  Dave

> drivers/gpu/drm/bridge/sii9234.c:870:31: warning: unused function 'bridge_to_sii9234'.
>
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2735
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
>  drivers/gpu/drm/bridge/sii9234.c | 5 -----
>  1 file changed, 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/sii9234.c b/drivers/gpu/drm/bridge/sii9234.c
> index 5b3061d4b5c3..62b6bc8ca7af 100644
> --- a/drivers/gpu/drm/bridge/sii9234.c
> +++ b/drivers/gpu/drm/bridge/sii9234.c
> @@ -867,11 +867,6 @@ static int sii9234_init_resources(struct sii9234 *ctx,
>         return 0;
>  }
>
> -static inline struct sii9234 *bridge_to_sii9234(struct drm_bridge *bridge)
> -{
> -       return container_of(bridge, struct sii9234, bridge);
> -}
> -
>  static enum drm_mode_status sii9234_mode_valid(struct drm_bridge *bridge,
>                                          const struct drm_display_info *info,
>                                          const struct drm_display_mode *mode)
> --
> 2.20.1.7.g153144c
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/bridge/sii9234.c b/drivers/gpu/drm/bridge/sii9234.c
index 5b3061d4b5c3..62b6bc8ca7af 100644
--- a/drivers/gpu/drm/bridge/sii9234.c
+++ b/drivers/gpu/drm/bridge/sii9234.c
@@ -867,11 +867,6 @@  static int sii9234_init_resources(struct sii9234 *ctx,
 	return 0;
 }
 
-static inline struct sii9234 *bridge_to_sii9234(struct drm_bridge *bridge)
-{
-	return container_of(bridge, struct sii9234, bridge);
-}
-
 static enum drm_mode_status sii9234_mode_valid(struct drm_bridge *bridge,
 					 const struct drm_display_info *info,
 					 const struct drm_display_mode *mode)