Hi Janusz, Thank you for the patch! Yet something to improve: [auto build test ERROR on gpio/for-next] [also build test ERROR on v4.19-rc2 next-20180905] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Janusz-Krzysztofik/gpiolib-Pass-bitmaps-not-integer-arrays-to-get-set-array/20180903-172834 base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git for-next config: x86_64-randconfig-f2-201835 (attached as .config) compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): drivers/phy/motorola/phy-mapphone-mdm6600.c: In function 'phy_mdm6600_cmd': >> drivers/phy/motorola/phy-mapphone-mdm6600.c:165:36: error: passing argument 3 of 'gpiod_set_array_value_cansleep' from incompatible pointer type [-Werror=incompatible-pointer-types] ddata->cmd_gpios->desc, values); ^~~~~~ In file included from drivers/phy/motorola/phy-mapphone-mdm6600.c:16:0: include/linux/gpio/consumer.h:400:20: note: expected 'int *' but argument is of type 'long unsigned int *' static inline void gpiod_set_array_value_cansleep(unsigned int array_size, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/phy/motorola/phy-mapphone-mdm6600.c: In function 'phy_mdm6600_status': >> drivers/phy/motorola/phy-mapphone-mdm6600.c:184:13: error: passing argument 3 of 'gpiod_get_array_value_cansleep' from incompatible pointer type [-Werror=incompatible-pointer-types] values); ^~~~~~ In file included from drivers/phy/motorola/phy-mapphone-mdm6600.c:16:0: include/linux/gpio/consumer.h:387:19: note: expected 'int *' but argument is of type 'long unsigned int *' static inline int gpiod_get_array_value_cansleep(unsigned int array_size, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +/gpiod_set_array_value_cansleep +165 drivers/phy/motorola/phy-mapphone-mdm6600.c 5d1ebbda0 Tony Lindgren 2018-03-08 151 5d1ebbda0 Tony Lindgren 2018-03-08 152 /** 5d1ebbda0 Tony Lindgren 2018-03-08 153 * phy_mdm6600_cmd() - send a command request to mdm6600 5d1ebbda0 Tony Lindgren 2018-03-08 154 * @ddata: device driver data 5d1ebbda0 Tony Lindgren 2018-03-08 155 * 5d1ebbda0 Tony Lindgren 2018-03-08 156 * Configures the three command request GPIOs to the specified value. 5d1ebbda0 Tony Lindgren 2018-03-08 157 */ 5d1ebbda0 Tony Lindgren 2018-03-08 158 static void phy_mdm6600_cmd(struct phy_mdm6600 *ddata, int val) 5d1ebbda0 Tony Lindgren 2018-03-08 159 { 916010a73 Janusz Krzysztofik 2018-09-02 160 DECLARE_BITMAP(values, PHY_MDM6600_NR_CMD_LINES); 5d1ebbda0 Tony Lindgren 2018-03-08 161 916010a73 Janusz Krzysztofik 2018-09-02 162 *values = val; 5d1ebbda0 Tony Lindgren 2018-03-08 163 5d1ebbda0 Tony Lindgren 2018-03-08 164 gpiod_set_array_value_cansleep(PHY_MDM6600_NR_CMD_LINES, 5d1ebbda0 Tony Lindgren 2018-03-08 @165 ddata->cmd_gpios->desc, values); 5d1ebbda0 Tony Lindgren 2018-03-08 166 } 5d1ebbda0 Tony Lindgren 2018-03-08 167 5d1ebbda0 Tony Lindgren 2018-03-08 168 /** 5d1ebbda0 Tony Lindgren 2018-03-08 169 * phy_mdm6600_status() - read mdm6600 status lines 5d1ebbda0 Tony Lindgren 2018-03-08 170 * @ddata: device driver data 5d1ebbda0 Tony Lindgren 2018-03-08 171 */ 5d1ebbda0 Tony Lindgren 2018-03-08 172 static void phy_mdm6600_status(struct work_struct *work) 5d1ebbda0 Tony Lindgren 2018-03-08 173 { 5d1ebbda0 Tony Lindgren 2018-03-08 174 struct phy_mdm6600 *ddata; 5d1ebbda0 Tony Lindgren 2018-03-08 175 struct device *dev; 916010a73 Janusz Krzysztofik 2018-09-02 176 DECLARE_BITMAP(values, PHY_MDM6600_NR_STATUS_LINES); 5d1ebbda0 Tony Lindgren 2018-03-08 177 int error, i, val = 0; 5d1ebbda0 Tony Lindgren 2018-03-08 178 5d1ebbda0 Tony Lindgren 2018-03-08 179 ddata = container_of(work, struct phy_mdm6600, status_work.work); 5d1ebbda0 Tony Lindgren 2018-03-08 180 dev = ddata->dev; 5d1ebbda0 Tony Lindgren 2018-03-08 181 ad5003300 Tony Lindgren 2018-05-31 182 error = gpiod_get_array_value_cansleep(PHY_MDM6600_NR_STATUS_LINES, 5d1ebbda0 Tony Lindgren 2018-03-08 183 ddata->status_gpios->desc, 5d1ebbda0 Tony Lindgren 2018-03-08 @184 values); 5d1ebbda0 Tony Lindgren 2018-03-08 185 if (error) 5d1ebbda0 Tony Lindgren 2018-03-08 186 return; 5d1ebbda0 Tony Lindgren 2018-03-08 187 ad5003300 Tony Lindgren 2018-05-31 188 for (i = 0; i < PHY_MDM6600_NR_STATUS_LINES; i++) { 916010a73 Janusz Krzysztofik 2018-09-02 189 val |= test_bit(i, values) << i; 5d1ebbda0 Tony Lindgren 2018-03-08 190 dev_dbg(ddata->dev, "XXX %s: i: %i values[i]: %i val: %i\n", 916010a73 Janusz Krzysztofik 2018-09-02 191 __func__, i, test_bit(i, values), val); 5d1ebbda0 Tony Lindgren 2018-03-08 192 } 5d1ebbda0 Tony Lindgren 2018-03-08 193 ddata->status = val; 5d1ebbda0 Tony Lindgren 2018-03-08 194 5d1ebbda0 Tony Lindgren 2018-03-08 195 dev_info(dev, "modem status: %i %s\n", 5d1ebbda0 Tony Lindgren 2018-03-08 196 ddata->status, 5d1ebbda0 Tony Lindgren 2018-03-08 197 phy_mdm6600_status_name[ddata->status & 7]); 5d1ebbda0 Tony Lindgren 2018-03-08 198 complete(&ddata->ack); 5d1ebbda0 Tony Lindgren 2018-03-08 199 } 5d1ebbda0 Tony Lindgren 2018-03-08 200 :::::: The code at line 165 was first introduced by commit :::::: 5d1ebbda0318b1ba55eaa1fae3fd867af17b0774 phy: mapphone-mdm6600: Add USB PHY driver for MDM6600 on Droid 4 :::::: TO: Tony Lindgren :::::: CC: Kishon Vijay Abraham I --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation