[frank-w-bpi-r2-4.14:5.15-rtl8367dsa 42/44] drivers/net/dsa/rtl8367s_mdio.h:664:15: error: no previous prototype for 'rtk_switch_logicalPortCheck'
by kernel test robot
tree: https://github.com/frank-w/BPI-R2-4.14 5.15-rtl8367dsa
head: e9ec03c13f235a810e08f9797a0e826b994a8743
commit: fb5ff9592d60bcaaac8322ffd96b90bcf30d1f79 [42/44] net: dsa: rtl8367: add basic init for CHIP_RTL8367C
config: m68k-allmodconfig (attached as .config)
compiler: m68k-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/frank-w/BPI-R2-4.14/commit/fb5ff9592d60bcaaac8322ffd96...
git remote add frank-w-bpi-r2-4.14 https://github.com/frank-w/BPI-R2-4.14
git fetch --no-tags frank-w-bpi-r2-4.14 5.15-rtl8367dsa
git checkout fb5ff9592d60bcaaac8322ffd96b90bcf30d1f79
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from drivers/net/dsa/rtl8367s_mdio.c:23:
drivers/net/dsa/rtl8367s_mdio.h:511:15: error: no previous prototype for 'rtk_vlan_reset' [-Werror=missing-prototypes]
511 | rtk_api_ret_t rtk_vlan_reset(void) {return 0;}
| ^~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.h:514:15: error: no previous prototype for 'rtk_vlan_init' [-Werror=missing-prototypes]
514 | rtk_api_ret_t rtk_vlan_init(void) {return 0;}
| ^~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.h:537:15: error: no previous prototype for 'rtk_vlan_set' [-Werror=missing-prototypes]
537 | rtk_api_ret_t rtk_vlan_set(rtk_vlan_t vid, rtk_vlan_cfg_t *pVlanCfg) {return 0;}
| ^~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.h:562:15: error: no previous prototype for 'rtk_vlan_portPvid_set' [-Werror=missing-prototypes]
562 | rtk_api_ret_t rtk_vlan_portPvid_set(rtk_port_t port, rtk_vlan_t pvid, rtk_pri_t priority) {return 0;}
| ^~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.h:598:15: error: no previous prototype for 'rtk_port_macForceLinkExt_set' [-Werror=missing-prototypes]
598 | rtk_api_ret_t rtk_port_macForceLinkExt_set(rtk_port_t port, rtk_mode_ext_t mode, rtk_port_mac_ability_t *pPortability) {return 0;};
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.h:620:15: error: no previous prototype for 'rtk_port_phyEnableAll_set' [-Werror=missing-prototypes]
620 | rtk_api_ret_t rtk_port_phyEnableAll_set(rtk_enable_t enable) {return 0;}
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.h:642:15: error: no previous prototype for 'rtk_port_rgmiiDelayExt_set' [-Werror=missing-prototypes]
642 | rtk_api_ret_t rtk_port_rgmiiDelayExt_set(rtk_port_t port, rtk_data_t txDelay, rtk_data_t rxDelay) {return 0;}
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.h:662:15: error: no previous prototype for 'rtk_port_sgmiiNway_set' [-Werror=missing-prototypes]
662 | rtk_api_ret_t rtk_port_sgmiiNway_set(rtk_port_t port, rtk_enable_t state) {return 0;}
| ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/dsa/rtl8367s_mdio.h:664:15: error: no previous prototype for 'rtk_switch_logicalPortCheck' [-Werror=missing-prototypes]
664 | rtk_api_ret_t rtk_switch_logicalPortCheck(rtk_port_t logicalPort)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/dsa/rtl8367s_mdio.h:679:15: error: no previous prototype for 'rtk_switch_isUtpPort' [-Werror=missing-prototypes]
679 | rtk_api_ret_t rtk_switch_isUtpPort(rtk_port_t logicalPort)
| ^~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:46:14: error: no previous prototype for 'mii_mgr_read' [-Werror=missing-prototypes]
46 | unsigned int mii_mgr_read(unsigned int phy_addr,unsigned int phy_register,unsigned int *read_data)
| ^~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:59:14: error: no previous prototype for 'mii_mgr_write' [-Werror=missing-prototypes]
59 | unsigned int mii_mgr_write(unsigned int phy_addr,unsigned int phy_register,unsigned int write_data)
| ^~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:76:11: error: no previous prototype for 'smi_read' [-Werror=missing-prototypes]
76 | rtk_int32 smi_read(rtk_uint32 mAddrs, rtk_uint32 *rData)
| ^~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:105:11: error: no previous prototype for 'smi_write' [-Werror=missing-prototypes]
105 | rtk_int32 smi_write(rtk_uint32 mAddrs, rtk_uint32 rData)
| ^~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:135:7: error: no previous prototype for 'rtl8367c_setAsicReg' [-Werror=missing-prototypes]
135 | ret_t rtl8367c_setAsicReg(rtk_uint32 reg, rtk_uint32 value)
| ^~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:146:7: error: no previous prototype for 'rtl8367c_getAsicReg' [-Werror=missing-prototypes]
146 | ret_t rtl8367c_getAsicReg(rtk_uint32 reg, rtk_uint32 *pValue)
| ^~~~~~~~~~~~~~~~~~~
>> drivers/net/dsa/rtl8367s_mdio.c:162:7: error: no previous prototype for 'rtl8367c_setAsicRegBit' [-Werror=missing-prototypes]
162 | ret_t rtl8367c_setAsicRegBit(rtk_uint32 reg, rtk_uint32 bit, rtk_uint32 value)
| ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/dsa/rtl8367s_mdio.c:186:7: error: no previous prototype for 'rtl8367c_getAsicRegBit' [-Werror=missing-prototypes]
186 | ret_t rtl8367c_getAsicRegBit(rtk_uint32 reg, rtk_uint32 bit, rtk_uint32 *pValue)
| ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/dsa/rtl8367s_mdio.c:201:7: error: no previous prototype for 'rtl8367c_getAsicRegBits' [-Werror=missing-prototypes]
201 | ret_t rtl8367c_getAsicRegBits(rtk_uint32 reg, rtk_uint32 bits, rtk_uint32 *pValue)
| ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/dsa/rtl8367s_mdio.c:227:7: error: no previous prototype for 'rtl8367c_setAsicRegBits' [-Werror=missing-prototypes]
227 | ret_t rtl8367c_setAsicRegBits(rtk_uint32 reg, rtk_uint32 bits, rtk_uint32 value)
| ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/dsa/rtl8367s_mdio.c:264:7: error: no previous prototype for 'rtl8367c_setAsicPHYOCPReg' [-Werror=missing-prototypes]
264 | ret_t rtl8367c_setAsicPHYOCPReg(rtk_uint32 phyNo, rtk_uint32 ocpAddr, rtk_uint32 ocpData )
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/dsa/rtl8367s_mdio.c:285:7: error: no previous prototype for 'rtl8367c_getAsicPHYOCPReg' [-Werror=missing-prototypes]
285 | ret_t rtl8367c_getAsicPHYOCPReg(rtk_uint32 phyNo, rtk_uint32 ocpAddr, rtk_uint32 *pRegData )
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:405:15: error: no previous prototype for 'rtk_switch_probe' [-Werror=missing-prototypes]
405 | rtk_api_ret_t rtk_switch_probe(switch_chip_t *pSwitchChip)
| ^~~~~~~~~~~~~~~~
>> drivers/net/dsa/rtl8367s_mdio.c:454:15: error: no previous prototype for 'rtk_switch_initialState_set' [-Werror=missing-prototypes]
454 | rtk_api_ret_t rtk_switch_initialState_set(init_state_t state)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:463:15: error: no previous prototype for 'rtk_switch_init' [-Werror=missing-prototypes]
463 | rtk_api_ret_t rtk_switch_init(void)
| ^~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:633:6: error: no previous prototype for 'init_gsw' [-Werror=missing-prototypes]
633 | void init_gsw(void)
| ^~~~~~~~
cc1: all warnings being treated as errors
vim +/rtk_switch_logicalPortCheck +664 drivers/net/dsa/rtl8367s_mdio.h
599
600 /* Function Name:
601 * rtk_port_phyEnableAll_set
602 * Description:
603 * Set all PHY enable status.
604 * Input:
605 * enable - PHY Enable State.
606 * Output:
607 * None
608 * Return:
609 * RT_ERR_OK - OK
610 * RT_ERR_FAILED - Failed
611 * RT_ERR_SMI - SMI access error
612 * RT_ERR_ENABLE - Invalid enable input.
613 * Note:
614 * This API can set all PHY status.
615 * The configuration of all PHY is as following:
616 * - DISABLE
617 * - ENABLE
618 */
619 //extern
> 620 rtk_api_ret_t rtk_port_phyEnableAll_set(rtk_enable_t enable) {return 0;}
621
622 /* Function Name:
623 * rtk_port_rgmiiDelayExt_set
624 * Description:
625 * Set RGMII interface delay value for TX and RX.
626 * Input:
627 * txDelay - TX delay value, 1 for delay 2ns and 0 for no-delay
628 * rxDelay - RX delay value, 0~7 for delay setup.
629 * Output:
630 * None
631 * Return:
632 * RT_ERR_OK - OK
633 * RT_ERR_FAILED - Failed
634 * RT_ERR_SMI - SMI access error
635 * RT_ERR_INPUT - Invalid input parameters.
636 * Note:
637 * This API can set external interface 2 RGMII delay.
638 * In TX delay, there are 2 selection: no-delay and 2ns delay.
639 * In RX dekay, there are 8 steps for delay tunning. 0 for no-delay, and 7 for maximum delay.
640 */
641 //extern
> 642 rtk_api_ret_t rtk_port_rgmiiDelayExt_set(rtk_port_t port, rtk_data_t txDelay, rtk_data_t rxDelay) {return 0;}
643
644 /* Function Name:
645 * rtk_port_sgmiiNway_set
646 * Description:
647 * Configure SGMII/HSGMII port Nway state
648 * Input:
649 * port - Port ID
650 * state - Nway state
651 * Output:
652 * None.
653 * Return:
654 * RT_ERR_OK - OK
655 * RT_ERR_FAILED - Failed
656 * RT_ERR_SMI - SMI access error
657 * RT_ERR_PORT_ID - Invalid port ID.
658 * Note:
659 * The API configure SGMII/HSGMII port Nway state
660 */
661 //extern
662 rtk_api_ret_t rtk_port_sgmiiNway_set(rtk_port_t port, rtk_enable_t state) {return 0;}
663
> 664 rtk_api_ret_t rtk_switch_logicalPortCheck(rtk_port_t logicalPort)
665 {
666 if(init_state != INIT_COMPLETED)
667 return RT_ERR_NOT_INIT;
668
669 if(logicalPort >= RTK_SWITCH_PORT_NUM)
670 return RT_ERR_FAILED;
671
672 if(halCtrl->l2p_port[logicalPort] == 0xFF)
673 return RT_ERR_FAILED;
674
675 return RT_ERR_OK;
676 }
677 #define RTK_SCAN_ALL_LOG_PORT(__port__) for(__port__ = 0; __port__ < RTK_SWITCH_PORT_NUM; __port__++) if( rtk_switch_logicalPortCheck(__port__) == RT_ERR_OK)
678
> 679 rtk_api_ret_t rtk_switch_isUtpPort(rtk_port_t logicalPort)
680 {
681 if(init_state != INIT_COMPLETED)
682 return RT_ERR_NOT_INIT;
683
684 if(logicalPort >= RTK_SWITCH_PORT_NUM)
685 return RT_ERR_FAILED;
686
687 if(halCtrl->log_port_type[logicalPort] == UTP_PORT)
688 return RT_ERR_OK;
689 else
690 return RT_ERR_FAILED;
691 }
692
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[frank-w-bpi-r2-4.14:5.15-rtl8367dsa 44/44] drivers/net/dsa/rtl8367s_mdio.h:895:15: error: no previous prototype for 'rtk_switch_isSgmiiPort'
by kernel test robot
tree: https://github.com/frank-w/BPI-R2-4.14 5.15-rtl8367dsa
head: e9ec03c13f235a810e08f9797a0e826b994a8743
commit: e9ec03c13f235a810e08f9797a0e826b994a8743 [44/44] net: dsa: add rgmii/sgmii functions
config: s390-allmodconfig (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/frank-w/BPI-R2-4.14/commit/e9ec03c13f235a810e08f9797a0...
git remote add frank-w-bpi-r2-4.14 https://github.com/frank-w/BPI-R2-4.14
git fetch --no-tags frank-w-bpi-r2-4.14 5.15-rtl8367dsa
git checkout e9ec03c13f235a810e08f9797a0e826b994a8743
# 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(a)intel.com>
All errors (new ones prefixed by >>):
In file included from drivers/net/dsa/rtl8367s_mdio.c:23:
drivers/net/dsa/rtl8367s_mdio.h:785:15: error: no previous prototype for 'rtk_vlan_reset' [-Werror=missing-prototypes]
785 | rtk_api_ret_t rtk_vlan_reset(void) {return 0;}
| ^~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.h:788:15: error: no previous prototype for 'rtk_vlan_init' [-Werror=missing-prototypes]
788 | rtk_api_ret_t rtk_vlan_init(void) {return 0;}
| ^~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.h:811:15: error: no previous prototype for 'rtk_vlan_set' [-Werror=missing-prototypes]
811 | rtk_api_ret_t rtk_vlan_set(rtk_vlan_t vid, rtk_vlan_cfg_t *pVlanCfg) {return 0;}
| ^~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.h:836:15: error: no previous prototype for 'rtk_vlan_portPvid_set' [-Werror=missing-prototypes]
836 | rtk_api_ret_t rtk_vlan_portPvid_set(rtk_port_t port, rtk_vlan_t pvid, rtk_pri_t priority) {return 0;}
| ^~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.h:838:15: error: no previous prototype for 'rtk_switch_logicalPortCheck' [-Werror=missing-prototypes]
838 | rtk_api_ret_t rtk_switch_logicalPortCheck(rtk_port_t logicalPort)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.h:853:15: error: no previous prototype for 'rtk_switch_isExtPort' [-Werror=missing-prototypes]
853 | rtk_api_ret_t rtk_switch_isExtPort(rtk_port_t logicalPort)
| ^~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.h:867:15: error: no previous prototype for 'rtk_switch_isUtpPort' [-Werror=missing-prototypes]
867 | rtk_api_ret_t rtk_switch_isUtpPort(rtk_port_t logicalPort)
| ^~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.h:881:15: error: no previous prototype for 'rtk_switch_isHsgPort' [-Werror=missing-prototypes]
881 | rtk_api_ret_t rtk_switch_isHsgPort(rtk_port_t logicalPort)
| ^~~~~~~~~~~~~~~~~~~~
>> drivers/net/dsa/rtl8367s_mdio.h:895:15: error: no previous prototype for 'rtk_switch_isSgmiiPort' [-Werror=missing-prototypes]
895 | rtk_api_ret_t rtk_switch_isSgmiiPort(rtk_port_t logicalPort)
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.h:909:12: error: no previous prototype for 'rtk_switch_port_L2P_get' [-Werror=missing-prototypes]
909 | rtk_uint32 rtk_switch_port_L2P_get(rtk_port_t logicalPort)
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:46:14: error: no previous prototype for 'mii_mgr_read' [-Werror=missing-prototypes]
46 | unsigned int mii_mgr_read(unsigned int phy_addr,unsigned int phy_register,unsigned int *read_data)
| ^~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:59:14: error: no previous prototype for 'mii_mgr_write' [-Werror=missing-prototypes]
59 | unsigned int mii_mgr_write(unsigned int phy_addr,unsigned int phy_register,unsigned int write_data)
| ^~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:76:11: error: no previous prototype for 'smi_read' [-Werror=missing-prototypes]
76 | rtk_int32 smi_read(rtk_uint32 mAddrs, rtk_uint32 *rData)
| ^~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:105:11: error: no previous prototype for 'smi_write' [-Werror=missing-prototypes]
105 | rtk_int32 smi_write(rtk_uint32 mAddrs, rtk_uint32 rData)
| ^~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:135:7: error: no previous prototype for 'rtl8367c_setAsicReg' [-Werror=missing-prototypes]
135 | ret_t rtl8367c_setAsicReg(rtk_uint32 reg, rtk_uint32 value)
| ^~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:146:7: error: no previous prototype for 'rtl8367c_getAsicReg' [-Werror=missing-prototypes]
146 | ret_t rtl8367c_getAsicReg(rtk_uint32 reg, rtk_uint32 *pValue)
| ^~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:162:7: error: no previous prototype for 'rtl8367c_setAsicRegBit' [-Werror=missing-prototypes]
162 | ret_t rtl8367c_setAsicRegBit(rtk_uint32 reg, rtk_uint32 bit, rtk_uint32 value)
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:186:7: error: no previous prototype for 'rtl8367c_getAsicRegBit' [-Werror=missing-prototypes]
186 | ret_t rtl8367c_getAsicRegBit(rtk_uint32 reg, rtk_uint32 bit, rtk_uint32 *pValue)
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:201:7: error: no previous prototype for 'rtl8367c_getAsicRegBits' [-Werror=missing-prototypes]
201 | ret_t rtl8367c_getAsicRegBits(rtk_uint32 reg, rtk_uint32 bits, rtk_uint32 *pValue)
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:227:7: error: no previous prototype for 'rtl8367c_setAsicRegBits' [-Werror=missing-prototypes]
227 | ret_t rtl8367c_setAsicRegBits(rtk_uint32 reg, rtk_uint32 bits, rtk_uint32 value)
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:264:7: error: no previous prototype for 'rtl8367c_setAsicPHYOCPReg' [-Werror=missing-prototypes]
264 | ret_t rtl8367c_setAsicPHYOCPReg(rtk_uint32 phyNo, rtk_uint32 ocpAddr, rtk_uint32 ocpData )
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:285:7: error: no previous prototype for 'rtl8367c_getAsicPHYOCPReg' [-Werror=missing-prototypes]
285 | ret_t rtl8367c_getAsicPHYOCPReg(rtk_uint32 phyNo, rtk_uint32 ocpAddr, rtk_uint32 *pRegData )
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:306:7: error: no previous prototype for 'rtl8367c_setAsicSdsReg' [-Werror=missing-prototypes]
306 | ret_t rtl8367c_setAsicSdsReg(rtk_uint32 sdsId, rtk_uint32 sdsReg, rtk_uint32 sdsPage, rtk_uint32 value)
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:323:7: error: no previous prototype for 'rtl8367c_getAsicSdsReg' [-Werror=missing-prototypes]
323 | ret_t rtl8367c_getAsicSdsReg(rtk_uint32 sdsId, rtk_uint32 sdsReg, rtk_uint32 sdsPage, rtk_uint32 *value)
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:349:7: error: no previous prototype for 'rtl8367c_setAsicPHYReg' [-Werror=missing-prototypes]
349 | ret_t rtl8367c_setAsicPHYReg(rtk_uint32 phyNo, rtk_uint32 phyAddr, rtk_uint32 phyData )
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:360:7: error: no previous prototype for 'rtl8367c_getAsicPHYReg' [-Werror=missing-prototypes]
360 | ret_t rtl8367c_getAsicPHYReg(rtk_uint32 phyNo, rtk_uint32 phyAddr, rtk_uint32 *pRegData )
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:373:15: error: no previous prototype for 'rtk_port_phyReg_set' [-Werror=missing-prototypes]
373 | rtk_api_ret_t rtk_port_phyReg_set(rtk_port_t port, rtk_port_phy_reg_t reg, rtk_port_phy_data_t regData)
| ^~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:389:15: error: no previous prototype for 'rtk_port_phyReg_get' [-Werror=missing-prototypes]
389 | rtk_api_ret_t rtk_port_phyReg_get(rtk_port_t port, rtk_port_phy_reg_t reg, rtk_port_phy_data_t *pData)
| ^~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:505:15: error: no previous prototype for 'rtk_switch_probe' [-Werror=missing-prototypes]
505 | rtk_api_ret_t rtk_switch_probe(switch_chip_t *pSwitchChip)
| ^~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:554:15: error: no previous prototype for 'rtk_switch_initialState_set' [-Werror=missing-prototypes]
554 | rtk_api_ret_t rtk_switch_initialState_set(init_state_t state)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:563:15: error: no previous prototype for 'rtk_switch_init' [-Werror=missing-prototypes]
563 | rtk_api_ret_t rtk_switch_init(void)
| ^~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:697:7: error: no previous prototype for 'rtl8367c_setAsicPortEnableAll' [-Werror=missing-prototypes]
697 | ret_t rtl8367c_setAsicPortEnableAll(rtk_uint32 enable)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:706:7: error: no previous prototype for 'rtl8367c_setAsicPortExtMode' [-Werror=missing-prototypes]
706 | ret_t rtl8367c_setAsicPortExtMode(rtk_uint32 id, rtk_uint32 mode)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:1084:7: error: no previous prototype for 'rtl8367c_setAsicPortForceLinkExt' [-Werror=missing-prototypes]
1084 | ret_t rtl8367c_setAsicPortForceLinkExt(rtk_uint32 id, rtl8367c_port_ability_t *pPortAbility)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:1170:7: error: no previous prototype for 'rtl8367c_getAsicPortForceLinkExt' [-Werror=missing-prototypes]
1170 | ret_t rtl8367c_getAsicPortForceLinkExt(rtk_uint32 id, rtl8367c_port_ability_t *pPortAbility)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:1278:15: error: no previous prototype for 'rtk_port_macForceLinkExt_set' [-Werror=missing-prototypes]
1278 | rtk_api_ret_t rtk_port_macForceLinkExt_set(rtk_port_t port, rtk_mode_ext_t mode, rtk_port_mac_ability_t *pPortability)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:1346:15: error: no previous prototype for 'rtk_port_phyEnableAll_set' [-Werror=missing-prototypes]
1346 | rtk_api_ret_t rtk_port_phyEnableAll_set(rtk_enable_t enable)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:1387:15: error: no previous prototype for 'rtk_port_rgmiiDelayExt_set' [-Werror=missing-prototypes]
1387 | rtk_api_ret_t rtk_port_rgmiiDelayExt_set(rtk_port_t port, rtk_data_t txDelay, rtk_data_t rxDelay)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/dsa/rtl8367s_mdio.c:1419:7: error: no previous prototype for 'rtl8367c_setSgmiiNway' [-Werror=missing-prototypes]
1419 | ret_t rtl8367c_setSgmiiNway(rtk_uint32 ext_id, rtk_uint32 state)
| ^~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:1506:15: error: no previous prototype for 'rtk_port_sgmiiNway_set' [-Werror=missing-prototypes]
1506 | rtk_api_ret_t rtk_port_sgmiiNway_set(rtk_port_t port, rtk_enable_t state)
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:1561:6: error: no previous prototype for 'init_gsw' [-Werror=missing-prototypes]
1561 | void init_gsw(void)
| ^~~~~~~~
cc1: all warnings being treated as errors
vim +/rtk_switch_isSgmiiPort +895 drivers/net/dsa/rtl8367s_mdio.h
894
> 895 rtk_api_ret_t rtk_switch_isSgmiiPort(rtk_port_t logicalPort)
896 {
897 if(init_state != INIT_COMPLETED)
898 return RT_ERR_NOT_INIT;
899
900 if(logicalPort >= RTK_SWITCH_PORT_NUM)
901 return RT_ERR_FAILED;
902
903 if( ((0x01 << logicalPort) & halCtrl->sg_logical_portmask) != 0)
904 return RT_ERR_OK;
905 else
906 return RT_ERR_FAILED;
907 }
908
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
lib/kunit/kunit-test.c:362:1: warning: the frame size of 1168 bytes is larger than 1024 bytes
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: ccfff0a2bd2a30de130b5623d242ddecd0272bc2
commit: 6d2426b2f258da19fbe5fa1c93a5695460390eac kunit: Support skipped tests
date: 5 months ago
config: powerpc64-randconfig-r016-20211114 (attached as .config)
compiler: powerpc64-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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 6d2426b2f258da19fbe5fa1c93a5695460390eac
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
lib/kunit/kunit-test.c: In function 'kunit_resource_test_named':
>> lib/kunit/kunit-test.c:362:1: warning: the frame size of 1168 bytes is larger than 1024 bytes [-Wframe-larger-than=]
362 | }
| ^
vim +362 lib/kunit/kunit-test.c
d4cdd146d0db90 Alan Maguire 2020-05-29 327
725aca95859566 Alan Maguire 2020-05-29 328 static void kunit_resource_test_named(struct kunit *test)
725aca95859566 Alan Maguire 2020-05-29 329 {
725aca95859566 Alan Maguire 2020-05-29 330 struct kunit_resource res1, res2, *found = NULL;
725aca95859566 Alan Maguire 2020-05-29 331 struct kunit_test_resource_context ctx;
725aca95859566 Alan Maguire 2020-05-29 332
725aca95859566 Alan Maguire 2020-05-29 333 KUNIT_EXPECT_EQ(test,
725aca95859566 Alan Maguire 2020-05-29 334 kunit_add_named_resource(test, NULL, NULL, &res1,
725aca95859566 Alan Maguire 2020-05-29 335 "resource_1", &ctx),
725aca95859566 Alan Maguire 2020-05-29 336 0);
725aca95859566 Alan Maguire 2020-05-29 337 KUNIT_EXPECT_PTR_EQ(test, res1.data, (void *)&ctx);
725aca95859566 Alan Maguire 2020-05-29 338
725aca95859566 Alan Maguire 2020-05-29 339 KUNIT_EXPECT_EQ(test,
725aca95859566 Alan Maguire 2020-05-29 340 kunit_add_named_resource(test, NULL, NULL, &res1,
725aca95859566 Alan Maguire 2020-05-29 341 "resource_1", &ctx),
725aca95859566 Alan Maguire 2020-05-29 342 -EEXIST);
725aca95859566 Alan Maguire 2020-05-29 343
725aca95859566 Alan Maguire 2020-05-29 344 KUNIT_EXPECT_EQ(test,
725aca95859566 Alan Maguire 2020-05-29 345 kunit_add_named_resource(test, NULL, NULL, &res2,
725aca95859566 Alan Maguire 2020-05-29 346 "resource_2", &ctx),
725aca95859566 Alan Maguire 2020-05-29 347 0);
725aca95859566 Alan Maguire 2020-05-29 348
725aca95859566 Alan Maguire 2020-05-29 349 found = kunit_find_named_resource(test, "resource_1");
725aca95859566 Alan Maguire 2020-05-29 350
725aca95859566 Alan Maguire 2020-05-29 351 KUNIT_EXPECT_PTR_EQ(test, found, &res1);
725aca95859566 Alan Maguire 2020-05-29 352
725aca95859566 Alan Maguire 2020-05-29 353 if (found)
725aca95859566 Alan Maguire 2020-05-29 354 kunit_put_resource(&res1);
725aca95859566 Alan Maguire 2020-05-29 355
725aca95859566 Alan Maguire 2020-05-29 356 KUNIT_EXPECT_EQ(test, kunit_destroy_named_resource(test, "resource_2"),
725aca95859566 Alan Maguire 2020-05-29 357 0);
725aca95859566 Alan Maguire 2020-05-29 358
725aca95859566 Alan Maguire 2020-05-29 359 kunit_cleanup(test);
725aca95859566 Alan Maguire 2020-05-29 360
725aca95859566 Alan Maguire 2020-05-29 361 KUNIT_EXPECT_TRUE(test, list_empty(&test->resources));
725aca95859566 Alan Maguire 2020-05-29 @362 }
725aca95859566 Alan Maguire 2020-05-29 363
:::::: The code at line 362 was first introduced by commit
:::::: 725aca9585956676687c4cb803e88f770b0df2b2 kunit: add support for named resources
:::::: TO: Alan Maguire <alan.maguire(a)oracle.com>
:::::: CC: Shuah Khan <skhan(a)linuxfoundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[frank-w-bpi-r2-4.14:5.15-rtl8367dsa 40/44] drivers/net/dsa/rtl8367s_mdio.c:79:11: error: no previous prototype for 'smi_read'
by kernel test robot
tree: https://github.com/frank-w/BPI-R2-4.14 5.15-rtl8367dsa
head: e9ec03c13f235a810e08f9797a0e826b994a8743
commit: 135bbd3ba8140624beeff45f30dc314c30a9be6f [40/44] net: dsa: rtl8367: add chip detection
config: m68k-allmodconfig (attached as .config)
compiler: m68k-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/frank-w/BPI-R2-4.14/commit/135bbd3ba8140624beeff45f30d...
git remote add frank-w-bpi-r2-4.14 https://github.com/frank-w/BPI-R2-4.14
git fetch --no-tags frank-w-bpi-r2-4.14 5.15-rtl8367dsa
git checkout 135bbd3ba8140624beeff45f30dc314c30a9be6f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from drivers/net/dsa/rtl8367s_mdio.c:23:
drivers/net/dsa/rtl8367s_mdio.h:393:15: error: no previous prototype for 'rtk_vlan_reset' [-Werror=missing-prototypes]
393 | rtk_api_ret_t rtk_vlan_reset(void) {return 0;}
| ^~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.h:396:15: error: no previous prototype for 'rtk_vlan_init' [-Werror=missing-prototypes]
396 | rtk_api_ret_t rtk_vlan_init(void) {return 0;}
| ^~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.h:419:15: error: no previous prototype for 'rtk_vlan_set' [-Werror=missing-prototypes]
419 | rtk_api_ret_t rtk_vlan_set(rtk_vlan_t vid, rtk_vlan_cfg_t *pVlanCfg) {return 0;}
| ^~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.h:444:15: error: no previous prototype for 'rtk_vlan_portPvid_set' [-Werror=missing-prototypes]
444 | rtk_api_ret_t rtk_vlan_portPvid_set(rtk_port_t port, rtk_vlan_t pvid, rtk_pri_t priority) {return 0;}
| ^~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.h:480:15: error: no previous prototype for 'rtk_port_macForceLinkExt_set' [-Werror=missing-prototypes]
480 | rtk_api_ret_t rtk_port_macForceLinkExt_set(rtk_port_t port, rtk_mode_ext_t mode, rtk_port_mac_ability_t *pPortability) {return 0;};
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.h:502:15: error: no previous prototype for 'rtk_port_phyEnableAll_set' [-Werror=missing-prototypes]
502 | rtk_api_ret_t rtk_port_phyEnableAll_set(rtk_enable_t enable) {return 0;}
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.h:524:15: error: no previous prototype for 'rtk_port_rgmiiDelayExt_set' [-Werror=missing-prototypes]
524 | rtk_api_ret_t rtk_port_rgmiiDelayExt_set(rtk_port_t port, rtk_data_t txDelay, rtk_data_t rxDelay) {return 0;}
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.h:544:15: error: no previous prototype for 'rtk_port_sgmiiNway_set' [-Werror=missing-prototypes]
544 | rtk_api_ret_t rtk_port_sgmiiNway_set(rtk_port_t port, rtk_enable_t state) {return 0;}
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:49:14: error: no previous prototype for 'mii_mgr_read' [-Werror=missing-prototypes]
49 | unsigned int mii_mgr_read(unsigned int phy_addr,unsigned int phy_register,unsigned int *read_data)
| ^~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:62:14: error: no previous prototype for 'mii_mgr_write' [-Werror=missing-prototypes]
62 | unsigned int mii_mgr_write(unsigned int phy_addr,unsigned int phy_register,unsigned int write_data)
| ^~~~~~~~~~~~~
>> drivers/net/dsa/rtl8367s_mdio.c:79:11: error: no previous prototype for 'smi_read' [-Werror=missing-prototypes]
79 | rtk_int32 smi_read(rtk_uint32 mAddrs, rtk_uint32 *rData)
| ^~~~~~~~
>> drivers/net/dsa/rtl8367s_mdio.c:108:11: error: no previous prototype for 'smi_write' [-Werror=missing-prototypes]
108 | rtk_int32 smi_write(rtk_uint32 mAddrs, rtk_uint32 rData)
| ^~~~~~~~~
>> drivers/net/dsa/rtl8367s_mdio.c:155:7: error: no previous prototype for 'rtl8367c_setAsicReg' [-Werror=missing-prototypes]
155 | ret_t rtl8367c_setAsicReg(rtk_uint32 reg, rtk_uint32 value)
| ^~~~~~~~~~~~~~~~~~~
>> drivers/net/dsa/rtl8367s_mdio.c:180:7: error: no previous prototype for 'rtl8367c_getAsicReg' [-Werror=missing-prototypes]
180 | ret_t rtl8367c_getAsicReg(rtk_uint32 reg, rtk_uint32 *pValue)
| ^~~~~~~~~~~~~~~~~~~
>> drivers/net/dsa/rtl8367s_mdio.c:210:15: error: no previous prototype for 'rtk_switch_probe' [-Werror=missing-prototypes]
210 | rtk_api_ret_t rtk_switch_probe(switch_chip_t *pSwitchChip)
| ^~~~~~~~~~~~~~~~
>> drivers/net/dsa/rtl8367s_mdio.c:258:15: error: no previous prototype for 'rtk_switch_init' [-Werror=missing-prototypes]
258 | rtk_api_ret_t rtk_switch_init(void)
| ^~~~~~~~~~~~~~~
drivers/net/dsa/rtl8367s_mdio.c:412:6: error: no previous prototype for 'init_gsw' [-Werror=missing-prototypes]
412 | void init_gsw(void)
| ^~~~~~~~
cc1: all warnings being treated as errors
vim +/smi_read +79 drivers/net/dsa/rtl8367s_mdio.c
77
78 //MDC_MDIO_OPERATION is defined in phy code via makefile
> 79 rtk_int32 smi_read(rtk_uint32 mAddrs, rtk_uint32 *rData)
80 {
81 if(mAddrs > 0xFFFF)
82 return RT_ERR_INPUT;
83
84 if(rData == NULL)
85 return RT_ERR_NULL_POINTER;
86
87 /* Lock (empty function in phy driver) */
88 //rtlglue_drvMutexLock();
89
90 /* Write address control code to register 31 */
91 MDC_MDIO_WRITE(MDC_MDIO_PREAMBLE_LEN, MDC_MDIO_PHY_ID, MDC_MDIO_CTRL0_REG, MDC_MDIO_ADDR_OP);
92
93 /* Write address to register 23 */
94 MDC_MDIO_WRITE(MDC_MDIO_PREAMBLE_LEN, MDC_MDIO_PHY_ID, MDC_MDIO_ADDRESS_REG, mAddrs);
95
96 /* Write read control code to register 21 */
97 MDC_MDIO_WRITE(MDC_MDIO_PREAMBLE_LEN, MDC_MDIO_PHY_ID, MDC_MDIO_CTRL1_REG, MDC_MDIO_READ_OP);
98
99 /* Read data from register 25 */
100 MDC_MDIO_READ(MDC_MDIO_PREAMBLE_LEN, MDC_MDIO_PHY_ID, MDC_MDIO_DATA_READ_REG, rData);
101
102 /* Unlock (empty function in phy driver) */
103 //rtlglue_drvMutexUnlock();
104
105 return RT_ERR_OK;
106 }
107
> 108 rtk_int32 smi_write(rtk_uint32 mAddrs, rtk_uint32 rData)
109 {
110 if(mAddrs > 0xFFFF)
111 return RT_ERR_INPUT;
112
113 if(rData > 0xFFFF)
114 return RT_ERR_INPUT;
115
116 /* Lock (empty function in phy driver) */
117 //rtlglue_drvMutexLock();
118
119 /* Write address control code to register 31 */
120 MDC_MDIO_WRITE(MDC_MDIO_PREAMBLE_LEN, MDC_MDIO_PHY_ID, MDC_MDIO_CTRL0_REG, MDC_MDIO_ADDR_OP);
121
122 /* Write address to register 23 */
123 MDC_MDIO_WRITE(MDC_MDIO_PREAMBLE_LEN, MDC_MDIO_PHY_ID, MDC_MDIO_ADDRESS_REG, mAddrs);
124
125 /* Write data to register 24 */
126 MDC_MDIO_WRITE(MDC_MDIO_PREAMBLE_LEN, MDC_MDIO_PHY_ID, MDC_MDIO_DATA_WRITE_REG, rData);
127
128 /* Write data control code to register 21 */
129 MDC_MDIO_WRITE(MDC_MDIO_PREAMBLE_LEN, MDC_MDIO_PHY_ID, MDC_MDIO_CTRL1_REG, MDC_MDIO_WRITE_OP);
130
131 /* Unlock (empty function in phy driver) */
132 //rtlglue_drvMutexUnlock();
133
134 return RT_ERR_OK;
135
136 }
137
138
139
140 /* Function Name:
141 * rtl8367c_setAsicReg
142 * Description:
143 * Set content of asic register
144 * Input:
145 * reg - register's address
146 * value - Value setting to register
147 * Output:
148 * None
149 * Return:
150 * RT_ERR_OK - Success
151 * RT_ERR_SMI - SMI access error
152 * Note:
153 * The value will be set to ASIC mapping address only and it is always return RT_ERR_OK while setting un-mapping address registers
154 */
> 155 ret_t rtl8367c_setAsicReg(rtk_uint32 reg, rtk_uint32 value)
156 {
157 ret_t retVal;
158
159 retVal = smi_write(reg, value);
160 if(retVal != RT_ERR_OK)
161 return RT_ERR_SMI;
162
163 return RT_ERR_OK;
164 }
165 /* Function Name:
166 * rtl8367c_getAsicReg
167 * Description:
168 * Get content of asic register
169 * Input:
170 * reg - register's address
171 * value - Value setting to register
172 * Output:
173 * None
174 * Return:
175 * RT_ERR_OK - Success
176 * RT_ERR_SMI - SMI access error
177 * Note:
178 * Value 0x0000 will be returned for ASIC un-mapping address
179 */
> 180 ret_t rtl8367c_getAsicReg(rtk_uint32 reg, rtk_uint32 *pValue)
181 {
182
183 rtk_uint32 regData;
184 ret_t retVal;
185
186 retVal = smi_read(reg, ®Data);
187 if(retVal != RT_ERR_OK)
188 return RT_ERR_SMI;
189
190 *pValue = regData;
191
192 return RT_ERR_OK;
193 }
194
195
196 /* Function Name:
197 * rtk_switch_probe
198 * Description:
199 * Probe switch
200 * Input:
201 * None
202 * Output:
203 * None
204 * Return:
205 * RT_ERR_OK - Switch probed
206 * RT_ERR_FAILED - Switch Unprobed.
207 * Note:
208 *
209 */
> 210 rtk_api_ret_t rtk_switch_probe(switch_chip_t *pSwitchChip)
211 {
212 rtk_uint32 retVal;
213 rtk_uint32 data, regValue;
214
215 if((retVal = rtl8367c_setAsicReg(0x13C2, 0x0249)) != RT_ERR_OK)
216 return retVal;
217
218 if((retVal = rtl8367c_getAsicReg(0x1300, &data)) != RT_ERR_OK)
219 return retVal;
220
221 if((retVal = rtl8367c_getAsicReg(0x1301, ®Value)) != RT_ERR_OK)
222 return retVal;
223
224 if((retVal = rtl8367c_setAsicReg(0x13C2, 0x0000)) != RT_ERR_OK)
225 return retVal;
226
227 printk(KERN_ALERT "DEBUG: Passed %s %d chip: 0x%x\n",__FUNCTION__,__LINE__,data); //0x6367 on r64 v0.1
228
229 switch (data)
230 {
231 case 0x0276:
232 case 0x0597:
233 case 0x6367:
234 *pSwitchChip = CHIP_RTL8367C;
235 break;
236 case 0x0652:
237 case 0x6368:
238 *pSwitchChip = CHIP_RTL8370B;
239 break;
240 case 0x0801:
241 case 0x6511:
242 if( (regValue & 0x00F0) == 0x0080)
243 {
244 *pSwitchChip = CHIP_RTL8363SC_VB;
245 }
246 else
247 {
248 *pSwitchChip = CHIP_RTL8364B;
249 }
250 break;
251 default:
252 return RT_ERR_FAILED;
253 }
254
255 return RT_ERR_OK;
256 }
257
> 258 rtk_api_ret_t rtk_switch_init(void)
259 {
260 rtk_uint32 retVal;
261 //rtl8367c_rma_t rmaCfg;
262 switch_chip_t switchChip;
263
264 /* probe switch */
265 if ((retVal = rtk_switch_probe(&switchChip)) != RT_ERR_OK)
266 return retVal;
267
268 //some more missing here...
269
270 return 0;
271 }
272
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[frank-w-bpi-r2-4.14:5.15-rtl8367dsa 42/44] drivers/net/dsa/rtl8367s_mdio.h:664:15: warning: no previous prototype for function 'rtk_switch_logicalPortCheck'
by kernel test robot
tree: https://github.com/frank-w/BPI-R2-4.14 5.15-rtl8367dsa
head: e9ec03c13f235a810e08f9797a0e826b994a8743
commit: fb5ff9592d60bcaaac8322ffd96b90bcf30d1f79 [42/44] net: dsa: rtl8367: add basic init for CHIP_RTL8367C
config: hexagon-buildonly-randconfig-r003-20211114 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c3dddeeafb529e769cde87bd29ef6271ac6bfa5c)
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/frank-w/BPI-R2-4.14/commit/fb5ff9592d60bcaaac8322ffd96...
git remote add frank-w-bpi-r2-4.14 https://github.com/frank-w/BPI-R2-4.14
git fetch --no-tags frank-w-bpi-r2-4.14 5.15-rtl8367dsa
git checkout fb5ff9592d60bcaaac8322ffd96b90bcf30d1f79
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=hexagon
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from drivers/net/dsa/rtl8367s_mdio.c:23:
drivers/net/dsa/rtl8367s_mdio.h:511:15: warning: no previous prototype for function 'rtk_vlan_reset' [-Wmissing-prototypes]
rtk_api_ret_t rtk_vlan_reset(void) {return 0;}
^
drivers/net/dsa/rtl8367s_mdio.h:511:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
rtk_api_ret_t rtk_vlan_reset(void) {return 0;}
^
static
drivers/net/dsa/rtl8367s_mdio.h:514:15: warning: no previous prototype for function 'rtk_vlan_init' [-Wmissing-prototypes]
rtk_api_ret_t rtk_vlan_init(void) {return 0;}
^
drivers/net/dsa/rtl8367s_mdio.h:514:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
rtk_api_ret_t rtk_vlan_init(void) {return 0;}
^
static
drivers/net/dsa/rtl8367s_mdio.h:537:15: warning: no previous prototype for function 'rtk_vlan_set' [-Wmissing-prototypes]
rtk_api_ret_t rtk_vlan_set(rtk_vlan_t vid, rtk_vlan_cfg_t *pVlanCfg) {return 0;}
^
drivers/net/dsa/rtl8367s_mdio.h:537:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
rtk_api_ret_t rtk_vlan_set(rtk_vlan_t vid, rtk_vlan_cfg_t *pVlanCfg) {return 0;}
^
static
drivers/net/dsa/rtl8367s_mdio.h:562:15: warning: no previous prototype for function 'rtk_vlan_portPvid_set' [-Wmissing-prototypes]
rtk_api_ret_t rtk_vlan_portPvid_set(rtk_port_t port, rtk_vlan_t pvid, rtk_pri_t priority) {return 0;}
^
drivers/net/dsa/rtl8367s_mdio.h:562:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
rtk_api_ret_t rtk_vlan_portPvid_set(rtk_port_t port, rtk_vlan_t pvid, rtk_pri_t priority) {return 0;}
^
static
drivers/net/dsa/rtl8367s_mdio.h:598:15: warning: no previous prototype for function 'rtk_port_macForceLinkExt_set' [-Wmissing-prototypes]
rtk_api_ret_t rtk_port_macForceLinkExt_set(rtk_port_t port, rtk_mode_ext_t mode, rtk_port_mac_ability_t *pPortability) {return 0;};
^
drivers/net/dsa/rtl8367s_mdio.h:598:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
rtk_api_ret_t rtk_port_macForceLinkExt_set(rtk_port_t port, rtk_mode_ext_t mode, rtk_port_mac_ability_t *pPortability) {return 0;};
^
static
drivers/net/dsa/rtl8367s_mdio.h:620:15: warning: no previous prototype for function 'rtk_port_phyEnableAll_set' [-Wmissing-prototypes]
rtk_api_ret_t rtk_port_phyEnableAll_set(rtk_enable_t enable) {return 0;}
^
drivers/net/dsa/rtl8367s_mdio.h:620:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
rtk_api_ret_t rtk_port_phyEnableAll_set(rtk_enable_t enable) {return 0;}
^
static
drivers/net/dsa/rtl8367s_mdio.h:642:15: warning: no previous prototype for function 'rtk_port_rgmiiDelayExt_set' [-Wmissing-prototypes]
rtk_api_ret_t rtk_port_rgmiiDelayExt_set(rtk_port_t port, rtk_data_t txDelay, rtk_data_t rxDelay) {return 0;}
^
drivers/net/dsa/rtl8367s_mdio.h:642:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
rtk_api_ret_t rtk_port_rgmiiDelayExt_set(rtk_port_t port, rtk_data_t txDelay, rtk_data_t rxDelay) {return 0;}
^
static
drivers/net/dsa/rtl8367s_mdio.h:662:15: warning: no previous prototype for function 'rtk_port_sgmiiNway_set' [-Wmissing-prototypes]
rtk_api_ret_t rtk_port_sgmiiNway_set(rtk_port_t port, rtk_enable_t state) {return 0;}
^
drivers/net/dsa/rtl8367s_mdio.h:662:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
rtk_api_ret_t rtk_port_sgmiiNway_set(rtk_port_t port, rtk_enable_t state) {return 0;}
^
static
>> drivers/net/dsa/rtl8367s_mdio.h:664:15: warning: no previous prototype for function 'rtk_switch_logicalPortCheck' [-Wmissing-prototypes]
rtk_api_ret_t rtk_switch_logicalPortCheck(rtk_port_t logicalPort)
^
drivers/net/dsa/rtl8367s_mdio.h:664:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
rtk_api_ret_t rtk_switch_logicalPortCheck(rtk_port_t logicalPort)
^
static
>> drivers/net/dsa/rtl8367s_mdio.h:679:15: warning: no previous prototype for function 'rtk_switch_isUtpPort' [-Wmissing-prototypes]
rtk_api_ret_t rtk_switch_isUtpPort(rtk_port_t logicalPort)
^
drivers/net/dsa/rtl8367s_mdio.h:679:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
rtk_api_ret_t rtk_switch_isUtpPort(rtk_port_t logicalPort)
^
static
drivers/net/dsa/rtl8367s_mdio.c:46:14: warning: no previous prototype for function 'mii_mgr_read' [-Wmissing-prototypes]
unsigned int mii_mgr_read(unsigned int phy_addr,unsigned int phy_register,unsigned int *read_data)
^
drivers/net/dsa/rtl8367s_mdio.c:46:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
unsigned int mii_mgr_read(unsigned int phy_addr,unsigned int phy_register,unsigned int *read_data)
^
static
drivers/net/dsa/rtl8367s_mdio.c:59:14: warning: no previous prototype for function 'mii_mgr_write' [-Wmissing-prototypes]
unsigned int mii_mgr_write(unsigned int phy_addr,unsigned int phy_register,unsigned int write_data)
^
drivers/net/dsa/rtl8367s_mdio.c:59:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
unsigned int mii_mgr_write(unsigned int phy_addr,unsigned int phy_register,unsigned int write_data)
^
static
drivers/net/dsa/rtl8367s_mdio.c:76:11: warning: no previous prototype for function 'smi_read' [-Wmissing-prototypes]
rtk_int32 smi_read(rtk_uint32 mAddrs, rtk_uint32 *rData)
^
drivers/net/dsa/rtl8367s_mdio.c:76:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
rtk_int32 smi_read(rtk_uint32 mAddrs, rtk_uint32 *rData)
^
static
drivers/net/dsa/rtl8367s_mdio.c:105:11: warning: no previous prototype for function 'smi_write' [-Wmissing-prototypes]
rtk_int32 smi_write(rtk_uint32 mAddrs, rtk_uint32 rData)
^
drivers/net/dsa/rtl8367s_mdio.c:105:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
rtk_int32 smi_write(rtk_uint32 mAddrs, rtk_uint32 rData)
^
static
drivers/net/dsa/rtl8367s_mdio.c:135:7: warning: no previous prototype for function 'rtl8367c_setAsicReg' [-Wmissing-prototypes]
ret_t rtl8367c_setAsicReg(rtk_uint32 reg, rtk_uint32 value)
^
drivers/net/dsa/rtl8367s_mdio.c:135:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
ret_t rtl8367c_setAsicReg(rtk_uint32 reg, rtk_uint32 value)
^
static
drivers/net/dsa/rtl8367s_mdio.c:146:7: warning: no previous prototype for function 'rtl8367c_getAsicReg' [-Wmissing-prototypes]
ret_t rtl8367c_getAsicReg(rtk_uint32 reg, rtk_uint32 *pValue)
^
drivers/net/dsa/rtl8367s_mdio.c:146:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
ret_t rtl8367c_getAsicReg(rtk_uint32 reg, rtk_uint32 *pValue)
^
static
>> drivers/net/dsa/rtl8367s_mdio.c:162:7: warning: no previous prototype for function 'rtl8367c_setAsicRegBit' [-Wmissing-prototypes]
ret_t rtl8367c_setAsicRegBit(rtk_uint32 reg, rtk_uint32 bit, rtk_uint32 value)
^
drivers/net/dsa/rtl8367s_mdio.c:162:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
ret_t rtl8367c_setAsicRegBit(rtk_uint32 reg, rtk_uint32 bit, rtk_uint32 value)
^
static
>> drivers/net/dsa/rtl8367s_mdio.c:186:7: warning: no previous prototype for function 'rtl8367c_getAsicRegBit' [-Wmissing-prototypes]
ret_t rtl8367c_getAsicRegBit(rtk_uint32 reg, rtk_uint32 bit, rtk_uint32 *pValue)
^
drivers/net/dsa/rtl8367s_mdio.c:186:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
ret_t rtl8367c_getAsicRegBit(rtk_uint32 reg, rtk_uint32 bit, rtk_uint32 *pValue)
^
static
>> drivers/net/dsa/rtl8367s_mdio.c:201:7: warning: no previous prototype for function 'rtl8367c_getAsicRegBits' [-Wmissing-prototypes]
ret_t rtl8367c_getAsicRegBits(rtk_uint32 reg, rtk_uint32 bits, rtk_uint32 *pValue)
^
drivers/net/dsa/rtl8367s_mdio.c:201:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
ret_t rtl8367c_getAsicRegBits(rtk_uint32 reg, rtk_uint32 bits, rtk_uint32 *pValue)
^
static
>> drivers/net/dsa/rtl8367s_mdio.c:227:7: warning: no previous prototype for function 'rtl8367c_setAsicRegBits' [-Wmissing-prototypes]
ret_t rtl8367c_setAsicRegBits(rtk_uint32 reg, rtk_uint32 bits, rtk_uint32 value)
^
drivers/net/dsa/rtl8367s_mdio.c:227:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
ret_t rtl8367c_setAsicRegBits(rtk_uint32 reg, rtk_uint32 bits, rtk_uint32 value)
^
static
>> drivers/net/dsa/rtl8367s_mdio.c:264:7: warning: no previous prototype for function 'rtl8367c_setAsicPHYOCPReg' [-Wmissing-prototypes]
ret_t rtl8367c_setAsicPHYOCPReg(rtk_uint32 phyNo, rtk_uint32 ocpAddr, rtk_uint32 ocpData )
^
drivers/net/dsa/rtl8367s_mdio.c:264:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
ret_t rtl8367c_setAsicPHYOCPReg(rtk_uint32 phyNo, rtk_uint32 ocpAddr, rtk_uint32 ocpData )
^
static
>> drivers/net/dsa/rtl8367s_mdio.c:285:7: warning: no previous prototype for function 'rtl8367c_getAsicPHYOCPReg' [-Wmissing-prototypes]
ret_t rtl8367c_getAsicPHYOCPReg(rtk_uint32 phyNo, rtk_uint32 ocpAddr, rtk_uint32 *pRegData )
^
drivers/net/dsa/rtl8367s_mdio.c:285:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
ret_t rtl8367c_getAsicPHYOCPReg(rtk_uint32 phyNo, rtk_uint32 ocpAddr, rtk_uint32 *pRegData )
^
static
drivers/net/dsa/rtl8367s_mdio.c:405:15: warning: no previous prototype for function 'rtk_switch_probe' [-Wmissing-prototypes]
rtk_api_ret_t rtk_switch_probe(switch_chip_t *pSwitchChip)
^
drivers/net/dsa/rtl8367s_mdio.c:405:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
rtk_api_ret_t rtk_switch_probe(switch_chip_t *pSwitchChip)
^
static
>> drivers/net/dsa/rtl8367s_mdio.c:454:15: warning: no previous prototype for function 'rtk_switch_initialState_set' [-Wmissing-prototypes]
rtk_api_ret_t rtk_switch_initialState_set(init_state_t state)
^
drivers/net/dsa/rtl8367s_mdio.c:454:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
rtk_api_ret_t rtk_switch_initialState_set(init_state_t state)
^
static
drivers/net/dsa/rtl8367s_mdio.c:463:15: warning: no previous prototype for function 'rtk_switch_init' [-Wmissing-prototypes]
rtk_api_ret_t rtk_switch_init(void)
^
drivers/net/dsa/rtl8367s_mdio.c:463:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
rtk_api_ret_t rtk_switch_init(void)
^
static
drivers/net/dsa/rtl8367s_mdio.c:633:6: warning: no previous prototype for function 'init_gsw' [-Wmissing-prototypes]
void init_gsw(void)
^
drivers/net/dsa/rtl8367s_mdio.c:633:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void init_gsw(void)
^
static
26 warnings generated.
vim +/rtk_switch_logicalPortCheck +664 drivers/net/dsa/rtl8367s_mdio.h
663
> 664 rtk_api_ret_t rtk_switch_logicalPortCheck(rtk_port_t logicalPort)
665 {
666 if(init_state != INIT_COMPLETED)
667 return RT_ERR_NOT_INIT;
668
669 if(logicalPort >= RTK_SWITCH_PORT_NUM)
670 return RT_ERR_FAILED;
671
672 if(halCtrl->l2p_port[logicalPort] == 0xFF)
673 return RT_ERR_FAILED;
674
675 return RT_ERR_OK;
676 }
677 #define RTK_SCAN_ALL_LOG_PORT(__port__) for(__port__ = 0; __port__ < RTK_SWITCH_PORT_NUM; __port__++) if( rtk_switch_logicalPortCheck(__port__) == RT_ERR_OK)
678
> 679 rtk_api_ret_t rtk_switch_isUtpPort(rtk_port_t logicalPort)
680 {
681 if(init_state != INIT_COMPLETED)
682 return RT_ERR_NOT_INIT;
683
684 if(logicalPort >= RTK_SWITCH_PORT_NUM)
685 return RT_ERR_FAILED;
686
687 if(halCtrl->log_port_type[logicalPort] == UTP_PORT)
688 return RT_ERR_OK;
689 else
690 return RT_ERR_FAILED;
691 }
692
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
Re: [PATCH 2/2] memremap: remove support for external pgmap refcounts
by kernel test robot
Hi Christoph,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on nvdimm/libnvdimm-for-next]
[cannot apply to hnaz-mm/master v5.15 next-20211112]
[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]
url: https://github.com/0day-ci/linux/commits/Christoph-Hellwig/nvdimm-pmem-st...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 519d81956ee277b4419c723adfb154603c2565ba
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/52278e5e6fc46f4d71f00c7e068331769...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Christoph-Hellwig/nvdimm-pmem-stop-using-q_usage_count-as-external-pgmap-refcount/20211019-163725
git checkout 52278e5e6fc46f4d71f00c7e068331769b456d19
# save the attached .config to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/pci/p2pdma.c: In function 'pci_p2pdma_add_resource':
>> drivers/pci/p2pdma.c:222:9: error: incompatible type for argument 6 of 'gen_pool_add_owner'
222 | pgmap->ref);
| ~~~~~^~~~~
| |
| struct percpu_ref
In file included from drivers/pci/p2pdma.c:16:
include/linux/genalloc.h:99:22: note: expected 'void *' but argument is of type 'struct percpu_ref'
99 | size_t, int, void *);
| ^~~~~~
vim +/gen_pool_add_owner +222 drivers/pci/p2pdma.c
52916982af48d9 Logan Gunthorpe 2018-10-04 160
52916982af48d9 Logan Gunthorpe 2018-10-04 161 /**
52916982af48d9 Logan Gunthorpe 2018-10-04 162 * pci_p2pdma_add_resource - add memory for use as p2p memory
52916982af48d9 Logan Gunthorpe 2018-10-04 163 * @pdev: the device to add the memory to
52916982af48d9 Logan Gunthorpe 2018-10-04 164 * @bar: PCI BAR to add
52916982af48d9 Logan Gunthorpe 2018-10-04 165 * @size: size of the memory to add, may be zero to use the whole BAR
52916982af48d9 Logan Gunthorpe 2018-10-04 166 * @offset: offset into the PCI BAR
52916982af48d9 Logan Gunthorpe 2018-10-04 167 *
52916982af48d9 Logan Gunthorpe 2018-10-04 168 * The memory will be given ZONE_DEVICE struct pages so that it may
52916982af48d9 Logan Gunthorpe 2018-10-04 169 * be used with any DMA request.
52916982af48d9 Logan Gunthorpe 2018-10-04 170 */
52916982af48d9 Logan Gunthorpe 2018-10-04 171 int pci_p2pdma_add_resource(struct pci_dev *pdev, int bar, size_t size,
52916982af48d9 Logan Gunthorpe 2018-10-04 172 u64 offset)
52916982af48d9 Logan Gunthorpe 2018-10-04 173 {
a6e6fe6549f609 Logan Gunthorpe 2019-08-12 174 struct pci_p2pdma_pagemap *p2p_pgmap;
52916982af48d9 Logan Gunthorpe 2018-10-04 175 struct dev_pagemap *pgmap;
ae21f835a5bda0 Eric Dumazet 2021-07-01 176 struct pci_p2pdma *p2pdma;
52916982af48d9 Logan Gunthorpe 2018-10-04 177 void *addr;
52916982af48d9 Logan Gunthorpe 2018-10-04 178 int error;
52916982af48d9 Logan Gunthorpe 2018-10-04 179
52916982af48d9 Logan Gunthorpe 2018-10-04 180 if (!(pci_resource_flags(pdev, bar) & IORESOURCE_MEM))
52916982af48d9 Logan Gunthorpe 2018-10-04 181 return -EINVAL;
52916982af48d9 Logan Gunthorpe 2018-10-04 182
52916982af48d9 Logan Gunthorpe 2018-10-04 183 if (offset >= pci_resource_len(pdev, bar))
52916982af48d9 Logan Gunthorpe 2018-10-04 184 return -EINVAL;
52916982af48d9 Logan Gunthorpe 2018-10-04 185
52916982af48d9 Logan Gunthorpe 2018-10-04 186 if (!size)
52916982af48d9 Logan Gunthorpe 2018-10-04 187 size = pci_resource_len(pdev, bar) - offset;
52916982af48d9 Logan Gunthorpe 2018-10-04 188
52916982af48d9 Logan Gunthorpe 2018-10-04 189 if (size + offset > pci_resource_len(pdev, bar))
52916982af48d9 Logan Gunthorpe 2018-10-04 190 return -EINVAL;
52916982af48d9 Logan Gunthorpe 2018-10-04 191
52916982af48d9 Logan Gunthorpe 2018-10-04 192 if (!pdev->p2pdma) {
52916982af48d9 Logan Gunthorpe 2018-10-04 193 error = pci_p2pdma_setup(pdev);
52916982af48d9 Logan Gunthorpe 2018-10-04 194 if (error)
52916982af48d9 Logan Gunthorpe 2018-10-04 195 return error;
52916982af48d9 Logan Gunthorpe 2018-10-04 196 }
52916982af48d9 Logan Gunthorpe 2018-10-04 197
a6e6fe6549f609 Logan Gunthorpe 2019-08-12 198 p2p_pgmap = devm_kzalloc(&pdev->dev, sizeof(*p2p_pgmap), GFP_KERNEL);
a6e6fe6549f609 Logan Gunthorpe 2019-08-12 199 if (!p2p_pgmap)
52916982af48d9 Logan Gunthorpe 2018-10-04 200 return -ENOMEM;
a6e6fe6549f609 Logan Gunthorpe 2019-08-12 201
a6e6fe6549f609 Logan Gunthorpe 2019-08-12 202 pgmap = &p2p_pgmap->pgmap;
a4574f63edc6f7 Dan Williams 2020-10-13 203 pgmap->range.start = pci_resource_start(pdev, bar) + offset;
a4574f63edc6f7 Dan Williams 2020-10-13 204 pgmap->range.end = pgmap->range.start + size - 1;
b7b3c01b191596 Dan Williams 2020-10-13 205 pgmap->nr_range = 1;
52916982af48d9 Logan Gunthorpe 2018-10-04 206 pgmap->type = MEMORY_DEVICE_PCI_P2PDMA;
a6e6fe6549f609 Logan Gunthorpe 2019-08-12 207
0afea3814358c9 Logan Gunthorpe 2019-08-12 208 p2p_pgmap->provider = pdev;
a6e6fe6549f609 Logan Gunthorpe 2019-08-12 209 p2p_pgmap->bus_offset = pci_bus_address(pdev, bar) -
977196b8c5b20b Logan Gunthorpe 2018-10-04 210 pci_resource_start(pdev, bar);
52916982af48d9 Logan Gunthorpe 2018-10-04 211
52916982af48d9 Logan Gunthorpe 2018-10-04 212 addr = devm_memremap_pages(&pdev->dev, pgmap);
52916982af48d9 Logan Gunthorpe 2018-10-04 213 if (IS_ERR(addr)) {
52916982af48d9 Logan Gunthorpe 2018-10-04 214 error = PTR_ERR(addr);
50f44ee7248ad2 Dan Williams 2019-06-13 215 goto pgmap_free;
52916982af48d9 Logan Gunthorpe 2018-10-04 216 }
52916982af48d9 Logan Gunthorpe 2018-10-04 217
ae21f835a5bda0 Eric Dumazet 2021-07-01 218 p2pdma = rcu_dereference_protected(pdev->p2pdma, 1);
ae21f835a5bda0 Eric Dumazet 2021-07-01 219 error = gen_pool_add_owner(p2pdma->pool, (unsigned long)addr,
52916982af48d9 Logan Gunthorpe 2018-10-04 220 pci_bus_address(pdev, bar) + offset,
a4574f63edc6f7 Dan Williams 2020-10-13 221 range_len(&pgmap->range), dev_to_node(&pdev->dev),
d0b3517dbcf3f6 Christoph Hellwig 2019-06-26 @222 pgmap->ref);
52916982af48d9 Logan Gunthorpe 2018-10-04 223 if (error)
e615a191216e3f Dan Williams 2019-06-13 224 goto pages_free;
52916982af48d9 Logan Gunthorpe 2018-10-04 225
a4574f63edc6f7 Dan Williams 2020-10-13 226 pci_info(pdev, "added peer-to-peer DMA memory %#llx-%#llx\n",
a4574f63edc6f7 Dan Williams 2020-10-13 227 pgmap->range.start, pgmap->range.end);
52916982af48d9 Logan Gunthorpe 2018-10-04 228
52916982af48d9 Logan Gunthorpe 2018-10-04 229 return 0;
52916982af48d9 Logan Gunthorpe 2018-10-04 230
e615a191216e3f Dan Williams 2019-06-13 231 pages_free:
e615a191216e3f Dan Williams 2019-06-13 232 devm_memunmap_pages(&pdev->dev, pgmap);
52916982af48d9 Logan Gunthorpe 2018-10-04 233 pgmap_free:
d0b3517dbcf3f6 Christoph Hellwig 2019-06-26 234 devm_kfree(&pdev->dev, pgmap);
52916982af48d9 Logan Gunthorpe 2018-10-04 235 return error;
52916982af48d9 Logan Gunthorpe 2018-10-04 236 }
52916982af48d9 Logan Gunthorpe 2018-10-04 237 EXPORT_SYMBOL_GPL(pci_p2pdma_add_resource);
52916982af48d9 Logan Gunthorpe 2018-10-04 238
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
drivers/bluetooth/btqca.c:493:24: sparse: sparse: restricted __le32 degrades to integer
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: ccfff0a2bd2a30de130b5623d242ddecd0272bc2
commit: 059924fdf6c1c31a7c1aa1915884e23f4313dde2 Bluetooth: btqca: Use NVM files based on SoC ID for WCN3991
date: 11 months ago
config: riscv-randconfig-s031-20211109 (attached as .config)
compiler: riscv64-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 059924fdf6c1c31a7c1aa1915884e23f4313dde2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=riscv SHELL=/bin/bash block/ drivers/bluetooth/ drivers/hid/ drivers/hwmon/ drivers/i2c/busses/ drivers/message/fusion/ drivers/net/ethernet/ drivers/net/wireless/intel/iwlwifi/ drivers/pci/ drivers/remoteproc/ drivers/rtc/ drivers/staging/rts5208/ drivers/staging/vc04_services/ drivers/tty/serial/ drivers/vdpa/ drivers/video/fbdev/ net/qrtr/ net/sched/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/bluetooth/btqca.c:493:24: sparse: sparse: restricted __le32 degrades to integer
vim +493 drivers/bluetooth/btqca.c
440
441 int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
442 enum qca_btsoc_type soc_type, struct qca_btsoc_version ver,
443 const char *firmware_name)
444 {
445 struct qca_fw_config config;
446 int err;
447 u8 rom_ver = 0;
448 u32 soc_ver;
449
450 bt_dev_dbg(hdev, "QCA setup on UART");
451
452 soc_ver = get_soc_ver(ver.soc_id, ver.rom_ver);
453
454 bt_dev_info(hdev, "QCA controller version 0x%08x", soc_ver);
455
456 config.user_baud_rate = baudrate;
457
458 /* Download rampatch file */
459 config.type = TLV_TYPE_PATCH;
460 if (qca_is_wcn399x(soc_type)) {
461 /* Firmware files to download are based on ROM version.
462 * ROM version is derived from last two bytes of soc_ver.
463 */
464 rom_ver = ((soc_ver & 0x00000f00) >> 0x04) |
465 (soc_ver & 0x0000000f);
466 snprintf(config.fwname, sizeof(config.fwname),
467 "qca/crbtfw%02x.tlv", rom_ver);
468 } else if (soc_type == QCA_QCA6390) {
469 rom_ver = ((soc_ver & 0x00000f00) >> 0x04) |
470 (soc_ver & 0x0000000f);
471 snprintf(config.fwname, sizeof(config.fwname),
472 "qca/htbtfw%02x.tlv", rom_ver);
473 } else {
474 snprintf(config.fwname, sizeof(config.fwname),
475 "qca/rampatch_%08x.bin", soc_ver);
476 }
477
478 err = qca_download_firmware(hdev, &config, soc_type);
479 if (err < 0) {
480 bt_dev_err(hdev, "QCA Failed to download patch (%d)", err);
481 return err;
482 }
483
484 /* Give the controller some time to get ready to receive the NVM */
485 msleep(10);
486
487 /* Download NVM configuration */
488 config.type = TLV_TYPE_NVM;
489 if (firmware_name)
490 snprintf(config.fwname, sizeof(config.fwname),
491 "qca/%s", firmware_name);
492 else if (qca_is_wcn399x(soc_type)) {
> 493 if (ver.soc_id == QCA_WCN3991_SOC_ID) {
494 snprintf(config.fwname, sizeof(config.fwname),
495 "qca/crnv%02xu.bin", rom_ver);
496 } else {
497 snprintf(config.fwname, sizeof(config.fwname),
498 "qca/crnv%02x.bin", rom_ver);
499 }
500 }
501 else if (soc_type == QCA_QCA6390)
502 snprintf(config.fwname, sizeof(config.fwname),
503 "qca/htnv%02x.bin", rom_ver);
504 else
505 snprintf(config.fwname, sizeof(config.fwname),
506 "qca/nvm_%08x.bin", soc_ver);
507
508 err = qca_download_firmware(hdev, &config, soc_type);
509 if (err < 0) {
510 bt_dev_err(hdev, "QCA Failed to download NVM (%d)", err);
511 return err;
512 }
513
514 if (soc_type >= QCA_WCN3991) {
515 err = qca_disable_soc_logging(hdev);
516 if (err < 0)
517 return err;
518 }
519
520 /* Perform HCI reset */
521 err = qca_send_reset(hdev);
522 if (err < 0) {
523 bt_dev_err(hdev, "QCA Failed to run HCI_RESET (%d)", err);
524 return err;
525 }
526
527 bt_dev_info(hdev, "QCA setup on UART is completed");
528
529 return 0;
530 }
531 EXPORT_SYMBOL_GPL(qca_uart_setup);
532
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
ERROR: modpost: "ioremap" [drivers/pcmcia/pcmcia.ko] undefined!
by kernel test robot
Hi Alexander,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: ccfff0a2bd2a30de130b5623d242ddecd0272bc2
commit: ef019c5daf032dce0b95ed4d45bfec93c4fbcb9f PHY: Ingenic: fix unconditional build of phy-ingenic-usb
date: 11 months ago
config: s390-randconfig-r011-20211114 (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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout ef019c5daf032dce0b95ed4d45bfec93c4fbcb9f
# 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(a)intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
ERROR: modpost: "devm_ioremap" [drivers/input/keyboard/samsung-keypad.ko] undefined!
>> ERROR: modpost: "ioremap" [drivers/pcmcia/pcmcia.ko] undefined!
>> ERROR: modpost: "iounmap" [drivers/pcmcia/pcmcia.ko] undefined!
ERROR: modpost: "iounmap" [drivers/net/arcnet/com90xx.ko] undefined!
ERROR: modpost: "ioremap" [drivers/net/arcnet/com90xx.ko] undefined!
>> ERROR: modpost: "devm_ioremap" [drivers/net/ethernet/altera/altera_tse.ko] undefined!
>> ERROR: modpost: "ioremap" [drivers/net/ethernet/8390/pcnet_cs.ko] undefined!
>> ERROR: modpost: "iounmap" [drivers/net/ethernet/8390/pcnet_cs.ko] undefined!
ERROR: modpost: "ioremap" [drivers/tty/ipwireless/ipwireless.ko] undefined!
ERROR: modpost: "iounmap" [drivers/tty/ipwireless/ipwireless.ko] undefined!
ERROR: modpost: "devm_ioremap_resource" [drivers/dma/idma64.ko] undefined!
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week