[usb:usb-testing 55/56] drivers/usb/typec/tcpm/tcpci.c:118:5: warning: no previous prototype for 'tcpci_apply_rc'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: nds32-allyesconfig (attached as .config)
compiler: nds32le-linux-gcc (GCC) 9.3.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://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=gcc-9.3.0 make.cross ARCH=nds32 

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

All warnings (new ones prefixed by >>):

>> drivers/usb/typec/tcpm/tcpci.c:118:5: warning: no previous prototype for 'tcpci_apply_rc' [-Wmissing-prototypes]
     118 | int tcpci_apply_rc(struct tcpc_dev *tcpc, enum typec_cc_status cc, enum typec_cc_polarity polarity)
         |     ^~~~~~~~~~~~~~


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, &reg);
   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@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux