[chenxing:msc313_mainlining 41/62] drivers/pinctrl/mstar/pinctrl-msc313.c:233:27: error: 'sr_drivestrengths' defined but not used

From: kernel test robot
Date: Sat Oct 30 2021 - 11:19:46 EST


tree: git://github.com/linux-chenxing/linux.git msc313_mainlining
head: 0daa86f0e0213c337746c8e4df6aad8c30270051
commit: e65cc32bf55a42333de3df07ba7a0a9ca3aec537 [41/62] pinctrl: mstar: msc313 pinctrl driver
config: s390-allyesconfig (attached as .config)
compiler: s390-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/linux-chenxing/linux/commit/e65cc32bf55a42333de3df07ba7a0a9ca3aec537
git remote add chenxing git://github.com/linux-chenxing/linux.git
git fetch --no-tags chenxing msc313_mainlining
git checkout e65cc32bf55a42333de3df07ba7a0a9ca3aec537
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=s390

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

>> drivers/pinctrl/mstar/pinctrl-msc313.c:233:27: error: 'sr_drivestrengths' defined but not used [-Werror=unused-const-variable=]
233 | static const unsigned int sr_drivestrengths[] = {4, 8};
| ^~~~~~~~~~~~~~~~~
>> drivers/pinctrl/mstar/pinctrl-msc313.c:225:27: error: 'i2c_drivestrengths' defined but not used [-Werror=unused-const-variable=]
225 | static const unsigned int i2c_drivestrengths[] = {4, 8};
| ^~~~~~~~~~~~~~~~~~
>> drivers/pinctrl/mstar/pinctrl-msc313.c:215:27: error: 'spi0_drivestrengths' defined but not used [-Werror=unused-const-variable=]
215 | static const unsigned int spi0_drivestrengths[] = {4, 8, 12, 16};
| ^~~~~~~~~~~~~~~~~~~
>> drivers/pinctrl/mstar/pinctrl-msc313.c:201:27: error: 'sd_drivestrengths' defined but not used [-Werror=unused-const-variable=]
201 | static const unsigned int sd_drivestrengths[] = {4, 8};
| ^~~~~~~~~~~~~~~~~
>> drivers/pinctrl/mstar/pinctrl-msc313.c:164:18: error: 'sdio_values' defined but not used [-Werror=unused-const-variable=]
164 | static const u16 sdio_values[] = {
| ^~~~~~~~~~~
>> drivers/pinctrl/mstar/pinctrl-msc313.c:161:27: error: 'sdio_groups' defined but not used [-Werror=unused-const-variable=]
161 | static const char * const sdio_groups[] = {
| ^~~~~~~~~~~
>> drivers/pinctrl/mstar/pinctrl-msc313.c:158:18: error: 'spi1_values' defined but not used [-Werror=unused-const-variable=]
158 | static const u16 spi1_values[] = {
| ^~~~~~~~~~~
>> drivers/pinctrl/mstar/pinctrl-msc313.c:155:27: error: 'spi1_groups' defined but not used [-Werror=unused-const-variable=]
155 | static const char * const spi1_groups[] = {
| ^~~~~~~~~~~
>> drivers/pinctrl/mstar/pinctrl-msc313.c:151:18: error: 'spi0_values' defined but not used [-Werror=unused-const-variable=]
151 | static const u16 spi0_values[] = {
| ^~~~~~~~~~~
>> drivers/pinctrl/mstar/pinctrl-msc313.c:147:27: error: 'spi0_groups' defined but not used [-Werror=unused-const-variable=]
147 | static const char * const spi0_groups[] = {
| ^~~~~~~~~~~
>> drivers/pinctrl/mstar/pinctrl-msc313.c:143:27: error: 'jtag_groups' defined but not used [-Werror=unused-const-variable=]
143 | static const char * const jtag_groups[] = {
| ^~~~~~~~~~~
>> drivers/pinctrl/mstar/pinctrl-msc313.c:139:18: error: 'eth_values' defined but not used [-Werror=unused-const-variable=]
139 | static const u16 eth_values[] = {
| ^~~~~~~~~~
>> drivers/pinctrl/mstar/pinctrl-msc313.c:136:27: error: 'eth_groups' defined but not used [-Werror=unused-const-variable=]
136 | static const char * const eth_groups[] = {
| ^~~~~~~~~~
>> drivers/pinctrl/mstar/pinctrl-msc313.c:132:18: error: 'pwm7_values' defined but not used [-Werror=unused-const-variable=]
132 | static const u16 pwm7_values[] = {
| ^~~~~~~~~~~
>> drivers/pinctrl/mstar/pinctrl-msc313.c:129:27: error: 'pwm7_groups' defined but not used [-Werror=unused-const-variable=]
129 | static const char * const pwm7_groups[] = {
| ^~~~~~~~~~~
>> drivers/pinctrl/mstar/pinctrl-msc313.c:125:18: error: 'pwm6_values' defined but not used [-Werror=unused-const-variable=]
125 | static const u16 pwm6_values[] = {
| ^~~~~~~~~~~
>> drivers/pinctrl/mstar/pinctrl-msc313.c:122:27: error: 'pwm6_groups' defined but not used [-Werror=unused-const-variable=]
122 | static const char * const pwm6_groups[] = {
| ^~~~~~~~~~~
>> drivers/pinctrl/mstar/pinctrl-msc313.c:118:18: error: 'pwm5_values' defined but not used [-Werror=unused-const-variable=]
118 | static const u16 pwm5_values[] = {
| ^~~~~~~~~~~
>> drivers/pinctrl/mstar/pinctrl-msc313.c:115:27: error: 'pwm5_groups' defined but not used [-Werror=unused-const-variable=]
115 | static const char * const pwm5_groups[] = {
| ^~~~~~~~~~~
>> drivers/pinctrl/mstar/pinctrl-msc313.c:111:18: error: 'pwm4_values' defined but not used [-Werror=unused-const-variable=]
111 | static const u16 pwm4_values[] = {
| ^~~~~~~~~~~
drivers/pinctrl/mstar/pinctrl-msc313.c:108:27: error: 'pwm4_groups' defined but not used [-Werror=unused-const-variable=]
108 | static const char * const pwm4_groups[] = {
| ^~~~~~~~~~~
drivers/pinctrl/mstar/pinctrl-msc313.c:104:18: error: 'pwm3_values' defined but not used [-Werror=unused-const-variable=]
104 | static const u16 pwm3_values[] = {
| ^~~~~~~~~~~
drivers/pinctrl/mstar/pinctrl-msc313.c:101:27: error: 'pwm3_groups' defined but not used [-Werror=unused-const-variable=]
101 | static const char * const pwm3_groups[] = {
| ^~~~~~~~~~~
drivers/pinctrl/mstar/pinctrl-msc313.c:97:18: error: 'pwm2_values' defined but not used [-Werror=unused-const-variable=]
97 | static const u16 pwm2_values[] = {
| ^~~~~~~~~~~
drivers/pinctrl/mstar/pinctrl-msc313.c:94:27: error: 'pwm2_groups' defined but not used [-Werror=unused-const-variable=]
94 | static const char * const pwm2_groups[] = {
| ^~~~~~~~~~~
drivers/pinctrl/mstar/pinctrl-msc313.c:90:18: error: 'pwm1_values' defined but not used [-Werror=unused-const-variable=]
90 | static const u16 pwm1_values[] = {
| ^~~~~~~~~~~
drivers/pinctrl/mstar/pinctrl-msc313.c:87:27: error: 'pwm1_groups' defined but not used [-Werror=unused-const-variable=]
87 | static const char * const pwm1_groups[] = {
| ^~~~~~~~~~~
drivers/pinctrl/mstar/pinctrl-msc313.c:83:18: error: 'pwm0_values' defined but not used [-Werror=unused-const-variable=]
83 | static const u16 pwm0_values[] = {
| ^~~~~~~~~~~
drivers/pinctrl/mstar/pinctrl-msc313.c:80:27: error: 'pwm0_groups' defined but not used [-Werror=unused-const-variable=]
80 | static const char * const pwm0_groups[] = {
| ^~~~~~~~~~~
drivers/pinctrl/mstar/pinctrl-msc313.c:76:27: error: 'usb1_groups' defined but not used [-Werror=unused-const-variable=]
76 | static const char * const usb1_groups[] = {
| ^~~~~~~~~~~
drivers/pinctrl/mstar/pinctrl-msc313.c:73:27: error: 'usb_groups' defined but not used [-Werror=unused-const-variable=]
73 | static const char * const usb_groups[] = {
| ^~~~~~~~~~
drivers/pinctrl/mstar/pinctrl-msc313.c:68:18: error: 'uart1_values' defined but not used [-Werror=unused-const-variable=]
68 | static const u16 uart1_values[] = {
| ^~~~~~~~~~~~
drivers/pinctrl/mstar/pinctrl-msc313.c:64:27: error: 'uart1_groups' defined but not used [-Werror=unused-const-variable=]
64 | static const char * const uart1_groups[] = {
| ^~~~~~~~~~~~
drivers/pinctrl/mstar/pinctrl-msc313.c:60:27: error: 'uart0_groups' defined but not used [-Werror=unused-const-variable=]
60 | static const char * const uart0_groups[] = {
| ^~~~~~~~~~~~
drivers/pinctrl/mstar/pinctrl-msc313.c:55:18: error: 'fuart_values' defined but not used [-Werror=unused-const-variable=]
55 | static const u16 fuart_values[] = {
| ^~~~~~~~~~~~
drivers/pinctrl/mstar/pinctrl-msc313.c:51:27: error: 'fuart_groups' defined but not used [-Werror=unused-const-variable=]
51 | static const char * const fuart_groups[] = {
| ^~~~~~~~~~~~
drivers/pinctrl/mstar/pinctrl-msc313.c:47:18: error: 'i2c1_values' defined but not used [-Werror=unused-const-variable=]
47 | static const u16 i2c1_values[] = {
| ^~~~~~~~~~~
drivers/pinctrl/mstar/pinctrl-msc313.c:44:27: error: 'i2c1_groups' defined but not used [-Werror=unused-const-variable=]
44 | static const char * const i2c1_groups[] = {
| ^~~~~~~~~~~
drivers/pinctrl/mstar/pinctrl-msc313.c:40:18: error: 'i2c0_values' defined but not used [-Werror=unused-const-variable=]
40 | static const u16 i2c0_values[] = {
| ^~~~~~~~~~~
drivers/pinctrl/mstar/pinctrl-msc313.c:37:27: error: 'i2c0_groups' defined but not used [-Werror=unused-const-variable=]
37 | static const char * const i2c0_groups[] = {
| ^~~~~~~~~~~
cc1: all warnings being treated as errors
--
>> drivers/pinctrl/mstar/pinctrl-msc313-pm.c:43:27: error: 'pm_irin_groups' defined but not used [-Werror=unused-const-variable=]
43 | static const char * const pm_irin_groups[] = {
| ^~~~~~~~~~~~~~
>> drivers/pinctrl/mstar/pinctrl-msc313-pm.c:39:27: error: 'pm_spi_groups' defined but not used [-Werror=unused-const-variable=]
39 | static const char * const pm_spi_groups[] = {
| ^~~~~~~~~~~~~
>> drivers/pinctrl/mstar/pinctrl-msc313-pm.c:35:27: error: 'pm_uart_groups' defined but not used [-Werror=unused-const-variable=]
35 | static const char * const pm_uart_groups[] = {
| ^~~~~~~~~~~~~~
cc1: all warnings being treated as errors


vim +/sr_drivestrengths +233 drivers/pinctrl/mstar/pinctrl-msc313.c

28
29 /*
30 * Common groups and register values that are used
31 * for all chips so far.
32 *
33 * This maps functions to the groups that can handle
34 * a function and the register bits that need to be
35 * set to enable that function.
36 */
> 37 static const char * const i2c0_groups[] = {
38 GROUPNAME_I2C0_MODE1,
39 };
> 40 static const u16 i2c0_values[] = {
41 BIT(0),
42 };
43
> 44 static const char * const i2c1_groups[] = {
45 GROUPNAME_I2C1_MODE1,
46 };
> 47 static const u16 i2c1_values[] = {
48 BIT(4)
49 };
50
> 51 static const char * const fuart_groups[] = {
52 GROUPNAME_FUART_MODE1,
53 GROUPNAME_FUART_MODE1_NOCTS,
54 };
> 55 static const u16 fuart_values[] = {
56 BIT(0),
57 BIT(0),
58 };
59
> 60 static const char * const uart0_groups[] = {
61 GROUPNAME_FUART_RX_TX,
62 };
63
> 64 static const char * const uart1_groups[] = {
65 GROUPNAME_UART1_MODE2,
66 GROUPNAME_UART1_MODE2_RXONLY,
67 };
> 68 static const u16 uart1_values[] = {
69 BIT(9),
70 BIT(9),
71 };
72
> 73 static const char * const usb_groups[] = {
74 GROUPNAME_USB,
75 };
> 76 static const char * const usb1_groups[] = {
77 GROUPNAME_USB1,
78 };
79
> 80 static const char * const pwm0_groups[] = {
81 GROUPNAME_PWM0_MODE3,
82 };
> 83 static const u16 pwm0_values[] = {
84 BIT(1) | BIT(0),
85 };
86
> 87 static const char * const pwm1_groups[] = {
88 GROUPNAME_PWM1_MODE3,
89 };
> 90 static const u16 pwm1_values[] = {
91 BIT(3) | BIT(2),
92 };
93
> 94 static const char * const pwm2_groups[] = {
95 GROUPNAME_PWM2_MODE2,
96 };
> 97 static const u16 pwm2_values[] = {
98 BIT(5),
99 };
100
> 101 static const char * const pwm3_groups[] = {
102 GROUPNAME_PWM3_MODE2,
103 };
> 104 static const u16 pwm3_values[] = {
105 BIT(7),
106 };
107
> 108 static const char * const pwm4_groups[] = {
109 GROUPNAME_PWM4_MODE2,
110 };
> 111 static const u16 pwm4_values[] = {
112 BIT(9),
113 };
114
> 115 static const char * const pwm5_groups[] = {
116 GROUPNAME_PWM5_MODE2,
117 };
> 118 static const u16 pwm5_values[] = {
119 BIT(11),
120 };
121
> 122 static const char * const pwm6_groups[] = {
123 GROUPNAME_PWM6_MODE2,
124 };
> 125 static const u16 pwm6_values[] = {
126 BIT(13),
127 };
128
> 129 static const char * const pwm7_groups[] = {
130 GROUPNAME_PWM7_MODE2,
131 };
> 132 static const u16 pwm7_values[] = {
133 BIT(15),
134 };
135
> 136 static const char * const eth_groups[] = {
137 GROUPNAME_ETH_MODE1,
138 };
> 139 static const u16 eth_values[] = {
140 BIT(2),
141 };
142
> 143 static const char * const jtag_groups[] = {
144 GROUPNAME_JTAG_MODE1,
145 };
146
> 147 static const char * const spi0_groups[] = {
148 GROUPNAME_SPI0_MODE1,
149 GROUPNAME_SPI0_MODE1,
150 };
> 151 static const u16 spi0_values[] = {
152 BIT(0),
153 BIT(1) | BIT(0),
154 };
> 155 static const char * const spi1_groups[] = {
156 GROUPNAME_SPI1_MODE3,
157 };
> 158 static const u16 spi1_values[] = {
159 BIT(5) | BIT(4),
160 };
> 161 static const char * const sdio_groups[] = {
162 GROUPNAME_SDIO_MODE1,
163 };
> 164 static const u16 sdio_values[] = {
165 BIT(8),
166 };
167
168 #ifdef CONFIG_MACH_MERCURY
169 static const char * const sr0_mipi_groups[] = { GROUPNAME_SR0_MIPI_MODE1, GROUPNAME_SR0_MIPI_MODE2};
170 static const u16 sr0_mipi_values[] = { BIT(8), BIT(9) };
171 static const char * const sr1_bt656_groups[] = { GROUPNAME_SR1_BT656 };
172 static const u16 sr1_bt656_values[] = { BIT(12) };
173 static const char * const sr1_mipi_groups[] = { GROUPNAME_SR1_MIPI_MODE4 };
174 static const u16 sr1_mipi_values[] = { BIT(15) };
175
176 static const char * const tx_mipi_groups[] = { GROUPNAME_TX_MIPI_MODE1, GROUPNAME_TX_MIPI_MODE2 };
177 static const u16 tx_mipi_values[] = { BIT(0), BIT(1) };
178 #endif
179
180 #define COMMON_FUNCTIONS \
181 COMMON_FIXED_FUNCTION(USB, usb), \
182 COMMON_FUNCTION(FUART, fuart), \
183 COMMON_FUNCTION_NULLVALUES(UART0, uart0), \
184 COMMON_FUNCTION(UART1, uart1), \
185 COMMON_FUNCTION(PWM0, pwm0), \
186 COMMON_FUNCTION(PWM1, pwm1), \
187 COMMON_FUNCTION(PWM2, pwm2), \
188 COMMON_FUNCTION(PWM3, pwm3), \
189 COMMON_FUNCTION(PWM4, pwm4), \
190 COMMON_FUNCTION(PWM5, pwm5), \
191 COMMON_FUNCTION(PWM6, pwm6), \
192 COMMON_FUNCTION(PWM7, pwm7), \
193 COMMON_FUNCTION(SDIO, sdio), \
194 COMMON_FUNCTION(I2C0, i2c0), \
195 COMMON_FUNCTION(I2C1, i2c1), \
196 COMMON_FUNCTION(SPI0, spi0), \
197 COMMON_FUNCTION(SPI1, spi1), \
198 COMMON_FUNCTION_NULLVALUES(JTAG, jtag), \
199 COMMON_FUNCTION(ETH, eth)
200
> 201 static const unsigned int sd_drivestrengths[] = {4, 8};
202
203 #define SD_PIN(_PIN, _PULLUPBIT, _DRIVEBIT) MSTAR_PINCTRL_PIN(_PIN, REG_SDIO_PULLDRIVE, \
204 _PULLUPBIT, ALWAYS_PULLUP, -1, REG_SDIO_PULLDRIVE, _DRIVEBIT, 1, sd_drivestrengths)
205
206 /* clk has a fixed pull down */
207 #define SD_PINS(_chipname) SD_PIN(PIN_##_chipname##_SD_CMD, 8, 0), \
208 SD_PIN(PIN_##_chipname##_SD_D0, 9, 1), \
209 SD_PIN(PIN_##_chipname##_SD_D1, 10, 2), \
210 SD_PIN(PIN_##_chipname##_SD_D2, 11, 3), \
211 SD_PIN(PIN_##_chipname##_SD_D3, 12, 4), \
212 MSTAR_PINCTRL_PIN(PIN_##_chipname##_SD_CLK, -1, -1, \
213 ALWAYS_PULLDOWN, -1, REG_SDIO_PULLDRIVE, 5, 1, sd_drivestrengths)
214
> 215 static const unsigned int spi0_drivestrengths[] = {4, 8, 12, 16};
216
217 #define SPI0_PIN(_pin, _offset) MSTAR_PINCTRL_PIN(_pin, -1, -1, -1, -1,\
218 REG_SPI_DRIVE, _offset, 2, spi0_drivestrengths)
219
220 #define SPI0_PINS(_chipname) SPI0_PIN(PIN_##_chipname##_SPI0_CZ, 0), \
221 SPI0_PIN(PIN_##_chipname##_SPI0_CK, 2), \
222 SPI0_PIN(PIN_##_chipname##_SPI0_DI, 4), \
223 SPI0_PIN(PIN_##_chipname##_SPI0_DO, 6)
224
> 225 static const unsigned int i2c_drivestrengths[] = {4, 8};
226
227 #define I2C1_PIN(_pin, _offset) MSTAR_PINCTRL_PIN(_pin, REG_I2C1_PULL_EN, _offset, \
228 REG_I2C1_PULL_DIR, _offset, REG_I2C1_DRIVE, _offset, 1, i2c_drivestrengths)
229
230 #define I2C1_PINS(_chipname) I2C1_PIN(PIN_##_chipname##_I2C1_SCL, 0), \
231 I2C1_PIN(PIN_##_chipname##_I2C1_SDA, 1)
232
> 233 static const unsigned int sr_drivestrengths[] = {4, 8};
234 #define SR_PIN_0(_pin, _offset) MSTAR_PINCTRL_PIN(_pin, REG_SR_PULL_EN0, _offset, \
235 REG_SR_PULL_DIR0, _offset, REG_SR_DRIVE0, _offset, 1, sr_drivestrengths)
236 #define SR_PIN_1(_pin, _offset) MSTAR_PINCTRL_PIN(_pin, REG_SR_PULL_EN1, _offset, \
237 REG_SR_PULL_DIR1, _offset, REG_SR_DRIVE1, _offset, 1, sr_drivestrengths)
238

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip