Re: [PATCH v1 4/7] soc: qcom: geni-se:: Add support to load QUP SE Firmware via Linux subsystem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.13-rc1 next-20241204]
[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-i2c-qcom-i2c-geni-Document-DT-properties-for-QUP-firmware-loading/20241204-230736
base:   https://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git i2c/i2c-host
patch link:    https://lore.kernel.org/r/20241204150326.1470749-5-quic_vdadhani%40quicinc.com
patch subject: [PATCH v1 4/7] soc: qcom: geni-se:: Add support to load QUP SE Firmware via Linux subsystem
config: arm-randconfig-002 (https://download.01.org/0day-ci/archive/20241205/202412050429.SJvNsU2f-lkp@xxxxxxxxx/config)
compiler: arm-linux-gnueabi-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241205/202412050429.SJvNsU2f-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412050429.SJvNsU2f-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   drivers/soc/qcom/qcom-geni-se.c: In function 'read_elf':
>> drivers/soc/qcom/qcom-geni-se.c:975:23: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     975 |                 *phdr = &phdrs[i];
         |                       ^
   drivers/soc/qcom/qcom-geni-se.c: At top level:
   drivers/soc/qcom/qcom-geni-se.c:1268:5: warning: no previous prototype for 'qup_fw_load' [-Wmissing-prototypes]
    1268 | int qup_fw_load(struct qup_se_rsc *rsc)
         |     ^~~~~~~~~~~


vim +/const +975 drivers/soc/qcom/qcom-geni-se.c

   946	
   947	/**
   948	 * read_elf: Function to read elf file.
   949	 * @rsc: A pointer to SE resources structure.
   950	 * @fw: A pointer to the fw buffer.
   951	 * @pelfseg: A pointer to SE specific elf header.
   952	 * @phdr: pointer to one of the valid headers from list from fw buffer.
   953	 *
   954	 * This function reads the ELF file and outputs the pointer to header
   955	 * data which contains the FW data and any other details.
   956	 *
   957	 * return: Return 0 if no error, else return error value.
   958	 */
   959	static int read_elf(struct qup_se_rsc *rsc, const struct firmware *fw,
   960			    struct elf_se_hdr **pelfseg, struct elf32_phdr **phdr)
   961	{
   962		const struct elf32_phdr *phdrs;
   963		const struct elf32_hdr *ehdr;
   964		const u8 *addr;
   965		int i;
   966	
   967		ehdr = (struct elf32_hdr *)fw->data;
   968	
   969		if (ehdr->e_phnum < 2)
   970			return -EINVAL;
   971	
   972		phdrs = (struct elf32_phdr *)(ehdr + 1);
   973	
   974		for (i = 0; i < ehdr->e_phnum; i++) {
 > 975			*phdr = &phdrs[i];
   976			if (!elf_phdr_valid(*phdr))
   977				continue;
   978	
   979			if ((*phdr)->p_filesz >= sizeof(struct elf_se_hdr)) {
   980				addr =  fw->data + (*phdr)->p_offset;
   981				*pelfseg = (struct elf_se_hdr *)addr;
   982	
   983				if ((*pelfseg)->magic == MAGIC_NUM_SE &&
   984				    (*pelfseg)->version == 1 &&
   985				    valid_seg_size(*pelfseg, (*phdr)->p_filesz))
   986					if ((*pelfseg)->serial_protocol == rsc->protocol &&
   987					    (*pelfseg)->serial_protocol != GENI_SE_NONE)
   988						return 0;
   989			}
   990		}
   991		return -EINVAL;
   992	}
   993	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux