Hi Chris,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on platform-drivers-x86/for-next]
[also build test WARNING on linus/master v5.14-rc5]
[cannot apply to next-20210813]
[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]
url:
https://github.com/0day-ci/linux/commits/Chris-Blake/platform-x86-add-mer...
base:
git://git.infradead.org/linux-platform-drivers-x86.git for-next
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
#
https://github.com/0day-ci/linux/commit/06f3007cbc04cda6358255a16fa3dc49a...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Chris-Blake/platform-x86-add-meraki-mx100-platform-driver/20210810-084154
git checkout 06f3007cbc04cda6358255a16fa3dc49a9a8ce3e
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/platform/x86/meraki-mx100.c: In function 'tink_board_init':
> drivers/platform/x86/meraki-mx100.c:197:17: warning: passing
argument 1 of 'ERR_PTR' makes integer from pointer without a cast
[-Wint-conversion]
197 | ret = ERR_PTR(tink_leds_pdev);
| ^~~~~~~~~~~~~~
| |
| struct platform_device *
In file included from include/linux/kernfs.h:10,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/dmi.h:6,
from drivers/platform/x86/meraki-mx100.c:16:
include/linux/err.h:24:48: note: expected 'long int' but argument is of type
'struct platform_device *'
24 | static inline void * __must_check ERR_PTR(long error)
| ~~~~~^~~~~
> drivers/platform/x86/meraki-mx100.c:197:7: warning: assignment to
'int' from 'void *' makes integer from pointer without a cast
[-Wint-conversion]
197 | ret = ERR_PTR(tink_leds_pdev);
| ^
drivers/platform/x86/meraki-mx100.c:204:17: warning: passing argument 1 of
'ERR_PTR' makes integer from pointer without a cast [-Wint-conversion]
204 | ret = ERR_PTR(tink_keys_pdev);
| ^~~~~~~~~~~~~~
| |
| struct platform_device *
In file included from include/linux/kernfs.h:10,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/dmi.h:6,
from drivers/platform/x86/meraki-mx100.c:16:
include/linux/err.h:24:48: note: expected 'long int' but argument is of type
'struct platform_device *'
24 | static inline void * __must_check ERR_PTR(long error)
| ~~~~~^~~~~
drivers/platform/x86/meraki-mx100.c:204:7: warning: assignment to 'int' from
'void *' makes integer from pointer without a cast [-Wint-conversion]
204 | ret = ERR_PTR(tink_keys_pdev);
| ^
vim +/ERR_PTR +197 drivers/platform/x86/meraki-mx100.c
176
177 static int __init tink_board_init(void)
178 {
179 int ret = 0;
180
181 if (!dmi_first_match(tink_systems))
182 return -ENODEV;
183
184 /*
185 * We need to make sure that GPIO60 isn't set to native mode as is default
since it's our
186 * Reset Button. To do this, write to GPIO_USE_SEL2 to have GPIO60 set to GPIO
mode.
187 * This is documented on page 1609 of the PCH datasheet, order number
327879-005US
188 */
189 outl(inl(0x530) | BIT(28), 0x530);
190
191 gpiod_add_lookup_table(&tink_leds_table);
192 gpiod_add_lookup_table(&tink_keys_table);
193
194 tink_leds_pdev = tink_create_dev("leds-gpio",
195 &tink_leds_pdata, sizeof(tink_leds_pdata));
196 if (IS_ERR(tink_leds_pdev)) {
197 ret = ERR_PTR(tink_leds_pdev);
198 goto err;
199 }
200
201 tink_keys_pdev = tink_create_dev("gpio-keys-polled",
202 &tink_buttons_pdata, sizeof(tink_buttons_pdata));
203 if (IS_ERR(tink_keys_pdev)) {
204 ret = ERR_PTR(tink_keys_pdev);
205 platform_device_unregister(tink_leds_pdev);
206 goto err;
207 }
208
209 return ret;
210
211 err:
212 gpiod_remove_lookup_table(&tink_keys_table);
213 gpiod_remove_lookup_table(&tink_leds_table);
214 return ret;
215 }
216 module_init(tink_board_init);
217
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org