Hi Manikanta,

kernel test robot noticed the following build warnings:

[auto build test WARNING on robh/for-next]
[also build test WARNING on linus/master arnd-asm-generic/master v6.17-rc7 
next-20250924]
[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/Manikanta-Guntupalli/dt-bindings-i3c-Add-AMD-I3C-master-controller-support/20250923-234944
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
patch link:    
https://lore.kernel.org/r/20250923154551.2112388-4-manikanta.guntupalli%40amd.com
patch subject: [PATCH V7 3/4] i3c: master: Add endianness support for 
i3c_readl_fifo() and i3c_writel_fifo()
config: mips-randconfig-r123-20250925 
(https://download.01.org/0day-ci/archive/20250925/[email protected]/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 
cafc064fc7a96b3979a023ddae1da2b499d6c954)
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20250925/[email protected]/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 <[email protected]>
| Closes: 
https://lore.kernel.org/oe-kbuild-all/[email protected]/

sparse warnings: (new ones prefixed by >>)
   drivers/i3c/master/i3c-master-cdns.c: note: in included file:
>> drivers/i3c/master/../internals.h:53:25: sparse: sparse: incorrect type in 
>> argument 1 (different base types) @@     expected unsigned int [usertype] 
>> val @@     got restricted __be32 [usertype] @@
   drivers/i3c/master/../internals.h:53:25: sparse:     expected unsigned int 
[usertype] val
   drivers/i3c/master/../internals.h:53:25: sparse:     got restricted __be32 
[usertype]
>> drivers/i3c/master/../internals.h:53:25: sparse: sparse: incorrect type in 
>> argument 2 (different address spaces) @@     expected void volatile 
>> [noderef] __iomem *mem @@     got unsigned int * @@
   drivers/i3c/master/../internals.h:53:25: sparse:     expected void volatile 
[noderef] __iomem *mem
   drivers/i3c/master/../internals.h:53:25: sparse:     got unsigned int *
>> drivers/i3c/master/../internals.h:78:31: sparse: sparse: incorrect type in 
>> argument 1 (different address spaces) @@     expected void const volatile 
>> [noderef] __iomem *mem @@     got unsigned int * @@
   drivers/i3c/master/../internals.h:78:31: sparse:     expected void const 
volatile [noderef] __iomem *mem
   drivers/i3c/master/../internals.h:78:31: sparse:     got unsigned int *
>> drivers/i3c/master/../internals.h:78:31: sparse: sparse: cast to restricted 
>> __be32
>> drivers/i3c/master/../internals.h:78:31: sparse: sparse: incorrect type in 
>> argument 1 (different address spaces) @@     expected void const volatile 
>> [noderef] __iomem *mem @@     got unsigned int * @@
   drivers/i3c/master/../internals.h:78:31: sparse:     expected void const 
volatile [noderef] __iomem *mem
   drivers/i3c/master/../internals.h:78:31: sparse:     got unsigned int *
>> drivers/i3c/master/../internals.h:78:31: sparse: sparse: cast to restricted 
>> __be32

vim +53 drivers/i3c/master/../internals.h

    31  
    32  /**
    33   * i3c_writel_fifo - Write data buffer to 32bit FIFO
    34   * @addr: FIFO Address to write to
    35   * @buf: Pointer to the data bytes to write
    36   * @nbytes: Number of bytes to write
    37   * @endian: Endianness of FIFO write
    38   */
    39  static inline void i3c_writel_fifo(void __iomem *addr, const void *buf,
    40                                     int nbytes, enum i3c_fifo_endian 
endian)
    41  {
    42          if (endian)
    43                  writesl_be(addr, buf, nbytes / 4);
    44          else
    45                  writesl(addr, buf, nbytes / 4);
    46  
    47          if (nbytes & 3) {
    48                  u32 tmp = 0;
    49  
    50                  memcpy(&tmp, buf + (nbytes & ~3), nbytes & 3);
    51  
    52                  if (endian)
  > 53                          writel_be(tmp, addr);
    54                  else
    55                          writel(tmp, addr);
    56          }
    57  }
    58  
    59  /**
    60   * i3c_readl_fifo - Read data buffer from 32bit FIFO
    61   * @addr: FIFO Address to read from
    62   * @buf: Pointer to the buffer to store read bytes
    63   * @nbytes: Number of bytes to read
    64   * @endian: Endianness of FIFO read
    65   */
    66  static inline void i3c_readl_fifo(const void __iomem *addr, void *buf,
    67                                    int nbytes, enum i3c_fifo_endian 
endian)
    68  {
    69          if (endian)
    70                  readsl_be(addr, buf, nbytes / 4);
    71          else
    72                  readsl(addr, buf, nbytes / 4);
    73  
    74          if (nbytes & 3) {
    75                  u32 tmp;
    76  
    77                  if (endian)
  > 78                          tmp = readl_be(addr);
    79                  else
    80                          tmp = readl(addr);
    81  
    82                  memcpy(buf + (nbytes & ~3), &tmp, nbytes & 3);
    83          }
    84  }
    85  

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

Reply via email to