From: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
To: Bjorn Andersson <andersson@kernel.org>,
Alexander Wilhelm <alexander.wilhelm@westermo.com>,
Chris Lew <christopher.lew@oss.qualcomm.com>
Cc: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>,
Konrad Dybcio <konradybcio@kernel.org>,
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
David Heidelberg <david@ixit.cz>,
Jeff Johnson <jjohnson@kernel.org>,
ath11k@lists.infradead.org, ath12k@lists.infradead.org
Subject: Re: [PATCH 1/2] soc: qcom: qmi: Fix "invalid data length" in encoder
Date: Wed, 18 Feb 2026 10:00:22 -0800 [thread overview]
Message-ID: <608ff2a7-775e-46ae-ba8b-9d9c2f8219bc@oss.qualcomm.com> (raw)
In-Reply-To: <vexuybqdbf6wx5dxlcdlcy6lwqmxmzonorjn6x5zlzdpxzi3yo@pcqbxitzed2m>
On 2/16/2026 7:25 AM, Bjorn Andersson wrote:
> It might very well be that the underlying bug is my expectation that
> elem_size should be reflected in the struct and not only in the encoded
> message, and hence what I wrote in https://github.com/linux-msm/qmic.
> Perhaps the length-specifier of an array should always be u32?
>
> @Chris, what does the downstream generator produce here?
Is this behavior just constrained to QMI_DATA_LEN TLVs?
I'm looking at downstream Android WLAN code and it has the same discrepancy,
so it appears the code generator is always producing a u32 member in the host
struct to hold a QMI_DATA_LEN member even though the actual element size as
defined in the qmi_elem_info array is either sizeof(u8) or sizeof(u16).
Does this issue get fixed if we change the member in the host struct, i.e. for
the issue mentioned (that I chopped off) modify:
struct qmi_wlanfw_request_mem_ind_msg_v01 {
- u32 mem_seg_len;
+ u8 mem_seg_len;
next prev parent reply other threads:[~2026-02-18 18:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-14 21:16 [PATCH 0/2] soc: qcom: qmi: Fix endianess-related issues in encdec Bjorn Andersson
2026-02-14 21:16 ` [PATCH 1/2] soc: qcom: qmi: Fix "invalid data length" in encoder Bjorn Andersson
2026-02-16 8:58 ` Alexander Wilhelm
2026-02-16 15:25 ` Bjorn Andersson
2026-02-18 18:00 ` Jeff Johnson [this message]
2026-02-18 18:53 ` Bjorn Andersson
2026-02-19 19:18 ` Bjorn Andersson
2026-02-19 21:25 ` Jeff Johnson
2026-02-20 3:20 ` Bjorn Andersson
2026-02-14 21:16 ` [PATCH 2/2] soc: qcom: qmi: Avoid splatting the "length" destination field 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=608ff2a7-775e-46ae-ba8b-9d9c2f8219bc@oss.qualcomm.com \
--to=jeff.johnson@oss.qualcomm.com \
--cc=alexander.wilhelm@westermo.com \
--cc=andersson@kernel.org \
--cc=ath11k@lists.infradead.org \
--cc=ath12k@lists.infradead.org \
--cc=bjorn.andersson@oss.qualcomm.com \
--cc=christopher.lew@oss.qualcomm.com \
--cc=david@ixit.cz \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=jjohnson@kernel.org \
--cc=konradybcio@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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