Re: [PATCH 2/3] crypto: inside-secure - Add fw_little_endian option

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

 



Hi Peter,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on herbert-cryptodev-2.6/master]
[also build test WARNING on herbert-crypto-2.6/master linus/master v6.0-rc6 next-20220920]
[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/Peter-Harliman-Liem/crypto-inside-secure-Expand-soc-data-structure/20220920-170235
base:   https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
config: parisc-randconfig-s051-20220921 (https://download.01.org/0day-ci/archive/20220921/202209211245.XnqzyM7N-lkp@xxxxxxxxx/config)
compiler: hppa-linux-gcc (GCC) 12.1.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-39-gce1a6720-dirty
        # https://github.com/intel-lab-lkp/linux/commit/637d1b2810d1e9da47b6a637f9cea7c5bb4bf765
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Peter-Harliman-Liem/crypto-inside-secure-Expand-soc-data-structure/20220920-170235
        git checkout 637d1b2810d1e9da47b6a637f9cea7c5bb4bf765
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=parisc SHELL=/bin/bash drivers/crypto/inside-secure/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>

sparse warnings: (new ones prefixed by >>)
>> drivers/crypto/inside-secure/safexcel.c:326:31: sparse: sparse: cast to restricted __le32
>> drivers/crypto/inside-secure/safexcel.c:326:31: sparse: sparse: cast to restricted __le32
>> drivers/crypto/inside-secure/safexcel.c:326:31: sparse: sparse: cast to restricted __le32
>> drivers/crypto/inside-secure/safexcel.c:326:31: sparse: sparse: cast to restricted __le32
>> drivers/crypto/inside-secure/safexcel.c:326:31: sparse: sparse: cast to restricted __le32
>> drivers/crypto/inside-secure/safexcel.c:326:31: sparse: sparse: cast to restricted __le32
   drivers/crypto/inside-secure/safexcel.c:328:31: sparse: sparse: cast to restricted __be32

vim +326 drivers/crypto/inside-secure/safexcel.c

   315	
   316	static int eip197_write_firmware(struct safexcel_crypto_priv *priv,
   317					  const struct firmware *fw)
   318	{
   319		const u32 *data = (const u32 *)fw->data;
   320		u32 val;
   321		int i;
   322	
   323		/* Write the firmware */
   324		for (i = 0; i < fw->size / sizeof(u32); i++) {
   325			if (priv->data->fw_little_endian)
 > 326				val = le32_to_cpu(data[i]);
   327			else
   328				val = be32_to_cpu(data[i]);
   329	
   330			writel(val,
   331			       priv->base + EIP197_CLASSIFICATION_RAMS +
   332			       i * sizeof(*data));
   333		}
   334	
   335		/* Exclude final 2 NOPs from size */
   336		return i - EIP197_FW_TERMINAL_NOPS;
   337	}
   338	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux