From: kernel test robot <lkp@intel.com>
To: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>,
andi.shyti@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, gregkh@linuxfoundation.org,
jirislaby@kernel.org, andersson@kernel.org,
konradybcio@kernel.org, johan+linaro@kernel.org,
dianders@chromium.org, agross@kernel.org,
linux-arm-msm@vger.kernel.org, linux-i2c@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-serial@vger.kernel.org, linux-spi@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, mukesh.savaliya@oss.qualcomm.com,
quic_anupkulk@quicinc.com,
Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>
Subject: Re: [PATCH v5 2/5] soc: qcom: geni-se: Add support to load QUP SE Firmware via Linux subsystem
Date: Sat, 28 Jun 2025 11:42:00 +0800 [thread overview]
Message-ID: <202506281152.eY0YQpxs-lkp@intel.com> (raw)
In-Reply-To: <20250624095102.1587580-3-viken.dadhaniya@oss.qualcomm.com>
Hi Viken,
kernel test robot noticed the following build warnings:
[auto build test WARNING on andi-shyti/i2c/i2c-host]
[also build test WARNING on tty/tty-testing tty/tty-next tty/tty-linus broonie-spi/for-next linus/master v6.16-rc3 next-20250627]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Viken-Dadhaniya/dt-bindings-qcom-se-common-Add-QUP-Peripheral-specific-properties-for-I2C-SPI-and-SERIAL-bus/20250624-175308
base: https://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git i2c/i2c-host
patch link: https://lore.kernel.org/r/20250624095102.1587580-3-viken.dadhaniya%40oss.qualcomm.com
patch subject: [PATCH v5 2/5] soc: qcom: geni-se: Add support to load QUP SE Firmware via Linux subsystem
config: alpha-randconfig-r122-20250628 (https://download.01.org/0day-ci/archive/20250628/202506281152.eY0YQpxs-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 14.3.0
reproduce: (https://download.01.org/0day-ci/archive/20250628/202506281152.eY0YQpxs-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202506281152.eY0YQpxs-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/soc/qcom/qcom-geni-se.c:941:21: sparse: sparse: cast from restricted __le32
>> drivers/soc/qcom/qcom-geni-se.c:941:21: sparse: sparse: restricted __le32 degrades to integer
vim +941 drivers/soc/qcom/qcom-geni-se.c
891
892 /**
893 * geni_read_elf() - Read an ELF file.
894 * @se: Pointer to the SE resources structure.
895 * @fw: Pointer to the firmware buffer.
896 * @pelfseg: Pointer to the SE-specific ELF header.
897 *
898 * Read the ELF file and output a pointer to the header data, which
899 * contains the firmware data and any other details.
900 *
901 * Return: 0 if successful, otherwise return an error value.
902 */
903 static int geni_read_elf(struct geni_se *se, const struct firmware *fw, struct se_fw_hdr **pelfseg)
904 {
905 const struct elf32_hdr *ehdr;
906 struct elf32_phdr *phdrs, *phdr;
907 const struct se_fw_hdr *elfseg;
908 const u8 *addr;
909 int i;
910
911 if (!fw || fw->size < sizeof(struct elf32_hdr))
912 return -EINVAL;
913
914 ehdr = (struct elf32_hdr *)fw->data;
915 phdrs = (struct elf32_phdr *)(ehdr + 1);
916
917 if (ehdr->e_phnum < 2)
918 return -EINVAL;
919
920 for (i = 0; i < ehdr->e_phnum; i++) {
921 phdr = &phdrs[i];
922
923 if (fw->size < phdr->p_offset + phdr->p_filesz)
924 return -EINVAL;
925
926 if (phdr->p_type != PT_LOAD || !phdr->p_memsz)
927 continue;
928
929 if (MI_PBT_PAGE_MODE_VALUE(phdr->p_flags) != MI_PBT_NON_PAGED_SEGMENT ||
930 MI_PBT_SEGMENT_TYPE_VALUE(phdr->p_flags) == MI_PBT_HASH_SEGMENT ||
931 MI_PBT_ACCESS_TYPE_VALUE(phdr->p_flags) == MI_PBT_NOTUSED_SEGMENT ||
932 MI_PBT_ACCESS_TYPE_VALUE(phdr->p_flags) == MI_PBT_SHARED_SEGMENT)
933 continue;
934
935 if (phdr->p_filesz < sizeof(struct se_fw_hdr))
936 continue;
937
938 addr = fw->data + phdr->p_offset;
939 elfseg = (const struct se_fw_hdr *)addr;
940
> 941 if (cpu_to_le32(elfseg->magic) != MAGIC_NUM_SE || elfseg->version != 1)
942 continue;
943
944 if (phdr->p_filesz < elfseg->fw_offset +
945 elfseg->fw_size_in_items * sizeof(u32) ||
946 phdr->p_filesz < elfseg->cfg_idx_offset +
947 elfseg->cfg_size_in_items * sizeof(u8) ||
948 phdr->p_filesz < elfseg->cfg_val_offset +
949 elfseg->cfg_size_in_items * sizeof(u32))
950 continue;
951
952 if (elfseg->serial_protocol != se->protocol)
953 continue;
954
955 *pelfseg = (struct se_fw_hdr *)addr;
956 return 0;
957 }
958 return -EINVAL;
959 }
960
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-06-28 3:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-24 9:50 [PATCH v5 0/5] Add support to load QUP SE firmware from Viken Dadhaniya
2025-06-24 9:50 ` [PATCH v5 1/5] dt-bindings: qcom: se-common: Add QUP Peripheral-specific properties for I2C, SPI, and SERIAL bus Viken Dadhaniya
2025-06-24 9:50 ` [PATCH v5 2/5] soc: qcom: geni-se: Add support to load QUP SE Firmware via Linux subsystem Viken Dadhaniya
2025-06-28 3:42 ` kernel test robot [this message]
2025-07-16 23:27 ` Bjorn Andersson
2025-08-22 7:43 ` Viken Dadhaniya
2025-06-24 9:51 ` [PATCH v5 3/5] i2c: qcom-geni: Load i2c qup Firmware from linux side Viken Dadhaniya
2025-07-02 18:02 ` Andi Shyti
2025-06-24 9:51 ` [PATCH v5 4/5] spi: geni-qcom: Load spi " Viken Dadhaniya
2025-06-24 9:51 ` [PATCH v5 5/5] serial: qcom-geni: Load UART " Viken Dadhaniya
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=202506281152.eY0YQpxs-lkp@intel.com \
--to=lkp@intel.com \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=andi.shyti@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dianders@chromium.org \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=johan+linaro@kernel.org \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=mukesh.savaliya@oss.qualcomm.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=quic_anupkulk@quicinc.com \
--cc=robh@kernel.org \
--cc=viken.dadhaniya@oss.qualcomm.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;
as well as URLs for NNTP newsgroup(s).