mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Neil Armstrong <neil.armstrong@linaro.org>
To: Andrew Halaney <ahalaney@redhat.com>,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel test robot <lkp@intel.com>
Subject: Re: [PATCH 3/3] soc: qcom: pmic_pdcharger_ulog: Fix hypothetical ulog request message endianess
Date: Tue, 12 Dec 2023 16:24:36 +0100	[thread overview]
Message-ID: <29afe196-7b73-425c-8200-78ffbe17e8c0@linaro.org> (raw)
In-Reply-To: <20231205-pmicpdcharger-ulog-fixups-v1-3-71c95162cb84@redhat.com>

On 06/12/2023 00:05, Andrew Halaney wrote:
> Sparse reports the following:
> 
>      % ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make C=2 W=1 drivers/soc/qcom/pmic_pdcharger_ulog.o
>      ...
>        CC      drivers/soc/qcom/pmic_pdcharger_ulog.o
>        CHECK   drivers/soc/qcom/pmic_pdcharger_ulog.c
>      drivers/soc/qcom/pmic_pdcharger_ulog.c:57:34: warning: incorrect type in initializer (different base types)
>      drivers/soc/qcom/pmic_pdcharger_ulog.c:57:34:    expected restricted __le32 [usertype] owner
>      drivers/soc/qcom/pmic_pdcharger_ulog.c:57:34:    got int
>      drivers/soc/qcom/pmic_pdcharger_ulog.c:58:33: warning: incorrect type in initializer (different base types)
>      drivers/soc/qcom/pmic_pdcharger_ulog.c:58:33:    expected restricted __le32 [usertype] type
>      drivers/soc/qcom/pmic_pdcharger_ulog.c:58:33:    got int
>      drivers/soc/qcom/pmic_pdcharger_ulog.c:59:35: warning: incorrect type in initializer (different base types)
>      drivers/soc/qcom/pmic_pdcharger_ulog.c:59:35:    expected restricted __le32 [usertype] opcode
>      drivers/soc/qcom/pmic_pdcharger_ulog.c:59:35:    got int
> 
> Let's deal with endianness conversion in the rare case this ever runs
> on a big-endian machine (and to quiet down sparse for this file).
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202312060355.M0eJtq4X-lkp@intel.com/
> Fixes: 086fdb48bc65 ("soc: qcom: add ADSP PDCharger ULOG driver")
> Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
> ---
>   drivers/soc/qcom/pmic_pdcharger_ulog.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/soc/qcom/pmic_pdcharger_ulog.c b/drivers/soc/qcom/pmic_pdcharger_ulog.c
> index f1aaacf05005..238cd38589dc 100644
> --- a/drivers/soc/qcom/pmic_pdcharger_ulog.c
> +++ b/drivers/soc/qcom/pmic_pdcharger_ulog.c
> @@ -54,9 +54,9 @@ static int pmic_pdcharger_ulog_request(struct pmic_pdcharger_ulog *pg)
>   {
>   	struct get_ulog_req_msg req_msg = {
>   		.hdr = {
> -			.owner = MSG_OWNER_CHG_ULOG,
> -			.type = MSG_TYPE_REQ_RESP,
> -			.opcode = GET_CHG_ULOG_REQ
> +			.owner = cpu_to_le32(MSG_OWNER_CHG_ULOG),
> +			.type = cpu_to_le32(MSG_TYPE_REQ_RESP),
> +			.opcode = cpu_to_le32(GET_CHG_ULOG_REQ)
>   		},
>   		.log_size = MAX_ULOG_SIZE
>   	};
> 

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

  reply	other threads:[~2023-12-12 15:24 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-05 23:05 [PATCH 0/3] soc: qcom: pmic_pdcharger_ulog: Fix compilation Andrew Halaney
2023-12-05 23:05 ` [PATCH 1/3] soc: qcom: pmic_pdcharger_ulog: Search current directory for headers Andrew Halaney
2023-12-12 15:23   ` Neil Armstrong
2023-12-12 15:54     ` Andrew Halaney
2023-12-12 16:15       ` Andrew Halaney
2023-12-12 16:52         ` Neil Armstrong
2023-12-12 19:21           ` Neil Armstrong
2023-12-12 22:21             ` Andrew Halaney
2023-12-13 10:23               ` Neil Armstrong
2023-12-13 15:05                 ` Andrew Halaney
2023-12-13 10:34   ` Neil Armstrong
2023-12-05 23:05 ` [PATCH 2/3] soc: qcom: pmic_pdcharger_ulog: Move TRACE_SYSTEM out of #if protection Andrew Halaney
2023-12-12 15:24   ` Neil Armstrong
2023-12-05 23:05 ` [PATCH 3/3] soc: qcom: pmic_pdcharger_ulog: Fix hypothetical ulog request message endianess Andrew Halaney
2023-12-12 15:24   ` Neil Armstrong [this message]
2023-12-17 17:20 ` [PATCH 0/3] soc: qcom: pmic_pdcharger_ulog: Fix compilation Bjorn Andersson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=29afe196-7b73-425c-8200-78ffbe17e8c0@linaro.org \
    --to=neil.armstrong@linaro.org \
    --cc=agross@kernel.org \
    --cc=ahalaney@redhat.com \
    --cc=andersson@kernel.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®