[usb:usb-testing 55/56] drivers/usb/typec/tcpm/tcpci.c:118:5: warning: no previous prototype for function 'tcpci_apply_rc'
From: kernel test robot <hidden>
Date: 2021-05-22 17:34:18
Also in:
oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing head: 5cc59c418fde9d02859996707b9d5dfd2941c50b commit: 7257fbc7c598617ca71605089264c61636d52157 [55/56] usb: typec: tcpci: Implement callback for apply_rc config: riscv-randconfig-r023-20210522 (attached as .config) compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project e84a9b9bb3051c35dea993cdad7b3d2575638f85) 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 # install riscv cross compiling tool for clang build # apt-get install binutils-riscv64-linux-gnu # https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/commit/?id=7257fbc7c598617ca71605089264c61636d52157 git remote add usb https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git git fetch --no-tags usb usb-testing git checkout 7257fbc7c598617ca71605089264c61636d52157 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <redacted> All warnings (new ones prefixed by >>):
quoted
drivers/usb/typec/tcpm/tcpci.c:118:5: warning: no previous prototype for function 'tcpci_apply_rc' [-Wmissing-prototypes]
int tcpci_apply_rc(struct tcpc_dev *tcpc, enum typec_cc_status cc, enum typec_cc_polarity polarity)
^
drivers/usb/typec/tcpm/tcpci.c:118:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int tcpci_apply_rc(struct tcpc_dev *tcpc, enum typec_cc_status cc, enum typec_cc_polarity polarity)
^
static
1 warning generated.
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for LOCKDEP
Depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT && (FRAME_POINTER || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86)
Selected by
- LOCK_STAT && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
- DEBUG_LOCK_ALLOC && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
vim +/tcpci_apply_rc +118 drivers/usb/typec/tcpm/tcpci.c
117
> 118 int tcpci_apply_rc(struct tcpc_dev *tcpc, enum typec_cc_status cc, enum typec_cc_polarity polarity)
119 {
120 struct tcpci *tcpci = tcpc_to_tcpci(tcpc);
121 unsigned int reg;
122 int ret;
123
124 ret = regmap_read(tcpci->regmap, TCPC_ROLE_CTRL, ®);
125 if (ret < 0)
126 return ret;
127
128 /*
129 * APPLY_RC state is when ROLE_CONTROL.CC1 != ROLE_CONTROL.CC2 and vbus autodischarge on
130 * disconnect is disabled. Bail out when ROLE_CONTROL.CC1 != ROLE_CONTROL.CC2.
131 */
132 if (((reg & (TCPC_ROLE_CTRL_CC2_MASK << TCPC_ROLE_CTRL_CC2_SHIFT)) >>
133 TCPC_ROLE_CTRL_CC2_SHIFT) !=
134 ((reg & (TCPC_ROLE_CTRL_CC1_MASK << TCPC_ROLE_CTRL_CC1_SHIFT)) >>
135 TCPC_ROLE_CTRL_CC1_SHIFT))
136 return 0;
137
138 return regmap_update_bits(tcpci->regmap, TCPC_ROLE_CTRL, polarity == TYPEC_POLARITY_CC1 ?
139 TCPC_ROLE_CTRL_CC2_MASK << TCPC_ROLE_CTRL_CC2_SHIFT :
140 TCPC_ROLE_CTRL_CC1_MASK << TCPC_ROLE_CTRL_CC1_SHIFT,
141 TCPC_ROLE_CTRL_CC_OPEN);
142 }
143
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Attachments
- .config.gz [application/gzip] 39428 bytes