diff mbox series

[3/3] drm/bridge: Return NULL instead of plain 0 in drm_dp_hpd_bridge_register() stub

Message ID 20231205-drm_aux_bridge-fixes-v1-3-d242a0ae9df4@kernel.org (mailing list archive)
State Accepted
Commit 812cc1da7ffd9e178ef66b8a22113be10fba466c
Headers show
Series A few fixes for transparent bridge support | expand

Commit Message

Nathan Chancellor Dec. 5, 2023, 8:13 p.m. UTC
sparse complains:

  drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c: note: in included file:
  include/drm/bridge/aux-bridge.h:29:16: sparse: sparse: Using plain integer as NULL pointer

Return NULL to clear up the warning.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202312060025.BdeqZrWx-lkp@intel.com/
Fixes: e560518a6c2e ("drm/bridge: implement generic DP HPD bridge")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
 include/drm/bridge/aux-bridge.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Guenter Roeck Dec. 5, 2023, 8:59 p.m. UTC | #1
On 12/5/23 12:13, Nathan Chancellor wrote:
> sparse complains:
> 
>    drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c: note: in included file:
>    include/drm/bridge/aux-bridge.h:29:16: sparse: sparse: Using plain integer as NULL pointer
> 
> Return NULL to clear up the warning.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202312060025.BdeqZrWx-lkp@intel.com/
> Fixes: e560518a6c2e ("drm/bridge: implement generic DP HPD bridge")
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Bryan O'Donoghue Dec. 5, 2023, 10:04 p.m. UTC | #2
On 05/12/2023 21:13, Nathan Chancellor wrote:
> sparse complains:
> 
>    drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c: note: in included file:
>    include/drm/bridge/aux-bridge.h:29:16: sparse: sparse: Using plain integer as NULL pointer
> 
> Return NULL to clear up the warning.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202312060025.BdeqZrWx-lkp@intel.com/
> Fixes: e560518a6c2e ("drm/bridge: implement generic DP HPD bridge")
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
>   include/drm/bridge/aux-bridge.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/drm/bridge/aux-bridge.h b/include/drm/bridge/aux-bridge.h
> index 66249ff0858e..c4c423e97f06 100644
> --- a/include/drm/bridge/aux-bridge.h
> +++ b/include/drm/bridge/aux-bridge.h
> @@ -26,7 +26,7 @@ void drm_aux_hpd_bridge_notify(struct device *dev, enum drm_connector_status sta
>   static inline struct device *drm_dp_hpd_bridge_register(struct device *parent,
>   							struct device_node *np)
>   {
> -	return 0;
> +	return NULL;
>   }
>   
>   static inline void drm_aux_hpd_bridge_notify(struct device *dev, enum drm_connector_status status)
> 

Nice

Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
diff mbox series

Patch

diff --git a/include/drm/bridge/aux-bridge.h b/include/drm/bridge/aux-bridge.h
index 66249ff0858e..c4c423e97f06 100644
--- a/include/drm/bridge/aux-bridge.h
+++ b/include/drm/bridge/aux-bridge.h
@@ -26,7 +26,7 @@  void drm_aux_hpd_bridge_notify(struct device *dev, enum drm_connector_status sta
 static inline struct device *drm_dp_hpd_bridge_register(struct device *parent,
 							struct device_node *np)
 {
-	return 0;
+	return NULL;
 }
 
 static inline void drm_aux_hpd_bridge_notify(struct device *dev, enum drm_connector_status status)