Re: [PATCH V2 6/6] gpio: davinci: Remove redundant macros

From: kbuild test robot
Date: Sat Jan 14 2017 - 23:40:08 EST


Hi Keerthy,

[auto build test ERROR on gpio/for-next]
[also build test ERROR on next-20170113]
[cannot apply to v4.10-rc3]
[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/Keerthy/gpio-davinci-Redesign-driver-to-accommodate-ngpios-in-one-gpio-chip/20170114-204048
base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git for-next
config: arm-davinci_all_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm

All error/warnings (new ones prefixed by >>):

>> arch/arm/mach-davinci/board-neuros-osd2.c:131:34: error: implicit declaration of function 'GPIO' [-Werror=implicit-function-declaration]
{ .name = "led1_green", .gpio = GPIO(10), },
^~~~
>> arch/arm/mach-davinci/board-neuros-osd2.c:131:34: error: initializer element is not constant
arch/arm/mach-davinci/board-neuros-osd2.c:131:34: note: (near initialization for 'ntosd2_leds[0].gpio')
arch/arm/mach-davinci/board-neuros-osd2.c:132:34: error: initializer element is not constant
{ .name = "led1_red", .gpio = GPIO(11), },
^~~~
arch/arm/mach-davinci/board-neuros-osd2.c:132:34: note: (near initialization for 'ntosd2_leds[1].gpio')
arch/arm/mach-davinci/board-neuros-osd2.c:133:34: error: initializer element is not constant
{ .name = "led2_green", .gpio = GPIO(12), },
^~~~
arch/arm/mach-davinci/board-neuros-osd2.c:133:34: note: (near initialization for 'ntosd2_leds[2].gpio')
arch/arm/mach-davinci/board-neuros-osd2.c:134:34: error: initializer element is not constant
{ .name = "led2_red", .gpio = GPIO(13), },
^~~~
arch/arm/mach-davinci/board-neuros-osd2.c:134:34: note: (near initialization for 'ntosd2_leds[3].gpio')
cc1: some warnings being treated as errors
--
arch/arm/mach-davinci/board-da830-evm.c: In function 'da830_evm_usb_set_power':
>> arch/arm/mach-davinci/board-da830-evm.c:45:23: error: implicit declaration of function 'GPIO_TO_PIN' [-Werror=implicit-function-declaration]
#define ON_BD_USB_DRV GPIO_TO_PIN(1, 15)
^
>> arch/arm/mach-davinci/board-da830-evm.c:57:17: note: in expansion of macro 'ON_BD_USB_DRV'
gpio_set_value(ON_BD_USB_DRV, on);
^~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
arch/arm/mach-davinci/board-da850-evm.c: In function 'da850_panel_power_ctrl':
>> arch/arm/mach-davinci/board-da850-evm.c:58:27: error: implicit declaration of function 'GPIO_TO_PIN' [-Werror=implicit-function-declaration]
#define DA850_LCD_BL_PIN GPIO_TO_PIN(2, 15)
^
>> arch/arm/mach-davinci/board-da850-evm.c:790:17: note: in expansion of macro 'DA850_LCD_BL_PIN'
gpio_set_value(DA850_LCD_BL_PIN, val);
^~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
arch/arm/mach-davinci/board-omapl138-hawk.c: In function 'hawk_usb_set_power':
>> arch/arm/mach-davinci/board-omapl138-hawk.c:30:30: error: implicit declaration of function 'GPIO_TO_PIN' [-Werror=implicit-function-declaration]
#define DA850_USB1_VBUS_PIN GPIO_TO_PIN(2, 4)
^
>> arch/arm/mach-davinci/board-omapl138-hawk.c:174:17: note: in expansion of macro 'DA850_USB1_VBUS_PIN'
gpio_set_value(DA850_USB1_VBUS_PIN, on);
^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors

vim +/GPIO_TO_PIN +45 arch/arm/mach-davinci/board-da830-evm.c

8593790d Mark A. Greer 2009-06-03 39 #include <mach/da8xx.h>
8593790d Mark A. Greer 2009-06-03 40
782f2d78 Cyril Chemparathy 2010-09-15 41 #define DA830_EVM_PHY_ID ""
0e9a3ddc Sergei Shtylyov 2009-09-25 42 /*
0e9a3ddc Sergei Shtylyov 2009-09-25 43 * USB1 VBUS is controlled by GPIO1[15], over-current is reported on GPIO2[4].
0e9a3ddc Sergei Shtylyov 2009-09-25 44 */
0e9a3ddc Sergei Shtylyov 2009-09-25 @45 #define ON_BD_USB_DRV GPIO_TO_PIN(1, 15)
0e9a3ddc Sergei Shtylyov 2009-09-25 46 #define ON_BD_USB_OVC GPIO_TO_PIN(2, 4)
0e9a3ddc Sergei Shtylyov 2009-09-25 47
0e9a3ddc Sergei Shtylyov 2009-09-25 48 static const short da830_evm_usb11_pins[] = {
0e9a3ddc Sergei Shtylyov 2009-09-25 49 DA830_GPIO1_15, DA830_GPIO2_4,
0e9a3ddc Sergei Shtylyov 2009-09-25 50 -1
0e9a3ddc Sergei Shtylyov 2009-09-25 51 };
0e9a3ddc Sergei Shtylyov 2009-09-25 52
0e9a3ddc Sergei Shtylyov 2009-09-25 53 static da8xx_ocic_handler_t da830_evm_usb_ocic_handler;
0e9a3ddc Sergei Shtylyov 2009-09-25 54
0e9a3ddc Sergei Shtylyov 2009-09-25 55 static int da830_evm_usb_set_power(unsigned port, int on)
0e9a3ddc Sergei Shtylyov 2009-09-25 56 {
0e9a3ddc Sergei Shtylyov 2009-09-25 @57 gpio_set_value(ON_BD_USB_DRV, on);
0e9a3ddc Sergei Shtylyov 2009-09-25 58 return 0;
0e9a3ddc Sergei Shtylyov 2009-09-25 59 }
0e9a3ddc Sergei Shtylyov 2009-09-25 60

:::::: The code at line 45 was first introduced by commit
:::::: 0e9a3ddc91882a19e255dceb18b712f57e3bb731 davinci: DA830 EVM: OHCI platform code

:::::: TO: Sergei Shtylyov <sshtylyov@xxxxxxxxxxxxx>
:::::: CC: Kevin Hilman <khilman@xxxxxxxxxxxxxxxxxxx>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip