From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: Re: [RFC PATCH] devres: better type safety with devm_*_action()
Date: Wed, 10 Mar 2021 15:00:30 +0800 [thread overview]
Message-ID: <202103101455.6ClmCL0B-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 29495 bytes --]
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20210309235917.2134565-1-linux@rasmusvillemoes.dk>
References: <20210309235917.2134565-1-linux@rasmusvillemoes.dk>
TO: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Hi Rasmus,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on driver-core/driver-core-testing]
[also build test WARNING on linux/master linus/master v5.12-rc2 next-20210309]
[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/Rasmus-Villemoes/devres-better-type-safety-with-devm_-_action/20210310-080019
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git a38fd8748464831584a19438cbb3082b5a2dab15
:::::: branch date: 7 hours ago
:::::: commit date: 7 hours ago
config: sparc64-randconfig-s031-20210309 (attached as .config)
compiler: sparc64-linux-gcc (GCC) 9.3.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.3-262-g5e674421-dirty
# https://github.com/0day-ci/linux/commit/663d41317b8fa291fc1c82100b3e2526627ab4d4
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Rasmus-Villemoes/devres-better-type-safety-with-devm_-_action/20210310-080019
git checkout 663d41317b8fa291fc1c82100b3e2526627ab4d4
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=sparc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
"sparse warnings: (new ones prefixed by >>)"
drivers/gpio/gpio-em.c: note: in included file (through include/linux/platform_device.h):
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: static assertion failed: "__same_type(action + 0, void (*)(void *)) || __same_type(action + 0, void (*)(typeof(data)))"
>> drivers/gpio/gpio-em.c:339:15: sparse: sparse: arithmetics on pointers to functions
>> drivers/gpio/gpio-em.c:339:15: sparse: sparse: arithmetics on pointers to functions
>> drivers/gpio/gpio-em.c:339:15: sparse: sparse: static assertion failed: "__same_type(em_gio_irq_domain_remove + 0, void (*)(void *)) || __same_type(em_gio_irq_domain_remove + 0, void (*)(typeof(p->irq_domain)))"
--
drivers/hid/wacom_sys.c: note: in included file (through include/linux/input.h, include/linux/hid.h, drivers/hid/wacom_wac.h):
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: static assertion failed: "__same_type(action + 0, void (*)(void *)) || __same_type(action + 0, void (*)(typeof(data)))"
>> drivers/hid/wacom_sys.c:895:18: sparse: sparse: arithmetics on pointers to functions
>> drivers/hid/wacom_sys.c:895:18: sparse: sparse: arithmetics on pointers to functions
>> drivers/hid/wacom_sys.c:895:18: sparse: sparse: static assertion failed: "__same_type(wacom_remove_shared_data + 0, void (*)(void *)) || __same_type(wacom_remove_shared_data + 0, void (*)(typeof(wacom)))"
drivers/hid/wacom_sys.c:1467:17: sparse: sparse: arithmetics on pointers to functions
drivers/hid/wacom_sys.c:1467:17: sparse: sparse: arithmetics on pointers to functions
>> drivers/hid/wacom_sys.c:1467:17: sparse: sparse: static assertion failed: "__same_type(wacom_led_groups_release_one + 0, void (*)(void *)) || __same_type(wacom_led_groups_release_one + 0, void (*)(typeof(&wacom->led.groups[group_id])))"
drivers/hid/wacom_sys.c:1543:17: sparse: sparse: arithmetics on pointers to functions
drivers/hid/wacom_sys.c:1543:17: sparse: sparse: arithmetics on pointers to functions
>> drivers/hid/wacom_sys.c:1543:17: sparse: sparse: static assertion failed: "__same_type(wacom_led_groups_release + 0, void (*)(void *)) || __same_type(wacom_led_groups_release + 0, void (*)(typeof(wacom)))"
drivers/hid/wacom_sys.c:2036:17: sparse: sparse: arithmetics on pointers to functions
drivers/hid/wacom_sys.c:2036:17: sparse: sparse: arithmetics on pointers to functions
>> drivers/hid/wacom_sys.c:2036:17: sparse: sparse: static assertion failed: "__same_type(wacom_remotes_destroy + 0, void (*)(void *)) || __same_type(wacom_remotes_destroy + 0, void (*)(typeof(wacom)))"
--
drivers/hid/hid-cougar.c: note: in included file (through include/linux/input.h, include/linux/hid.h):
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: static assertion failed: "__same_type(action + 0, void (*)(void *)) || __same_type(action + 0, void (*)(typeof(data)))"
>> drivers/hid/hid-cougar.c:182:17: sparse: sparse: arithmetics on pointers to functions
>> drivers/hid/hid-cougar.c:182:17: sparse: sparse: arithmetics on pointers to functions
>> drivers/hid/hid-cougar.c:182:17: sparse: sparse: static assertion failed: "__same_type(cougar_remove_shared_data + 0, void (*)(void *)) || __same_type(cougar_remove_shared_data + 0, void (*)(typeof(cougar)))"
--
drivers/hwmon/gpio-fan.c: note: in included file (through include/linux/platform_device.h):
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: static assertion failed: "__same_type(action + 0, void (*)(void *)) || __same_type(action + 0, void (*)(typeof(data)))"
>> drivers/hwmon/gpio-fan.c:520:23: sparse: sparse: arithmetics on pointers to functions
>> drivers/hwmon/gpio-fan.c:520:23: sparse: sparse: arithmetics on pointers to functions
>> drivers/hwmon/gpio-fan.c:520:23: sparse: sparse: static assertion failed: "__same_type(gpio_fan_stop + 0, void (*)(void *)) || __same_type(gpio_fan_stop + 0, void (*)(typeof(fan_data)))"
--
drivers/hwmon/g762.c: note: in included file:
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: static assertion failed: "__same_type(action + 0, void (*)(void *)) || __same_type(action + 0, void (*)(typeof(data)))"
>> drivers/hwmon/g762.c:623:9: sparse: sparse: arithmetics on pointers to functions
>> drivers/hwmon/g762.c:623:9: sparse: sparse: arithmetics on pointers to functions
>> drivers/hwmon/g762.c:623:9: sparse: sparse: static assertion failed: "__same_type(g762_of_clock_disable + 0, void (*)(void *)) || __same_type(g762_of_clock_disable + 0, void (*)(typeof(data)))"
--
drivers/hwmon/pwm-fan.c: note: in included file (through include/linux/platform_device.h):
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: static assertion failed: "__same_type(action + 0, void (*)(void *)) || __same_type(action + 0, void (*)(typeof(data)))"
>> drivers/hwmon/pwm-fan.c:333:23: sparse: sparse: arithmetics on pointers to functions
>> drivers/hwmon/pwm-fan.c:333:23: sparse: sparse: arithmetics on pointers to functions
>> drivers/hwmon/pwm-fan.c:333:23: sparse: sparse: static assertion failed: "__same_type(pwm_fan_regulator_disable + 0, void (*)(void *)) || __same_type(pwm_fan_regulator_disable + 0, void (*)(typeof(ctx->reg_en)))"
drivers/hwmon/pwm-fan.c:360:15: sparse: sparse: arithmetics on pointers to functions
drivers/hwmon/pwm-fan.c:360:15: sparse: sparse: arithmetics on pointers to functions
>> drivers/hwmon/pwm-fan.c:360:15: sparse: sparse: static assertion failed: "__same_type(pwm_fan_pwm_disable + 0, void (*)(void *)) || __same_type(pwm_fan_pwm_disable + 0, void (*)(typeof(ctx)))"
--
drivers/leds/leds-netxbig.c: note: in included file (through include/linux/platform_device.h):
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: static assertion failed: "__same_type(action + 0, void (*)(void *)) || __same_type(action + 0, void (*)(typeof(data)))"
>> drivers/leds/leds-netxbig.c:416:16: sparse: sparse: arithmetics on pointers to functions
>> drivers/leds/leds-netxbig.c:416:16: sparse: sparse: arithmetics on pointers to functions
>> drivers/leds/leds-netxbig.c:416:16: sparse: sparse: static assertion failed: "__same_type(netxbig_gpio_ext_remove + 0, void (*)(void *)) || __same_type(netxbig_gpio_ext_remove + 0, void (*)(typeof(gpio_ext)))"
--
drivers/nvmem/mxs-ocotp.c: note: in included file:
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: static assertion failed: "__same_type(action + 0, void (*)(void *)) || __same_type(action + 0, void (*)(typeof(data)))"
>> drivers/nvmem/mxs-ocotp.c:168:15: sparse: sparse: arithmetics on pointers to functions
>> drivers/nvmem/mxs-ocotp.c:168:15: sparse: sparse: arithmetics on pointers to functions
>> drivers/nvmem/mxs-ocotp.c:168:15: sparse: sparse: static assertion failed: "__same_type(mxs_ocotp_action + 0, void (*)(void *)) || __same_type(mxs_ocotp_action + 0, void (*)(typeof(otp->clk)))"
--
drivers/input/keyboard/snvs_pwrkey.c: note: in included file:
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: static assertion failed: "__same_type(action + 0, void (*)(void *)) || __same_type(action + 0, void (*)(typeof(data)))"
>> drivers/input/keyboard/snvs_pwrkey.c:166:17: sparse: sparse: arithmetics on pointers to functions
>> drivers/input/keyboard/snvs_pwrkey.c:166:17: sparse: sparse: arithmetics on pointers to functions
>> drivers/input/keyboard/snvs_pwrkey.c:166:17: sparse: sparse: static assertion failed: "__same_type(imx_snvs_pwrkey_act + 0, void (*)(void *)) || __same_type(imx_snvs_pwrkey_act + 0, void (*)(typeof(pdata)))"
--
drivers/input/keyboard/tm2-touchkey.c: note: in included file:
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: static assertion failed: "__same_type(action + 0, void (*)(void *)) || __same_type(action + 0, void (*)(typeof(data)))"
>> drivers/input/keyboard/tm2-touchkey.c:235:17: sparse: sparse: arithmetics on pointers to functions
>> drivers/input/keyboard/tm2-touchkey.c:235:17: sparse: sparse: arithmetics on pointers to functions
>> drivers/input/keyboard/tm2-touchkey.c:235:17: sparse: sparse: static assertion failed: "__same_type(tm2_touchkey_power_disable + 0, void (*)(void *)) || __same_type(tm2_touchkey_power_disable + 0, void (*)(typeof(touchkey)))"
--
drivers/input/keyboard/omap4-keypad.c: note: in included file (through include/linux/platform_device.h):
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: static assertion failed: "__same_type(action + 0, void (*)(void *)) || __same_type(action + 0, void (*)(typeof(data)))"
>> drivers/input/keyboard/omap4-keypad.c:385:17: sparse: sparse: arithmetics on pointers to functions
>> drivers/input/keyboard/omap4-keypad.c:385:17: sparse: sparse: arithmetics on pointers to functions
>> drivers/input/keyboard/omap4-keypad.c:385:17: sparse: sparse: static assertion failed: "__same_type(omap4_disable_pm + 0, void (*)(void *)) || __same_type(omap4_disable_pm + 0, void (*)(typeof(dev)))"
--
drivers/input/keyboard/mpr121_touchkey.c: note: in included file (through include/linux/acpi.h, include/linux/i2c.h):
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: static assertion failed: "__same_type(action + 0, void (*)(void *)) || __same_type(action + 0, void (*)(typeof(data)))"
>> drivers/input/keyboard/mpr121_touchkey.c:110:15: sparse: sparse: arithmetics on pointers to functions
>> drivers/input/keyboard/mpr121_touchkey.c:110:15: sparse: sparse: arithmetics on pointers to functions
>> drivers/input/keyboard/mpr121_touchkey.c:110:15: sparse: sparse: static assertion failed: "__same_type(mpr121_vdd_supply_disable + 0, void (*)(void *)) || __same_type(mpr121_vdd_supply_disable + 0, void (*)(typeof(vdd_supply)))"
--
drivers/rtc/rtc-mxc.c: note: in included file (through include/linux/rtc.h):
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: static assertion failed: "__same_type(action + 0, void (*)(void *)) || __same_type(action + 0, void (*)(typeof(data)))"
>> drivers/rtc/rtc-mxc.c:367:15: sparse: sparse: arithmetics on pointers to functions
>> drivers/rtc/rtc-mxc.c:367:15: sparse: sparse: arithmetics on pointers to functions
>> drivers/rtc/rtc-mxc.c:367:15: sparse: sparse: static assertion failed: "__same_type(mxc_rtc_action + 0, void (*)(void *)) || __same_type(mxc_rtc_action + 0, void (*)(typeof(pdata)))"
--
drivers/rtc/rtc-snvs.c: note: in included file (through include/linux/platform_device.h):
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: static assertion failed: "__same_type(action + 0, void (*)(void *)) || __same_type(action + 0, void (*)(typeof(data)))"
>> drivers/rtc/rtc-snvs.c:355:15: sparse: sparse: arithmetics on pointers to functions
>> drivers/rtc/rtc-snvs.c:355:15: sparse: sparse: arithmetics on pointers to functions
>> drivers/rtc/rtc-snvs.c:355:15: sparse: sparse: static assertion failed: "__same_type(snvs_rtc_action + 0, void (*)(void *)) || __same_type(snvs_rtc_action + 0, void (*)(typeof(data->clk)))"
--
drivers/rtc/rtc-jz4740.c: note: in included file (through include/linux/node.h, include/linux/cpu.h, include/linux/of_device.h):
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: static assertion failed: "__same_type(action + 0, void (*)(void *)) || __same_type(action + 0, void (*)(typeof(data)))"
>> drivers/rtc/rtc-jz4740.c:344:15: sparse: sparse: arithmetics on pointers to functions
>> drivers/rtc/rtc-jz4740.c:344:15: sparse: sparse: arithmetics on pointers to functions
>> drivers/rtc/rtc-jz4740.c:344:15: sparse: sparse: static assertion failed: "__same_type(jz4740_rtc_clk_disable + 0, void (*)(void *)) || __same_type(jz4740_rtc_clk_disable + 0, void (*)(typeof(clk)))"
--
drivers/input/touchscreen/s6sy761.c: note: in included file (through include/linux/acpi.h, include/linux/i2c.h):
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: static assertion failed: "__same_type(action + 0, void (*)(void *)) || __same_type(action + 0, void (*)(typeof(data)))"
>> drivers/input/touchscreen/s6sy761.c:419:15: sparse: sparse: arithmetics on pointers to functions
>> drivers/input/touchscreen/s6sy761.c:419:15: sparse: sparse: arithmetics on pointers to functions
>> drivers/input/touchscreen/s6sy761.c:419:15: sparse: sparse: static assertion failed: "__same_type(s6sy761_power_off + 0, void (*)(void *)) || __same_type(s6sy761_power_off + 0, void (*)(typeof(sdata)))"
--
drivers/input/touchscreen/zet6223.c: note: in included file (through include/linux/acpi.h, include/linux/i2c.h):
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: static assertion failed: "__same_type(action + 0, void (*)(void *)) || __same_type(action + 0, void (*)(typeof(data)))"
>> drivers/input/touchscreen/zet6223.c:124:17: sparse: sparse: arithmetics on pointers to functions
>> drivers/input/touchscreen/zet6223.c:124:17: sparse: sparse: arithmetics on pointers to functions
>> drivers/input/touchscreen/zet6223.c:124:17: sparse: sparse: static assertion failed: "__same_type(zet6223_power_off + 0, void (*)(void *)) || __same_type(zet6223_power_off + 0, void (*)(typeof(ts)))"
--
drivers/input/touchscreen/ili210x.c: note: in included file (through include/linux/acpi.h, include/linux/i2c.h):
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: static assertion failed: "__same_type(action + 0, void (*)(void *)) || __same_type(action + 0, void (*)(typeof(data)))"
>> drivers/input/touchscreen/ili210x.c:418:25: sparse: sparse: arithmetics on pointers to functions
>> drivers/input/touchscreen/ili210x.c:418:25: sparse: sparse: arithmetics on pointers to functions
>> drivers/input/touchscreen/ili210x.c:418:25: sparse: sparse: static assertion failed: "__same_type(ili210x_power_down + 0, void (*)(void *)) || __same_type(ili210x_power_down + 0, void (*)(typeof(reset_gpio)))"
drivers/input/touchscreen/ili210x.c:469:17: sparse: sparse: arithmetics on pointers to functions
drivers/input/touchscreen/ili210x.c:469:17: sparse: sparse: arithmetics on pointers to functions
>> drivers/input/touchscreen/ili210x.c:469:17: sparse: sparse: static assertion failed: "__same_type(ili210x_stop + 0, void (*)(void *)) || __same_type(ili210x_stop + 0, void (*)(typeof(priv)))"
--
drivers/power/supply/max8997_charger.c: note: in included file (through include/linux/extcon.h):
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: static assertion failed: "__same_type(action + 0, void (*)(void *)) || __same_type(action + 0, void (*)(typeof(data)))"
>> drivers/power/supply/max8997_charger.c:255:23: sparse: sparse: arithmetics on pointers to functions
>> drivers/power/supply/max8997_charger.c:255:23: sparse: sparse: arithmetics on pointers to functions
>> drivers/power/supply/max8997_charger.c:255:23: sparse: sparse: static assertion failed: "__same_type(max8997_battery_extcon_evt_stop_work + 0, void (*)(void *)) || __same_type(max8997_battery_extcon_evt_stop_work + 0, void (*)(typeof(charger)))"
--
drivers/power/supply/max14656_charger_detector.c: note: in included file (through include/linux/acpi.h, include/linux/i2c.h):
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: static assertion failed: "__same_type(action + 0, void (*)(void *)) || __same_type(action + 0, void (*)(typeof(data)))"
>> drivers/power/supply/max14656_charger_detector.c:290:15: sparse: sparse: arithmetics on pointers to functions
>> drivers/power/supply/max14656_charger_detector.c:290:15: sparse: sparse: arithmetics on pointers to functions
>> drivers/power/supply/max14656_charger_detector.c:290:15: sparse: sparse: static assertion failed: "__same_type(stop_irq_work + 0, void (*)(void *)) || __same_type(stop_irq_work + 0, void (*)(typeof(chip)))"
--
drivers/usb/phy/phy-jz4770.c: note: in included file (through include/linux/platform_device.h):
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: static assertion failed: "__same_type(action + 0, void (*)(void *)) || __same_type(action + 0, void (*)(typeof(data)))"
>> drivers/usb/phy/phy-jz4770.c:346:16: sparse: sparse: arithmetics on pointers to functions
>> drivers/usb/phy/phy-jz4770.c:346:16: sparse: sparse: arithmetics on pointers to functions
>> drivers/usb/phy/phy-jz4770.c:346:16: sparse: sparse: static assertion failed: "__same_type(ingenic_usb_phy_remove + 0, void (*)(void *)) || __same_type(ingenic_usb_phy_remove + 0, void (*)(typeof(&priv->phy)))"
vim +339 drivers/gpio/gpio-em.c
19ec11a2233d24 Bartosz Golaszewski 2019-07-11 268
3836309d93462b Bill Pemberton 2012-11-19 269 static int em_gio_probe(struct platform_device *pdev)
a07e103ef08c69 Magnus Damm 2012-05-17 270 {
a07e103ef08c69 Magnus Damm 2012-05-17 271 struct em_gio_priv *p;
a07e103ef08c69 Magnus Damm 2012-05-17 272 struct gpio_chip *gpio_chip;
a07e103ef08c69 Magnus Damm 2012-05-17 273 struct irq_chip *irq_chip;
66ad66293edeb2 Bartosz Golaszewski 2019-07-11 274 struct device *dev = &pdev->dev;
66ad66293edeb2 Bartosz Golaszewski 2019-07-11 275 const char *name = dev_name(dev);
527b397a7a3647 Geert Uytterhoeven 2015-06-23 276 unsigned int ngpios;
be053b2dc91c1a Geert Uytterhoeven 2019-11-13 277 int irq[2], ret;
a07e103ef08c69 Magnus Damm 2012-05-17 278
66ad66293edeb2 Bartosz Golaszewski 2019-07-11 279 p = devm_kzalloc(dev, sizeof(*p), GFP_KERNEL);
715ed72801ff4d Geert Uytterhoeven 2019-05-27 280 if (!p)
715ed72801ff4d Geert Uytterhoeven 2019-05-27 281 return -ENOMEM;
a07e103ef08c69 Magnus Damm 2012-05-17 282
a07e103ef08c69 Magnus Damm 2012-05-17 283 p->pdev = pdev;
a07e103ef08c69 Magnus Damm 2012-05-17 284 platform_set_drvdata(pdev, p);
a07e103ef08c69 Magnus Damm 2012-05-17 285 spin_lock_init(&p->sense_lock);
a07e103ef08c69 Magnus Damm 2012-05-17 286
be053b2dc91c1a Geert Uytterhoeven 2019-11-13 287 irq[0] = platform_get_irq(pdev, 0);
be053b2dc91c1a Geert Uytterhoeven 2019-11-13 288 if (irq[0] < 0)
be053b2dc91c1a Geert Uytterhoeven 2019-11-13 289 return irq[0];
a07e103ef08c69 Magnus Damm 2012-05-17 290
be053b2dc91c1a Geert Uytterhoeven 2019-11-13 291 irq[1] = platform_get_irq(pdev, 1);
be053b2dc91c1a Geert Uytterhoeven 2019-11-13 292 if (irq[1] < 0)
be053b2dc91c1a Geert Uytterhoeven 2019-11-13 293 return irq[1];
a07e103ef08c69 Magnus Damm 2012-05-17 294
94bfcbf0368b61 Bartosz Golaszewski 2019-10-02 295 p->base0 = devm_platform_ioremap_resource(pdev, 0);
94bfcbf0368b61 Bartosz Golaszewski 2019-10-02 296 if (IS_ERR(p->base0))
94bfcbf0368b61 Bartosz Golaszewski 2019-10-02 297 return PTR_ERR(p->base0);
a07e103ef08c69 Magnus Damm 2012-05-17 298
94bfcbf0368b61 Bartosz Golaszewski 2019-10-02 299 p->base1 = devm_platform_ioremap_resource(pdev, 1);
94bfcbf0368b61 Bartosz Golaszewski 2019-10-02 300 if (IS_ERR(p->base1))
94bfcbf0368b61 Bartosz Golaszewski 2019-10-02 301 return PTR_ERR(p->base1);
a07e103ef08c69 Magnus Damm 2012-05-17 302
66ad66293edeb2 Bartosz Golaszewski 2019-07-11 303 if (of_property_read_u32(dev->of_node, "ngpios", &ngpios)) {
66ad66293edeb2 Bartosz Golaszewski 2019-07-11 304 dev_err(dev, "Missing ngpios OF property\n");
715ed72801ff4d Geert Uytterhoeven 2019-05-27 305 return -EINVAL;
753c5983ddd380 Magnus Damm 2013-02-26 306 }
753c5983ddd380 Magnus Damm 2013-02-26 307
a07e103ef08c69 Magnus Damm 2012-05-17 308 gpio_chip = &p->gpio_chip;
66ad66293edeb2 Bartosz Golaszewski 2019-07-11 309 gpio_chip->of_node = dev->of_node;
a07e103ef08c69 Magnus Damm 2012-05-17 310 gpio_chip->direction_input = em_gio_direction_input;
a07e103ef08c69 Magnus Damm 2012-05-17 311 gpio_chip->get = em_gio_get;
a07e103ef08c69 Magnus Damm 2012-05-17 312 gpio_chip->direction_output = em_gio_direction_output;
a07e103ef08c69 Magnus Damm 2012-05-17 313 gpio_chip->set = em_gio_set;
a07e103ef08c69 Magnus Damm 2012-05-17 314 gpio_chip->to_irq = em_gio_to_irq;
640efa08cb635a Magnus Damm 2013-07-03 315 gpio_chip->request = em_gio_request;
640efa08cb635a Magnus Damm 2013-07-03 316 gpio_chip->free = em_gio_free;
a07e103ef08c69 Magnus Damm 2012-05-17 317 gpio_chip->label = name;
66ad66293edeb2 Bartosz Golaszewski 2019-07-11 318 gpio_chip->parent = dev;
a07e103ef08c69 Magnus Damm 2012-05-17 319 gpio_chip->owner = THIS_MODULE;
527b397a7a3647 Geert Uytterhoeven 2015-06-23 320 gpio_chip->base = -1;
527b397a7a3647 Geert Uytterhoeven 2015-06-23 321 gpio_chip->ngpio = ngpios;
a07e103ef08c69 Magnus Damm 2012-05-17 322
a07e103ef08c69 Magnus Damm 2012-05-17 323 irq_chip = &p->irq_chip;
b74f0456c12028 Geert Uytterhoeven 2019-10-24 324 irq_chip->name = "gpio-em";
a07e103ef08c69 Magnus Damm 2012-05-17 325 irq_chip->irq_mask = em_gio_irq_disable;
a07e103ef08c69 Magnus Damm 2012-05-17 326 irq_chip->irq_unmask = em_gio_irq_enable;
a07e103ef08c69 Magnus Damm 2012-05-17 327 irq_chip->irq_set_type = em_gio_irq_set_type;
57ef04288abd27 Linus Walleij 2014-03-14 328 irq_chip->irq_request_resources = em_gio_irq_reqres;
57ef04288abd27 Linus Walleij 2014-03-14 329 irq_chip->irq_release_resources = em_gio_irq_relres;
03621b60529edf Magnus Damm 2013-11-20 330 irq_chip->flags = IRQCHIP_SKIP_SET_WAKE | IRQCHIP_MASK_ON_SUSPEND;
a07e103ef08c69 Magnus Damm 2012-05-17 331
66ad66293edeb2 Bartosz Golaszewski 2019-07-11 332 p->irq_domain = irq_domain_add_simple(dev->of_node, ngpios, 0,
7385500a49b769 Linus Walleij 2012-10-16 333 &em_gio_irq_domain_ops, p);
1631081993b1e6 Axel Lin 2012-10-31 334 if (!p->irq_domain) {
66ad66293edeb2 Bartosz Golaszewski 2019-07-11 335 dev_err(dev, "cannot initialize irq domain\n");
715ed72801ff4d Geert Uytterhoeven 2019-05-27 336 return -ENXIO;
a07e103ef08c69 Magnus Damm 2012-05-17 337 }
a07e103ef08c69 Magnus Damm 2012-05-17 338
66ad66293edeb2 Bartosz Golaszewski 2019-07-11 @339 ret = devm_add_action_or_reset(dev, em_gio_irq_domain_remove,
19ec11a2233d24 Bartosz Golaszewski 2019-07-11 340 p->irq_domain);
19ec11a2233d24 Bartosz Golaszewski 2019-07-11 341 if (ret)
19ec11a2233d24 Bartosz Golaszewski 2019-07-11 342 return ret;
19ec11a2233d24 Bartosz Golaszewski 2019-07-11 343
be053b2dc91c1a Geert Uytterhoeven 2019-11-13 344 if (devm_request_irq(dev, irq[0], em_gio_irq_handler, 0, name, p)) {
66ad66293edeb2 Bartosz Golaszewski 2019-07-11 345 dev_err(dev, "failed to request low IRQ\n");
19ec11a2233d24 Bartosz Golaszewski 2019-07-11 346 return -ENOENT;
a07e103ef08c69 Magnus Damm 2012-05-17 347 }
a07e103ef08c69 Magnus Damm 2012-05-17 348
be053b2dc91c1a Geert Uytterhoeven 2019-11-13 349 if (devm_request_irq(dev, irq[1], em_gio_irq_handler, 0, name, p)) {
66ad66293edeb2 Bartosz Golaszewski 2019-07-11 350 dev_err(dev, "failed to request high IRQ\n");
19ec11a2233d24 Bartosz Golaszewski 2019-07-11 351 return -ENOENT;
a07e103ef08c69 Magnus Damm 2012-05-17 352 }
a07e103ef08c69 Magnus Damm 2012-05-17 353
66ad66293edeb2 Bartosz Golaszewski 2019-07-11 354 ret = devm_gpiochip_add_data(dev, gpio_chip, p);
a07e103ef08c69 Magnus Damm 2012-05-17 355 if (ret) {
66ad66293edeb2 Bartosz Golaszewski 2019-07-11 356 dev_err(dev, "failed to add GPIO controller\n");
a07e103ef08c69 Magnus Damm 2012-05-17 357 return ret;
a07e103ef08c69 Magnus Damm 2012-05-17 358 }
a07e103ef08c69 Magnus Damm 2012-05-17 359
a07e103ef08c69 Magnus Damm 2012-05-17 360 return 0;
a07e103ef08c69 Magnus Damm 2012-05-17 361 }
a07e103ef08c69 Magnus Damm 2012-05-17 362
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 27599 bytes --]
next reply other threads:[~2021-03-10 7:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-10 7:00 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-03-10 15:38 [RFC PATCH] devres: better type safety with devm_*_action() kernel test robot
2021-03-10 14:08 kernel test robot
2021-03-10 11:17 kernel test robot
2021-03-10 10:46 kernel test robot
2021-03-10 9:19 kernel test robot
2021-03-10 8:58 kernel test robot
2021-03-10 7:52 kernel test robot
2021-03-10 7:37 kernel test robot
2021-03-10 3:53 kernel test robot
2021-03-09 23:59 Rasmus Villemoes
2021-03-18 20:30 ` Rasmus Villemoes
2021-03-18 21:58 ` Kees Cook
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202103101455.6ClmCL0B-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.