Skip to contentSkip to conversation

soc: qcom: ubwc: Fix missing include

PATCH In review Daniel Baluta 3 participants 3 messages Aug 12 – Aug 17

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 soc: qcom: ubwc: Fix missing include

When CONFIG_QCOM_UBWC_CONFIG=n, compiler needs to know the definition of ERR_PTR otherwise there will be a compilation error:

In file included from drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp_v13.c:7:
./include/linux/soc/qcom/ubwc.h: In function ‘qcom_ubwc_config_get_data’:
./include/linux/soc/qcom/ubwc.h:45:16: error: implicit declaration of function ‘ERR_PTR’ [-Wimplicit-function-declaration]

Fix this by including <linux/err.h>

Fixes 1924272b9ce1 ("soc: qcom: Add UBWC config provider")
---
 include/linux/soc/qcom/ubwc.h | 1 +
 1 file changed, 1 insertion(+)
include/linux/soc/qcom/ubwc.h +1 -0
index a7372d9c25fbc..f3a70360b177b 100644
@@ -8,6 +8,7 @@
 #define __QCOM_UBWC_H__
 
 #include <linux/bits.h>
+#include <linux/err.h>
 #include <linux/printk.h>
 #include <linux/types.h>
 
Signature · 1 line
2.45.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Daniel Baluta

When CONFIG_QCOM_UBWC_CONFIG=n, compiler needs to know the definition of ERR_PTR otherwise there will be a compilation error:

In file included from drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp_v13.c:7:
./include/linux/soc/qcom/ubwc.h: In function ‘qcom_ubwc_config_get_data’:
./include/linux/soc/qcom/ubwc.h:45:16: error: implicit declaration of function ‘ERR_PTR’ [-Wimplicit-function-declaration]

Quoted 8 lines

Fix this by including <linux/err.h>

Fixes 1924272b9ce1 ("soc: qcom: Add UBWC config provider")
---
 include/linux/soc/qcom/ubwc.h | 1 +
 1 file changed, 1 insertion(+)
Signature · 2 lines
With best wishes
Dmitry
Reviewed-by on v1 1/1
#2 lore raw
In reply to Daniel Baluta
Quoted 8 lines · Daniel Baluta

When CONFIG_QCOM_UBWC_CONFIG=n, compiler needs to know the definition of ERR_PTR otherwise there will be a compilation error:

In file included from drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp_v13.c:7:
./include/linux/soc/qcom/ubwc.h: In function ‘qcom_ubwc_config_get_data’:
./include/linux/soc/qcom/ubwc.h:45:16: error: implicit declaration of function ‘ERR_PTR’ [-Wimplicit-function-declaration]

Quoted 5 lines

Fix this by including <linux/err.h>

Fixes 1924272b9ce1 ("soc: qcom: Add UBWC config provider")

---

Konrad