public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] power: supply: qcom_battmgr: fix battery_id type
@ 2023-09-19 12:42 Sebastian Reichel
  2023-09-28 13:38 ` Sebastian Reichel
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Sebastian Reichel @ 2023-09-19 12:42 UTC (permalink / raw)
  To: Sebastian Reichel, Andy Gross, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, linux-pm, linux-kernel, Sebastian Reichel,
	kernel test robot

qcom_battmgr_update_request.battery_id is written to using cpu_to_le32()
and should be of type __le32, just like all other 32bit integer requests
for qcom_battmgr.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202309162149.4owm9iXc-lkp@intel.com/
Fixes: 29e8142b5623 ("power: supply: Introduce Qualcomm PMIC GLINK power supply")
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
 drivers/power/supply/qcom_battmgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/supply/qcom_battmgr.c b/drivers/power/supply/qcom_battmgr.c
index de77df97b3a4..a05fd00711f6 100644
--- a/drivers/power/supply/qcom_battmgr.c
+++ b/drivers/power/supply/qcom_battmgr.c
@@ -105,7 +105,7 @@ struct qcom_battmgr_property_request {
 
 struct qcom_battmgr_update_request {
 	struct pmic_glink_hdr hdr;
-	u32 battery_id;
+	__le32 battery_id;
 };
 
 struct qcom_battmgr_charge_time_request {
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] power: supply: qcom_battmgr: fix battery_id type
  2023-09-19 12:42 [PATCH] power: supply: qcom_battmgr: fix battery_id type Sebastian Reichel
@ 2023-09-28 13:38 ` Sebastian Reichel
  2023-09-29 10:04 ` Johan Hovold
  2023-09-30 20:28 ` Sebastian Reichel
  2 siblings, 0 replies; 5+ messages in thread
From: Sebastian Reichel @ 2023-09-28 13:38 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Johan Hovold
  Cc: linux-arm-msm, linux-pm, linux-kernel, kernel test robot

[-- Attachment #1: Type: text/plain, Size: 1217 bytes --]

+cc Johan Hovold who gave away that he is involved with this at
Kernel Recipes :)

On Tue, Sep 19, 2023 at 02:42:22PM +0200, Sebastian Reichel wrote:
> qcom_battmgr_update_request.battery_id is written to using cpu_to_le32()
> and should be of type __le32, just like all other 32bit integer requests
> for qcom_battmgr.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202309162149.4owm9iXc-lkp@intel.com/
> Fixes: 29e8142b5623 ("power: supply: Introduce Qualcomm PMIC GLINK power supply")
> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
> ---
>  drivers/power/supply/qcom_battmgr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/power/supply/qcom_battmgr.c b/drivers/power/supply/qcom_battmgr.c
> index de77df97b3a4..a05fd00711f6 100644
> --- a/drivers/power/supply/qcom_battmgr.c
> +++ b/drivers/power/supply/qcom_battmgr.c
> @@ -105,7 +105,7 @@ struct qcom_battmgr_property_request {
>  
>  struct qcom_battmgr_update_request {
>  	struct pmic_glink_hdr hdr;
> -	u32 battery_id;
> +	__le32 battery_id;
>  };
>  
>  struct qcom_battmgr_charge_time_request {
> -- 
> 2.40.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] power: supply: qcom_battmgr: fix battery_id type
  2023-09-19 12:42 [PATCH] power: supply: qcom_battmgr: fix battery_id type Sebastian Reichel
  2023-09-28 13:38 ` Sebastian Reichel
@ 2023-09-29 10:04 ` Johan Hovold
  2023-09-29 10:21   ` Johan Hovold
  2023-09-30 20:28 ` Sebastian Reichel
  2 siblings, 1 reply; 5+ messages in thread
From: Johan Hovold @ 2023-09-29 10:04 UTC (permalink / raw)
  To: Sebastian Reichel
  Cc: Sebastian Reichel, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	linux-arm-msm, linux-pm, linux-kernel, kernel test robot

On Tue, Sep 19, 2023 at 02:42:22PM +0200, Sebastian Reichel wrote:
> qcom_battmgr_update_request.battery_id is written to using cpu_to_le32()
> and should be of type __le32, just like all other 32bit integer requests
> for qcom_battmgr.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202309162149.4owm9iXc-lkp@intel.com/
> Fixes: 29e8142b5623 ("power: supply: Introduce Qualcomm PMIC GLINK power supply")
> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
> ---
>  drivers/power/supply/qcom_battmgr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/power/supply/qcom_battmgr.c b/drivers/power/supply/qcom_battmgr.c
> index de77df97b3a4..a05fd00711f6 100644
> --- a/drivers/power/supply/qcom_battmgr.c
> +++ b/drivers/power/supply/qcom_battmgr.c
> @@ -105,7 +105,7 @@ struct qcom_battmgr_property_request {
>  
>  struct qcom_battmgr_update_request {
>  	struct pmic_glink_hdr hdr;
> -	u32 battery_id;
> +	__le32 battery_id;
>  };
>  
>  struct qcom_battmgr_charge_time_request {

I can confirm that this addresses the corresponding sparse warnings:

Reviewed-by: Johan Hovold <johan+linaro@kernel.org>

I'll send a fix for the remaining warnings...

Johan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] power: supply: qcom_battmgr: fix battery_id type
  2023-09-29 10:04 ` Johan Hovold
@ 2023-09-29 10:21   ` Johan Hovold
  0 siblings, 0 replies; 5+ messages in thread
From: Johan Hovold @ 2023-09-29 10:21 UTC (permalink / raw)
  To: Sebastian Reichel
  Cc: Sebastian Reichel, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	linux-arm-msm, linux-pm, linux-kernel, kernel test robot

On Fri, Sep 29, 2023 at 12:04:04PM +0200, Johan Hovold wrote:
> On Tue, Sep 19, 2023 at 02:42:22PM +0200, Sebastian Reichel wrote:
> > qcom_battmgr_update_request.battery_id is written to using cpu_to_le32()
> > and should be of type __le32, just like all other 32bit integer requests
> > for qcom_battmgr.
> > 
> > Reported-by: kernel test robot <lkp@intel.com>
> > Closes: https://lore.kernel.org/oe-kbuild-all/202309162149.4owm9iXc-lkp@intel.com/
> > Fixes: 29e8142b5623 ("power: supply: Introduce Qualcomm PMIC GLINK power supply")

I think you should add

Cc: stable@vger.kernel.org      # 6.3

when applying as the robots may run sparse on the stable trees as well.

> > Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>

> Reviewed-by: Johan Hovold <johan+linaro@kernel.org>

Johan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] power: supply: qcom_battmgr: fix battery_id type
  2023-09-19 12:42 [PATCH] power: supply: qcom_battmgr: fix battery_id type Sebastian Reichel
  2023-09-28 13:38 ` Sebastian Reichel
  2023-09-29 10:04 ` Johan Hovold
@ 2023-09-30 20:28 ` Sebastian Reichel
  2 siblings, 0 replies; 5+ messages in thread
From: Sebastian Reichel @ 2023-09-30 20:28 UTC (permalink / raw)
  To: Sebastian Reichel, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Sebastian Reichel
  Cc: linux-arm-msm, linux-pm, linux-kernel, kernel test robot


On Tue, 19 Sep 2023 14:42:22 +0200, Sebastian Reichel wrote:
> qcom_battmgr_update_request.battery_id is written to using cpu_to_le32()
> and should be of type __le32, just like all other 32bit integer requests
> for qcom_battmgr.
> 
> 

Applied, thanks!

[1/1] power: supply: qcom_battmgr: fix battery_id type
      commit: 383eba9f9a7f4cd639d367ea5daa6df2be392c54

Best regards,
-- 
Sebastian Reichel <sebastian.reichel@collabora.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-09-30 20:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-19 12:42 [PATCH] power: supply: qcom_battmgr: fix battery_id type Sebastian Reichel
2023-09-28 13:38 ` Sebastian Reichel
2023-09-29 10:04 ` Johan Hovold
2023-09-29 10:21   ` Johan Hovold
2023-09-30 20:28 ` Sebastian Reichel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox