[PATCH] thermal: qcom: ipq5018: make ops_ipq5018 struct static

George Moussalem via B4 Relay posted 1 patch 6 months, 3 weeks ago
drivers/thermal/qcom/tsens-v1.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] thermal: qcom: ipq5018: make ops_ipq5018 struct static
Posted by George Moussalem via B4 Relay 6 months, 3 weeks ago
From: George Moussalem <george.moussalem@outlook.com>

Fix a sparse warning by making the ops_ipq5018 struct static.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202505202356.S21Sc7bk-lkp@intel.com/
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
---
Fix below sparse warning by making the ops_ipq5018 struct static.

sparse warnings: (new ones prefixed by >>)
>> drivers/thermal/qcom/tsens-v1.c:246:24: sparse: sparse: symbol 'ops_ipq5018' was not declared. Should it be static?

vim +/ops_ipq5018 +246 drivers/thermal/qcom/tsens-v1.c

   245	
 > 246	const struct tsens_ops ops_ipq5018 = {
   247		.init		= init_tsens_v1_no_rpm,
   248		.calibrate	= tsens_calibrate_common,
   249		.get_temp	= get_temp_tsens_valid,
   250	};
   251	
---
 drivers/thermal/qcom/tsens-v1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thermal/qcom/tsens-v1.c b/drivers/thermal/qcom/tsens-v1.c
index 27360e70d62a94e52e67f5aaa45457be165bfeb3..faa5d00788ca6fb29b367857d27596578218358e 100644
--- a/drivers/thermal/qcom/tsens-v1.c
+++ b/drivers/thermal/qcom/tsens-v1.c
@@ -243,7 +243,7 @@ struct tsens_plat_data data_8976 = {
 	.fields		= tsens_v1_regfields,
 };
 
-const struct tsens_ops ops_ipq5018 = {
+static const struct tsens_ops ops_ipq5018 = {
 	.init		= init_tsens_v1_no_rpm,
 	.calibrate	= tsens_calibrate_common,
 	.get_temp	= get_temp_tsens_valid,

---
base-commit: 54b982e44c486d604583efe8742557ab56c944e0
change-id: 20250521-ipq5018-tsens-sparse-4b86d97dbb17

Best regards,
-- 
George Moussalem <george.moussalem@outlook.com>
Re: [PATCH] thermal: qcom: ipq5018: make ops_ipq5018 struct static
Posted by Dmitry Baryshkov 6 months, 3 weeks ago
On Thu, May 22, 2025 at 09:48:51AM +0400, George Moussalem via B4 Relay wrote:
> From: George Moussalem <george.moussalem@outlook.com>
> 
> Fix a sparse warning by making the ops_ipq5018 struct static.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202505202356.S21Sc7bk-lkp@intel.com/
> Signed-off-by: George Moussalem <george.moussalem@outlook.com>
> ---
> Fix below sparse warning by making the ops_ipq5018 struct static.
> 
> sparse warnings: (new ones prefixed by >>)
> >> drivers/thermal/qcom/tsens-v1.c:246:24: sparse: sparse: symbol 'ops_ipq5018' was not declared. Should it be static?
> 
> vim +/ops_ipq5018 +246 drivers/thermal/qcom/tsens-v1.c
> 
>    245	
>  > 246	const struct tsens_ops ops_ipq5018 = {
>    247		.init		= init_tsens_v1_no_rpm,
>    248		.calibrate	= tsens_calibrate_common,
>    249		.get_temp	= get_temp_tsens_valid,
>    250	};
>    251	
> ---
>  drivers/thermal/qcom/tsens-v1.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Fixes: 04b31cc53fe0 ("thermal/drivers/qcom/tsens: Add support for IPQ5018 tsens")
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry
Re: [PATCH] thermal: qcom: ipq5018: make ops_ipq5018 struct static
Posted by Rafael J. Wysocki 6 months, 3 weeks ago
On Thu, May 22, 2025 at 2:46 PM Dmitry Baryshkov
<dmitry.baryshkov@oss.qualcomm.com> wrote:
>
> On Thu, May 22, 2025 at 09:48:51AM +0400, George Moussalem via B4 Relay wrote:
> > From: George Moussalem <george.moussalem@outlook.com>
> >
> > Fix a sparse warning by making the ops_ipq5018 struct static.
> >
> > Reported-by: kernel test robot <lkp@intel.com>
> > Closes: https://lore.kernel.org/oe-kbuild-all/202505202356.S21Sc7bk-lkp@intel.com/
> > Signed-off-by: George Moussalem <george.moussalem@outlook.com>
> > ---
> > Fix below sparse warning by making the ops_ipq5018 struct static.
> >
> > sparse warnings: (new ones prefixed by >>)
> > >> drivers/thermal/qcom/tsens-v1.c:246:24: sparse: sparse: symbol 'ops_ipq5018' was not declared. Should it be static?
> >
> > vim +/ops_ipq5018 +246 drivers/thermal/qcom/tsens-v1.c
> >
> >    245
> >  > 246        const struct tsens_ops ops_ipq5018 = {
> >    247                .init           = init_tsens_v1_no_rpm,
> >    248                .calibrate      = tsens_calibrate_common,
> >    249                .get_temp       = get_temp_tsens_valid,
> >    250        };
> >    251
> > ---
> >  drivers/thermal/qcom/tsens-v1.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
>
> Fixes: 04b31cc53fe0 ("thermal/drivers/qcom/tsens: Add support for IPQ5018 tsens")
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>

Applied as 6.16 material, thanks!