* [PATCH] power: supply: qcom_battmgr: fix enable request endianness
@ 2023-09-29 10:16 Johan Hovold
2023-09-29 12:59 ` Andrew Halaney
2023-09-30 20:28 ` Sebastian Reichel
0 siblings, 2 replies; 3+ messages in thread
From: Johan Hovold @ 2023-09-29 10:16 UTC (permalink / raw)
To: Sebastian Reichel
Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, linux-arm-msm,
linux-pm, linux-kernel, Johan Hovold, stable
Add the missing endianness conversion when sending the enable request so
that the driver will work also on a hypothetical big-endian machine.
This issue was reported by sparse.
Fixes: 29e8142b5623 ("power: supply: Introduce Qualcomm PMIC GLINK power supply")
Cc: stable@vger.kernel.org # 6.3
Cc: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
drivers/power/supply/qcom_battmgr.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/power/supply/qcom_battmgr.c b/drivers/power/supply/qcom_battmgr.c
index de77df97b3a4..6ec71276bb70 100644
--- a/drivers/power/supply/qcom_battmgr.c
+++ b/drivers/power/supply/qcom_battmgr.c
@@ -1282,9 +1282,9 @@ static void qcom_battmgr_enable_worker(struct work_struct *work)
{
struct qcom_battmgr *battmgr = container_of(work, struct qcom_battmgr, enable_work);
struct qcom_battmgr_enable_request req = {
- .hdr.owner = PMIC_GLINK_OWNER_BATTMGR,
- .hdr.type = PMIC_GLINK_NOTIFY,
- .hdr.opcode = BATTMGR_REQUEST_NOTIFICATION,
+ .hdr.owner = cpu_to_le32(PMIC_GLINK_OWNER_BATTMGR),
+ .hdr.type = cpu_to_le32(PMIC_GLINK_NOTIFY),
+ .hdr.opcode = cpu_to_le32(BATTMGR_REQUEST_NOTIFICATION),
};
int ret;
--
2.41.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] power: supply: qcom_battmgr: fix enable request endianness
2023-09-29 10:16 [PATCH] power: supply: qcom_battmgr: fix enable request endianness Johan Hovold
@ 2023-09-29 12:59 ` Andrew Halaney
2023-09-30 20:28 ` Sebastian Reichel
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Halaney @ 2023-09-29 12:59 UTC (permalink / raw)
To: Johan Hovold
Cc: Sebastian Reichel, Andy Gross, Bjorn Andersson, Konrad Dybcio,
linux-arm-msm, linux-pm, linux-kernel, stable
On Fri, Sep 29, 2023 at 12:16:49PM +0200, Johan Hovold wrote:
> Add the missing endianness conversion when sending the enable request so
> that the driver will work also on a hypothetical big-endian machine.
>
> This issue was reported by sparse.
>
> Fixes: 29e8142b5623 ("power: supply: Introduce Qualcomm PMIC GLINK power supply")
> Cc: stable@vger.kernel.org # 6.3
> Cc: Bjorn Andersson <andersson@kernel.org>
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] power: supply: qcom_battmgr: fix enable request endianness
2023-09-29 10:16 [PATCH] power: supply: qcom_battmgr: fix enable request endianness Johan Hovold
2023-09-29 12:59 ` Andrew Halaney
@ 2023-09-30 20:28 ` Sebastian Reichel
1 sibling, 0 replies; 3+ messages in thread
From: Sebastian Reichel @ 2023-09-30 20:28 UTC (permalink / raw)
To: Sebastian Reichel, Johan Hovold
Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, linux-arm-msm,
linux-pm, linux-kernel, stable
On Fri, 29 Sep 2023 12:16:49 +0200, Johan Hovold wrote:
> Add the missing endianness conversion when sending the enable request so
> that the driver will work also on a hypothetical big-endian machine.
>
> This issue was reported by sparse.
>
>
Applied, thanks!
[1/1] power: supply: qcom_battmgr: fix enable request endianness
commit: 8894b432548851f705f72ff135d3dcbd442a18d1
Best regards,
--
Sebastian Reichel <sebastian.reichel@collabora.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-09-30 20:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-29 10:16 [PATCH] power: supply: qcom_battmgr: fix enable request endianness Johan Hovold
2023-09-29 12:59 ` Andrew Halaney
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;
as well as URLs for NNTP newsgroup(s).