[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202408172325.mMMFMiZJ-lkp@intel.com>
Date: Sun, 18 Aug 2024 00:13:56 +0800
From: kernel test robot <lkp@...el.com>
To: Jianping.Shen@...bosch.com, jic23@...nel.org, lars@...afoo.de,
robh@...nel.org, krzk+dt@...nel.org, conor+dt@...nel.org,
dima.fedrau@...il.com, marcelo.schmitt1@...il.com,
linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, Christian.Lorenz3@...bosch.com,
Ulrike.Frauendorf@...bosch.com, Kai.Dolde@...bosch.com
Cc: oe-kbuild-all@...ts.linux.dev
Subject: Re: [PATCH v3 2/2] iio: imu: smi240: imu driver
Hi,
kernel test robot noticed the following build warnings:
[auto build test WARNING on jic23-iio/togreg]
[also build test WARNING on linus/master v6.11-rc3 next-20240816]
[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/Jianping-Shen-de-bosch-com/dt-bindings-iio-imu-smi240-devicetree-binding/20240815-234739
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
patch link: https://lore.kernel.org/r/20240815152545.7705-3-Jianping.Shen%40de.bosch.com
patch subject: [PATCH v3 2/2] iio: imu: smi240: imu driver
config: microblaze-randconfig-r132-20240817 (https://download.01.org/0day-ci/archive/20240817/202408172325.mMMFMiZJ-lkp@intel.com/config)
compiler: microblaze-linux-gcc (GCC) 14.1.0
reproduce: (https://download.01.org/0day-ci/archive/20240817/202408172325.mMMFMiZJ-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408172325.mMMFMiZJ-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
drivers/iio/imu/smi240/smi240_spi.c:69:17: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be32 [usertype] request @@ got int @@
drivers/iio/imu/smi240/smi240_spi.c:69:17: sparse: expected restricted __be32 [usertype] request
drivers/iio/imu/smi240/smi240_spi.c:69:17: sparse: got int
drivers/iio/imu/smi240/smi240_spi.c:70:17: sparse: sparse: invalid assignment: |=
drivers/iio/imu/smi240/smi240_spi.c:70:17: sparse: left side has type restricted __be32
drivers/iio/imu/smi240/smi240_spi.c:70:17: sparse: right side has type int
drivers/iio/imu/smi240/smi240_spi.c:71:17: sparse: sparse: invalid assignment: |=
drivers/iio/imu/smi240/smi240_spi.c:71:17: sparse: left side has type restricted __be32
drivers/iio/imu/smi240/smi240_spi.c:71:17: sparse: right side has type unsigned long
drivers/iio/imu/smi240/smi240_spi.c:72:32: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] data @@ got restricted __be32 [usertype] request @@
drivers/iio/imu/smi240/smi240_spi.c:72:32: sparse: expected unsigned int [usertype] data
drivers/iio/imu/smi240/smi240_spi.c:72:32: sparse: got restricted __be32 [usertype] request
drivers/iio/imu/smi240/smi240_spi.c:72:17: sparse: sparse: invalid assignment: |=
drivers/iio/imu/smi240/smi240_spi.c:72:17: sparse: left side has type restricted __be32
drivers/iio/imu/smi240/smi240_spi.c:72:17: sparse: right side has type unsigned char
>> drivers/iio/imu/smi240/smi240_spi.c:73:19: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __be32 [usertype] request @@
drivers/iio/imu/smi240/smi240_spi.c:73:19: sparse: expected unsigned int [usertype] val
drivers/iio/imu/smi240/smi240_spi.c:73:19: sparse: got restricted __be32 [usertype] request
drivers/iio/imu/smi240/smi240_spi.c:73:19: sparse: sparse: cast from restricted __be32
drivers/iio/imu/smi240/smi240_spi.c:73:19: sparse: sparse: cast from restricted __be32
drivers/iio/imu/smi240/smi240_spi.c:73:19: sparse: sparse: cast from restricted __be32
drivers/iio/imu/smi240/smi240_spi.c:73:19: sparse: sparse: cast from restricted __be32
drivers/iio/imu/smi240/smi240_spi.c:89:18: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be32 [addressable] [usertype] response @@ got unsigned int [usertype] @@
drivers/iio/imu/smi240/smi240_spi.c:89:18: sparse: expected restricted __be32 [addressable] [usertype] response
drivers/iio/imu/smi240/smi240_spi.c:89:18: sparse: got unsigned int [usertype]
drivers/iio/imu/smi240/smi240_spi.c:91:42: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] data @@ got restricted __be32 [addressable] [usertype] response @@
drivers/iio/imu/smi240/smi240_spi.c:91:42: sparse: expected unsigned int [usertype] data
drivers/iio/imu/smi240/smi240_spi.c:91:42: sparse: got restricted __be32 [addressable] [usertype] response
drivers/iio/imu/smi240/smi240_spi.c:94:20: sparse: sparse: cast to restricted __be32
drivers/iio/imu/smi240/smi240_spi.c:94:20: sparse: sparse: restricted __be32 degrades to integer
drivers/iio/imu/smi240/smi240_spi.c:94:20: sparse: sparse: restricted __be32 degrades to integer
drivers/iio/imu/smi240/smi240_spi.c:94:18: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be32 [addressable] [usertype] response @@ got unsigned long @@
drivers/iio/imu/smi240/smi240_spi.c:94:18: sparse: expected restricted __be32 [addressable] [usertype] response
drivers/iio/imu/smi240/smi240_spi.c:94:18: sparse: got unsigned long
drivers/iio/imu/smi240/smi240_spi.c:108:17: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be32 [usertype] request @@ got int @@
drivers/iio/imu/smi240/smi240_spi.c:108:17: sparse: expected restricted __be32 [usertype] request
drivers/iio/imu/smi240/smi240_spi.c:108:17: sparse: got int
drivers/iio/imu/smi240/smi240_spi.c:109:17: sparse: sparse: invalid assignment: |=
drivers/iio/imu/smi240/smi240_spi.c:109:17: sparse: left side has type restricted __be32
drivers/iio/imu/smi240/smi240_spi.c:109:17: sparse: right side has type int
drivers/iio/imu/smi240/smi240_spi.c:110:17: sparse: sparse: invalid assignment: |=
drivers/iio/imu/smi240/smi240_spi.c:110:17: sparse: left side has type restricted __be32
drivers/iio/imu/smi240/smi240_spi.c:110:17: sparse: right side has type unsigned long
drivers/iio/imu/smi240/smi240_spi.c:111:17: sparse: sparse: invalid assignment: |=
drivers/iio/imu/smi240/smi240_spi.c:111:17: sparse: left side has type restricted __be32
drivers/iio/imu/smi240/smi240_spi.c:111:17: sparse: right side has type unsigned long
drivers/iio/imu/smi240/smi240_spi.c:112:32: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] data @@ got restricted __be32 [usertype] request @@
drivers/iio/imu/smi240/smi240_spi.c:112:32: sparse: expected unsigned int [usertype] data
drivers/iio/imu/smi240/smi240_spi.c:112:32: sparse: got restricted __be32 [usertype] request
drivers/iio/imu/smi240/smi240_spi.c:112:17: sparse: sparse: invalid assignment: |=
drivers/iio/imu/smi240/smi240_spi.c:112:17: sparse: left side has type restricted __be32
drivers/iio/imu/smi240/smi240_spi.c:112:17: sparse: right side has type unsigned char
drivers/iio/imu/smi240/smi240_spi.c:113:19: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __be32 [usertype] request @@
drivers/iio/imu/smi240/smi240_spi.c:113:19: sparse: expected unsigned int [usertype] val
drivers/iio/imu/smi240/smi240_spi.c:113:19: sparse: got restricted __be32 [usertype] request
drivers/iio/imu/smi240/smi240_spi.c:113:19: sparse: sparse: cast from restricted __be32
drivers/iio/imu/smi240/smi240_spi.c:113:19: sparse: sparse: cast from restricted __be32
drivers/iio/imu/smi240/smi240_spi.c:113:19: sparse: sparse: cast from restricted __be32
drivers/iio/imu/smi240/smi240_spi.c:113:19: sparse: sparse: cast from restricted __be32
vim +73 drivers/iio/imu/smi240/smi240_spi.c
58
59 static int smi240_regmap_spi_read(void *context, const void *reg_buf,
60 size_t reg_size, void *val_buf,
61 size_t val_size)
62 {
63 int ret;
64 __be32 request, response;
65 struct spi_device *spi = context;
66 struct iio_dev *indio_dev = dev_get_drvdata(&spi->dev);
67 struct smi240_data *data = iio_priv(indio_dev);
68
69 request = SMI240_BUS_ID << 30;
70 request |= FIELD_PREP(SMI240_CAP_BIT_MASK, data->capture);
71 request |= FIELD_PREP(SMI240_WRITE_ADDR_MASK, *(u8 *)reg_buf);
72 request |= smi240_crc3(request, SMI240_CRC_INIT, SMI240_CRC_POLY);
> 73 request = cpu_to_be32(request);
74
75 /*
76 * SMI240 module consists of a 32Bit Out Of Frame (OOF)
77 * SPI protocol, where the slave interface responds to
78 * the Master request in the next frame.
79 * CS signal must toggle (> 700 ns) between the frames.
80 */
81 ret = spi_write(spi, &request, sizeof(request));
82 if (ret)
83 return ret;
84
85 ret = spi_read(spi, &response, sizeof(response));
86 if (ret)
87 return ret;
88
89 response = be32_to_cpu(response);
90
91 if (!smi240_sensor_data_is_valid(response))
92 return -EIO;
93
94 response = FIELD_GET(SMI240_READ_DATA_MASK, response);
95 memcpy(val_buf, &response, val_size);
96
97 return 0;
98 }
99
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists