Re: [PATCH v7 3/4] counter: ti-ecap-capture: capture driver support for ECAP

From: kernel test robot
Date: Wed Sep 21 2022 - 14:11:32 EST


Hi Julien,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on robh/for-next]
[also build test WARNING on linus/master v6.0-rc6 next-20220921]
[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#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Julien-Panis/ECAP-support-on-TI-AM62x-SoC/20220921-180742
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: s390-allyesconfig (https://download.01.org/0day-ci/archive/20220922/202209220145.SYlF1Xt8-lkp@xxxxxxxxx/config)
compiler: s390-linux-gcc (GCC) 12.1.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/intel-lab-lkp/linux/commit/f8a0bbe39ba2d6018559e92fb0c66b789387b293
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Julien-Panis/ECAP-support-on-TI-AM62x-SoC/20220921-180742
git checkout f8a0bbe39ba2d6018559e92fb0c66b789387b293
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash drivers/counter/

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

All warnings (new ones prefixed by >>):

drivers/counter/ti-ecap-capture.c: In function 'ecap_cnt_watch_validate':
drivers/counter/ti-ecap-capture.c:234:66: error: 'COUNTER_EVENT_CAPTURE' undeclared (first use in this function); did you mean 'COUNTER_EVENT_INDEX'?
234 | if ((watch->channel <= ECAP_CEVT_LAST && watch->event == COUNTER_EVENT_CAPTURE) ||
| ^~~~~~~~~~~~~~~~~~~~~
| COUNTER_EVENT_INDEX
drivers/counter/ti-ecap-capture.c:234:66: note: each undeclared identifier is reported only once for each function it appears in
drivers/counter/ti-ecap-capture.c: At top level:
>> drivers/counter/ti-ecap-capture.c:253:47: warning: 'enum counter_signal_polarity' declared inside parameter list will not be visible outside of this definition or declaration
253 | size_t idx, enum counter_signal_polarity *pol)
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/counter/ti-ecap-capture.c: In function 'ecap_cnt_pol_read':
drivers/counter/ti-ecap-capture.c:259:16: error: 'COUNTER_SIGNAL_POLARITY_NEGATIVE' undeclared (first use in this function)
259 | COUNTER_SIGNAL_POLARITY_NEGATIVE :
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/counter/ti-ecap-capture.c:260:16: error: 'COUNTER_SIGNAL_POLARITY_POSITIVE' undeclared (first use in this function)
260 | COUNTER_SIGNAL_POLARITY_POSITIVE;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/counter/ti-ecap-capture.c:258:14: error: invalid use of undefined type 'enum counter_signal_polarity'
258 | *pol = regmap_test_bits(ecap_dev->regmap, ECAP_ECCTL_REG, ECAP_CAPPOL_BIT(idx)) ?
| ^
drivers/counter/ti-ecap-capture.c: At top level:
drivers/counter/ti-ecap-capture.c:268:48: warning: 'enum counter_signal_polarity' declared inside parameter list will not be visible outside of this definition or declaration
268 | size_t idx, enum counter_signal_polarity pol)
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/counter/ti-ecap-capture.c:268:72: error: parameter 4 ('pol') has incomplete type
268 | size_t idx, enum counter_signal_polarity pol)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
drivers/counter/ti-ecap-capture.c:266:12: error: function declaration isn't a prototype [-Werror=strict-prototypes]
266 | static int ecap_cnt_pol_write(struct counter_device *counter,
| ^~~~~~~~~~~~~~~~~~
drivers/counter/ti-ecap-capture.c: In function 'ecap_cnt_pol_write':
drivers/counter/ti-ecap-capture.c:276:20: error: 'COUNTER_SIGNAL_POLARITY_NEGATIVE' undeclared (first use in this function)
276 | if (pol == COUNTER_SIGNAL_POLARITY_NEGATIVE)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/counter/ti-ecap-capture.c: At top level:
drivers/counter/ti-ecap-capture.c:375:43: error: array type has incomplete element type 'enum counter_signal_polarity'
375 | static const enum counter_signal_polarity ecap_cnt_pol_avail[] = {
| ^~~~~~~~~~~~~~~~~~
drivers/counter/ti-ecap-capture.c:376:9: error: 'COUNTER_SIGNAL_POLARITY_POSITIVE' undeclared here (not in a function)
376 | COUNTER_SIGNAL_POLARITY_POSITIVE,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/counter/ti-ecap-capture.c:377:9: error: 'COUNTER_SIGNAL_POLARITY_NEGATIVE' undeclared here (not in a function)
377 | COUNTER_SIGNAL_POLARITY_NEGATIVE,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/counter/ti-ecap-capture.c:380:77: error: expected ')' before '(' token
380 | static DEFINE_COUNTER_ARRAY_POLARITY(ecap_cnt_pol_array, ecap_cnt_pol_avail, ECAP_NB_CEVT);
| ^
| )
drivers/counter/ti-ecap-capture.c:383:9: error: implicit declaration of function 'COUNTER_COMP_ARRAY_POLARITY' [-Werror=implicit-function-declaration]
383 | COUNTER_COMP_ARRAY_POLARITY(ecap_cnt_pol_read, ecap_cnt_pol_write, ecap_cnt_pol_array),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/counter/ti-ecap-capture.c:383:76: error: 'ecap_cnt_pol_array' undeclared here (not in a function); did you mean 'ecap_cnt_pol_read'?
383 | COUNTER_COMP_ARRAY_POLARITY(ecap_cnt_pol_read, ecap_cnt_pol_write, ecap_cnt_pol_array),
| ^~~~~~~~~~~~~~~~~~
| ecap_cnt_pol_read
drivers/counter/ti-ecap-capture.c:414:52: error: expected ')' before '(' token
414 | static DEFINE_COUNTER_ARRAY_U64(ecap_cnt_cap_array, ECAP_NB_CEVT);
| ^
| )
drivers/counter/ti-ecap-capture.c:417:9: error: implicit declaration of function 'COUNTER_COMP_COUNT_ARRAY_U64'; did you mean 'COUNTER_COMP_COUNT_U64'? [-Werror=implicit-function-declaration]
417 | COUNTER_COMP_COUNT_ARRAY_U64("capture", ecap_cnt_cap_read, NULL, ecap_cnt_cap_array),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| COUNTER_COMP_COUNT_U64
drivers/counter/ti-ecap-capture.c:417:74: error: 'ecap_cnt_cap_array' undeclared here (not in a function); did you mean 'ecap_cnt_cap_read'?
417 | COUNTER_COMP_COUNT_ARRAY_U64("capture", ecap_cnt_cap_read, NULL, ecap_cnt_cap_array),
| ^~~~~~~~~~~~~~~~~~
| ecap_cnt_cap_read
drivers/counter/ti-ecap-capture.c: In function 'ecap_cnt_isr':
drivers/counter/ti-ecap-capture.c:449:57: error: 'COUNTER_EVENT_CAPTURE' undeclared (first use in this function); did you mean 'COUNTER_EVENT_INDEX'?
449 | counter_push_event(counter_dev, COUNTER_EVENT_CAPTURE, i);
| ^~~~~~~~~~~~~~~~~~~~~
| COUNTER_EVENT_INDEX
drivers/counter/ti-ecap-capture.c: At top level:
drivers/counter/ti-ecap-capture.c:375:43: warning: 'ecap_cnt_pol_avail' defined but not used [-Wunused-variable]
375 | static const enum counter_signal_polarity ecap_cnt_pol_avail[] = {
| ^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors


vim +253 drivers/counter/ti-ecap-capture.c

250
251 static int ecap_cnt_pol_read(struct counter_device *counter,
252 struct counter_signal *signal,
> 253 size_t idx, enum counter_signal_polarity *pol)
254 {
255 struct ecap_cnt_dev *ecap_dev = counter_priv(counter);
256
257 pm_runtime_get_sync(counter->parent);
258 *pol = regmap_test_bits(ecap_dev->regmap, ECAP_ECCTL_REG, ECAP_CAPPOL_BIT(idx)) ?
259 COUNTER_SIGNAL_POLARITY_NEGATIVE :
260 COUNTER_SIGNAL_POLARITY_POSITIVE;
261 pm_runtime_put_sync(counter->parent);
262
263 return 0;
264 }
265

--
0-DAY CI Kernel Test Service
https://01.org/lkp