[1/1] drm/msm/dp: remove unused local variable 'hpd'

Message ID 20210407082315.2703-1-thunder.leizhen@huawei.com
State New
Headers show
Series
  • [1/1] drm/msm/dp: remove unused local variable 'hpd'
Related show

Commit Message

Zhen Lei April 7, 2021, 8:23 a.m.
Fixes the following W=1 kernel build warning:

drivers/gpu/drm/msm/dp/dp_display.c: In function ‘dp_display_usbpd_attention_cb’:
drivers/gpu/drm/msm/dp/dp_display.c:496:19: warning: variable ‘hpd’ set but not used [-Wunused-but-set-variable]

Fixes: c58eb1b54fee ("drm/msm/dp: fix connect/disconnect handled at irq_hpd")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 drivers/gpu/drm/msm/dp/dp_display.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Abhinav Kumar April 7, 2021, 5:51 p.m. | #1
On 2021-04-07 01:23, Zhen Lei wrote:
> Fixes the following W=1 kernel build warning:
> 
> drivers/gpu/drm/msm/dp/dp_display.c: In function
> ‘dp_display_usbpd_attention_cb’:
> drivers/gpu/drm/msm/dp/dp_display.c:496:19: warning: variable ‘hpd’
> set but not used [-Wunused-but-set-variable]
> 
> Fixes: c58eb1b54fee ("drm/msm/dp: fix connect/disconnect handled at 
> irq_hpd")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org>
> ---
>  drivers/gpu/drm/msm/dp/dp_display.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/dp/dp_display.c
> b/drivers/gpu/drm/msm/dp/dp_display.c
> index 5a39da6e1eaf277..31bf2a40a9eb2c9 100644
> --- a/drivers/gpu/drm/msm/dp/dp_display.c
> +++ b/drivers/gpu/drm/msm/dp/dp_display.c
> @@ -493,7 +493,6 @@ static int dp_display_usbpd_attention_cb(struct 
> device *dev)
>  	int rc = 0;
>  	u32 sink_request;
>  	struct dp_display_private *dp;
> -	struct dp_usbpd *hpd;
> 
>  	if (!dev) {
>  		DRM_ERROR("invalid dev\n");
> @@ -507,8 +506,6 @@ static int dp_display_usbpd_attention_cb(struct 
> device *dev)
>  		return -ENODEV;
>  	}
> 
> -	hpd = dp->usbpd;
> -
>  	/* check for any test request issued by sink */
>  	rc = dp_link_process_request(dp->link);
>  	if (!rc) {

Patch

diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c
index 5a39da6e1eaf277..31bf2a40a9eb2c9 100644
--- a/drivers/gpu/drm/msm/dp/dp_display.c
+++ b/drivers/gpu/drm/msm/dp/dp_display.c
@@ -493,7 +493,6 @@  static int dp_display_usbpd_attention_cb(struct device *dev)
 	int rc = 0;
 	u32 sink_request;
 	struct dp_display_private *dp;
-	struct dp_usbpd *hpd;
 
 	if (!dev) {
 		DRM_ERROR("invalid dev\n");
@@ -507,8 +506,6 @@  static int dp_display_usbpd_attention_cb(struct device *dev)
 		return -ENODEV;
 	}
 
-	hpd = dp->usbpd;
-
 	/* check for any test request issued by sink */
 	rc = dp_link_process_request(dp->link);
 	if (!rc) {