[frank-w-bpi-r2-4.14:5.15-rtl8367dsa 31/43] drivers/net/phy/rtk/rtl8367s_mdio.c:45:14: error: no previous prototype for function 'mii_mgr_read'
by kernel test robot
tree: https://github.com/frank-w/BPI-R2-4.14 5.15-rtl8367dsa
head: c795ca3e9bf72973b4819834fac0728a9108f600
commit: 54251835782f2792cb404b5c12dd412deb72dd7c [31/43] net: phy: add rtl8367 switch phy driver for r64 v0.1
config: riscv-randconfig-r034-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
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/frank-w/BPI-R2-4.14/commit/54251835782f2792cb404b5c12d...
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 54251835782f2792cb404b5c12dd412deb72dd7c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=riscv
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/net/phy/rtk/rtl8367s_mdio.c:45:14: error: no previous prototype for function 'mii_mgr_read' [-Werror,-Wmissing-prototypes]
unsigned int mii_mgr_read(unsigned int phy_addr,unsigned int phy_register,unsigned int *read_data)
^
drivers/net/phy/rtk/rtl8367s_mdio.c:45: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/phy/rtk/rtl8367s_mdio.c:58:14: error: no previous prototype for function 'mii_mgr_write' [-Werror,-Wmissing-prototypes]
unsigned int mii_mgr_write(unsigned int phy_addr,unsigned int phy_register,unsigned int write_data)
^
drivers/net/phy/rtk/rtl8367s_mdio.c:58: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/phy/rtk/rtl8367s_mdio.c:213:6: error: no previous prototype for function 'init_gsw' [-Werror,-Wmissing-prototypes]
void init_gsw(void)
^
drivers/net/phy/rtk/rtl8367s_mdio.c:213:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void init_gsw(void)
^
static
3 errors generated.
--
>> drivers/net/phy/rtk/rtl8367s_dbg.c:169:5: error: no previous prototype for function 'gsw_debug_proc_init' [-Werror,-Wmissing-prototypes]
int gsw_debug_proc_init(void)
^
drivers/net/phy/rtk/rtl8367s_dbg.c:169:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int gsw_debug_proc_init(void)
^
static
>> drivers/net/phy/rtk/rtl8367s_dbg.c:190:6: error: no previous prototype for function 'gsw_debug_proc_exit' [-Werror,-Wmissing-prototypes]
void gsw_debug_proc_exit(void)
^
drivers/net/phy/rtk/rtl8367s_dbg.c:190:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void gsw_debug_proc_exit(void)
^
static
2 errors generated.
--
>> drivers/net/phy/rtk/rtl8367c/l2.c:2248:9: error: variable 'pmask' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized]
default:
^~~~~~~
drivers/net/phy/rtk/rtl8367c/l2.c:2253:47: note: uninitialized use occurs here
if ((retVal = rtk_switch_portmask_P2L_get(pmask, pFlood_portmask))!=RT_ERR_OK)
^~~~~
drivers/net/phy/rtk/rtl8367c/l2.c:2223:21: note: initialize the variable 'pmask' to silence this warning
rtk_uint32 pmask;
^
= 0
1 error generated.
--
>> drivers/net/phy/rtk/rtl8367c/rtk_switch.c:43:6: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if (AUTO_PROBE || defined(FORCE_PROBE_RTL8367C))
^
drivers/net/phy/rtk/rtl8367c/rtk_switch.c:41:22: note: expanded from macro 'AUTO_PROBE'
#define AUTO_PROBE (!defined(FORCE_PROBE_RTL8367C) && !defined(FORCE_PROBE_RTL8370B) && !defined(FORCE_PROBE_RTL8364B) && !defined(FORCE_PROBE_RTL8363SC_VB))
^
>> drivers/net/phy/rtk/rtl8367c/rtk_switch.c:43:6: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
drivers/net/phy/rtk/rtl8367c/rtk_switch.c:41:56: note: expanded from macro 'AUTO_PROBE'
#define AUTO_PROBE (!defined(FORCE_PROBE_RTL8367C) && !defined(FORCE_PROBE_RTL8370B) && !defined(FORCE_PROBE_RTL8364B) && !defined(FORCE_PROBE_RTL8363SC_VB))
^
>> drivers/net/phy/rtk/rtl8367c/rtk_switch.c:43:6: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
drivers/net/phy/rtk/rtl8367c/rtk_switch.c:41:90: note: expanded from macro 'AUTO_PROBE'
#define AUTO_PROBE (!defined(FORCE_PROBE_RTL8367C) && !defined(FORCE_PROBE_RTL8370B) && !defined(FORCE_PROBE_RTL8364B) && !defined(FORCE_PROBE_RTL8363SC_VB))
^
>> drivers/net/phy/rtk/rtl8367c/rtk_switch.c:43:6: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
drivers/net/phy/rtk/rtl8367c/rtk_switch.c:41:124: note: expanded from macro 'AUTO_PROBE'
#define AUTO_PROBE (!defined(FORCE_PROBE_RTL8367C) && !defined(FORCE_PROBE_RTL8370B) && !defined(FORCE_PROBE_RTL8364B) && !defined(FORCE_PROBE_RTL8363SC_VB))
^
drivers/net/phy/rtk/rtl8367c/rtk_switch.c:112:6: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if (AUTO_PROBE || defined(FORCE_PROBE_RTL8370B))
^
drivers/net/phy/rtk/rtl8367c/rtk_switch.c:41:22: note: expanded from macro 'AUTO_PROBE'
#define AUTO_PROBE (!defined(FORCE_PROBE_RTL8367C) && !defined(FORCE_PROBE_RTL8370B) && !defined(FORCE_PROBE_RTL8364B) && !defined(FORCE_PROBE_RTL8363SC_VB))
^
drivers/net/phy/rtk/rtl8367c/rtk_switch.c:112:6: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
drivers/net/phy/rtk/rtl8367c/rtk_switch.c:41:56: note: expanded from macro 'AUTO_PROBE'
#define AUTO_PROBE (!defined(FORCE_PROBE_RTL8367C) && !defined(FORCE_PROBE_RTL8370B) && !defined(FORCE_PROBE_RTL8364B) && !defined(FORCE_PROBE_RTL8363SC_VB))
^
drivers/net/phy/rtk/rtl8367c/rtk_switch.c:112:6: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
drivers/net/phy/rtk/rtl8367c/rtk_switch.c:41:90: note: expanded from macro 'AUTO_PROBE'
#define AUTO_PROBE (!defined(FORCE_PROBE_RTL8367C) && !defined(FORCE_PROBE_RTL8370B) && !defined(FORCE_PROBE_RTL8364B) && !defined(FORCE_PROBE_RTL8363SC_VB))
^
drivers/net/phy/rtk/rtl8367c/rtk_switch.c:112:6: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
drivers/net/phy/rtk/rtl8367c/rtk_switch.c:41:124: note: expanded from macro 'AUTO_PROBE'
#define AUTO_PROBE (!defined(FORCE_PROBE_RTL8367C) && !defined(FORCE_PROBE_RTL8370B) && !defined(FORCE_PROBE_RTL8364B) && !defined(FORCE_PROBE_RTL8363SC_VB))
^
drivers/net/phy/rtk/rtl8367c/rtk_switch.c:181:6: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if (AUTO_PROBE || defined(FORCE_PROBE_RTL8364B))
^
drivers/net/phy/rtk/rtl8367c/rtk_switch.c:41:22: note: expanded from macro 'AUTO_PROBE'
#define AUTO_PROBE (!defined(FORCE_PROBE_RTL8367C) && !defined(FORCE_PROBE_RTL8370B) && !defined(FORCE_PROBE_RTL8364B) && !defined(FORCE_PROBE_RTL8363SC_VB))
^
drivers/net/phy/rtk/rtl8367c/rtk_switch.c:181:6: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
drivers/net/phy/rtk/rtl8367c/rtk_switch.c:41:56: note: expanded from macro 'AUTO_PROBE'
#define AUTO_PROBE (!defined(FORCE_PROBE_RTL8367C) && !defined(FORCE_PROBE_RTL8370B) && !defined(FORCE_PROBE_RTL8364B) && !defined(FORCE_PROBE_RTL8363SC_VB))
^
drivers/net/phy/rtk/rtl8367c/rtk_switch.c:181:6: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
drivers/net/phy/rtk/rtl8367c/rtk_switch.c:41:90: note: expanded from macro 'AUTO_PROBE'
#define AUTO_PROBE (!defined(FORCE_PROBE_RTL8367C) && !defined(FORCE_PROBE_RTL8370B) && !defined(FORCE_PROBE_RTL8364B) && !defined(FORCE_PROBE_RTL8363SC_VB))
^
drivers/net/phy/rtk/rtl8367c/rtk_switch.c:181:6: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
drivers/net/phy/rtk/rtl8367c/rtk_switch.c:41:124: note: expanded from macro 'AUTO_PROBE'
#define AUTO_PROBE (!defined(FORCE_PROBE_RTL8367C) && !defined(FORCE_PROBE_RTL8370B) && !defined(FORCE_PROBE_RTL8364B) && !defined(FORCE_PROBE_RTL8363SC_VB))
^
drivers/net/phy/rtk/rtl8367c/rtk_switch.c:250:6: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if (AUTO_PROBE || defined(FORCE_PROBE_RTL8363SC_VB))
^
drivers/net/phy/rtk/rtl8367c/rtk_switch.c:41:22: note: expanded from macro 'AUTO_PROBE'
#define AUTO_PROBE (!defined(FORCE_PROBE_RTL8367C) && !defined(FORCE_PROBE_RTL8370B) && !defined(FORCE_PROBE_RTL8364B) && !defined(FORCE_PROBE_RTL8363SC_VB))
^
drivers/net/phy/rtk/rtl8367c/rtk_switch.c:250:6: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
drivers/net/phy/rtk/rtl8367c/rtk_switch.c:41:56: note: expanded from macro 'AUTO_PROBE'
#define AUTO_PROBE (!defined(FORCE_PROBE_RTL8367C) && !defined(FORCE_PROBE_RTL8370B) && !defined(FORCE_PROBE_RTL8364B) && !defined(FORCE_PROBE_RTL8363SC_VB))
^
drivers/net/phy/rtk/rtl8367c/rtk_switch.c:250:6: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
drivers/net/phy/rtk/rtl8367c/rtk_switch.c:41:90: note: expanded from macro 'AUTO_PROBE'
#define AUTO_PROBE (!defined(FORCE_PROBE_RTL8367C) && !defined(FORCE_PROBE_RTL8370B) && !defined(FORCE_PROBE_RTL8364B) && !defined(FORCE_PROBE_RTL8363SC_VB))
^
drivers/net/phy/rtk/rtl8367c/rtk_switch.c:250:6: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
drivers/net/phy/rtk/rtl8367c/rtk_switch.c:41:124: note: expanded from macro 'AUTO_PROBE'
#define AUTO_PROBE (!defined(FORCE_PROBE_RTL8367C) && !defined(FORCE_PROBE_RTL8370B) && !defined(FORCE_PROBE_RTL8364B) && !defined(FORCE_PROBE_RTL8363SC_VB))
^
16 errors generated.
--
>> drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_eav.c:717:14: error: variable 'sec_h' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
}else if(port == 9){
^~~~~~~~~
drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_eav.c:730:26: note: uninitialized use occurs here
timeStamp->second = (sec_h<<16) | sec_l;
^~~~~
drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_eav.c:717:11: note: remove the 'if' if its condition is always true
}else if(port == 9){
^~~~~~~~~~~~~
drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_eav.c:654:21: note: initialize the variable 'sec_h' to silence this warning
rtk_uint32 sec_h, sec_l, nsec8_h, nsec8_l;
^
= 0
>> drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_eav.c:717:14: error: variable 'sec_l' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
}else if(port == 9){
^~~~~~~~~
drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_eav.c:730:39: note: uninitialized use occurs here
timeStamp->second = (sec_h<<16) | sec_l;
^~~~~
drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_eav.c:717:11: note: remove the 'if' if its condition is always true
}else if(port == 9){
^~~~~~~~~~~~~
drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_eav.c:654:28: note: initialize the variable 'sec_l' to silence this warning
rtk_uint32 sec_h, sec_l, nsec8_h, nsec8_l;
^
= 0
>> drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_eav.c:717:14: error: variable 'nsec8_h' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
}else if(port == 9){
^~~~~~~~~
drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_eav.c:731:22: note: uninitialized use occurs here
nano_second_8 = (nsec8_h<<16) | nsec8_l;
^~~~~~~
drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_eav.c:717:11: note: remove the 'if' if its condition is always true
}else if(port == 9){
^~~~~~~~~~~~~
drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_eav.c:654:37: note: initialize the variable 'nsec8_h' to silence this warning
rtk_uint32 sec_h, sec_l, nsec8_h, nsec8_l;
^
= 0
>> drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_eav.c:717:14: error: variable 'nsec8_l' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
}else if(port == 9){
^~~~~~~~~
drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_eav.c:731:37: note: uninitialized use occurs here
nano_second_8 = (nsec8_h<<16) | nsec8_l;
^~~~~~~
drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_eav.c:717:11: note: remove the 'if' if its condition is always true
}else if(port == 9){
^~~~~~~~~~~~~
drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_eav.c:654:46: note: initialize the variable 'nsec8_l' to silence this warning
rtk_uint32 sec_h, sec_l, nsec8_h, nsec8_l;
^
= 0
4 errors generated.
--
>> drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_port.c:4823:18: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality]
if( (regData == 0x6367) )
~~~~~~~~^~~~~~~~~
drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_port.c:4823:18: note: remove extraneous parentheses around the comparison to silence this warning
if( (regData == 0x6367) )
~ ^ ~
drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_port.c:4823:18: note: use '=' to turn this equality comparison into an assignment
if( (regData == 0x6367) )
^~
=
1 error generated.
--
>> drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_svlan.c:500:13: error: variable 'regAddr' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
else if(index == 63)
^~~~~~~~~~~
drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_svlan.c:503:34: note: uninitialized use occurs here
retVal = rtl8367c_setAsicReg(regAddr, regData);
^~~~~~~
drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_svlan.c:500:10: note: remove the 'if' if its condition is always true
else if(index == 63)
^~~~~~~~~~~~~~~
drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_svlan.c:474:23: note: initialize the variable 'regAddr' to silence this warning
rtk_uint32 regAddr, regData;
^
= 0
drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_svlan.c:554:13: error: variable 'regAddr' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
else if(index == 63)
^~~~~~~~~~~
drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_svlan.c:557:34: note: uninitialized use occurs here
retVal = rtl8367c_getAsicReg(regAddr, ®Data);
^~~~~~~
drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_svlan.c:554:10: note: remove the 'if' if its condition is always true
else if(index == 63)
^~~~~~~~~~~~~~~
drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_svlan.c:529:23: note: initialize the variable 'regAddr' to silence this warning
rtk_uint32 regAddr,regData;
^
= 0
2 errors generated.
--
>> drivers/net/phy/rtk/rtl8367c/stat.c:143:50: error: implicit conversion from enumeration type 'rtk_stat_global_type_t' (aka 'enum rtk_stat_global_type_e') to different enumeration type 'RTL8367C_MIBCOUNTER' (aka 'enum RTL8367C_MIBCOUNTER_E') [-Werror,-Wenum-conversion]
if ((retVal = rtl8367c_getAsicMIBsCounter(0, cntr_idx, pCntr)) != RT_ERR_OK)
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~
>> drivers/net/phy/rtk/rtl8367c/stat.c:175:49: error: implicit conversion from enumeration type 'enum rtk_stat_global_type_e' to different enumeration type 'RTL8367C_MIBCOUNTER' (aka 'enum RTL8367C_MIBCOUNTER_E') [-Werror,-Wenum-conversion]
if ((retVal = rtl8367c_getAsicMIBsCounter(0,DOT1D_TP_LEARNED_ENTRY_DISCARDS_INDEX, &pGlobal_cntrs->dot1dTpLearnedEntryDiscards)) != RT_ERR_OK)
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
--
>> drivers/net/phy/rtk/rtl8367c/vlan.c:953:22: error: implicit conversion from enumeration type 'rtk_vlan_protoVlan_frameType_t' (aka 'enum rtk_vlan_protoVlan_frameType_e') to different enumeration type 'rtl8367c_provlan_frametype' [-Werror,-Wenum-conversion]
tmp = pInfo->frame_type;
~ ~~~~~~~^~~~~~~~~~
drivers/net/phy/rtk/rtl8367c/vlan.c:979:41: error: implicit conversion from enumeration type 'rtk_vlan_protoVlan_frameType_t' (aka 'enum rtk_vlan_protoVlan_frameType_e') to different enumeration type 'rtl8367c_provlan_frametype' [-Werror,-Wenum-conversion]
ppb_data_cfg.frameType = pInfo->frame_type;
~ ~~~~~~~^~~~~~~~~~
>> drivers/net/phy/rtk/rtl8367c/vlan.c:1270:84: error: implicit conversion from enumeration type 'rtk_vlan_tagMode_t' (aka 'enum rtk_vlan_tagMode_e') to different enumeration type 'rtl8367c_egtagmode' [-Werror,-Wenum-conversion]
if ((retVal = rtl8367c_setAsicVlanEgressTagMode(rtk_switch_port_L2P_get(port), tag_mode)) != RT_ERR_OK)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~
3 errors generated.
vim +/mii_mgr_read +45 drivers/net/phy/rtk/rtl8367s_mdio.c
43
44 /*mii_mgr_read/mii_mgr_write is the callback API for rtl8367 driver*/
> 45 unsigned int mii_mgr_read(unsigned int phy_addr,unsigned int phy_register,unsigned int *read_data)
46 {
47 struct mii_bus *bus = _gsw->bus;
48
49 mutex_lock_nested(&bus->mdio_lock, MDIO_MUTEX_NESTED);
50
51 *read_data = bus->read(bus, phy_addr, phy_register);
52
53 mutex_unlock(&bus->mdio_lock);
54
55 return 0;
56 }
57
> 58 unsigned int mii_mgr_write(unsigned int phy_addr,unsigned int phy_register,unsigned int write_data)
59 {
60 struct mii_bus *bus = _gsw->bus;
61
62 mutex_lock_nested(&bus->mdio_lock, MDIO_MUTEX_NESTED);
63
64 bus->write(bus, phy_addr, phy_register, write_data);
65
66 mutex_unlock(&bus->mdio_lock);
67
68 return 0;
69 }
70
71 static int rtl8367s_hw_reset(void)
72 {
73 struct rtk_gsw *gsw = _gsw;
74 int ret;
75
76 ret = devm_gpio_request(gsw->dev, gsw->reset_pin, "mediatek,reset-pin");
77
78 if (ret)
79 printk("fail to devm_gpio_request\n");
80
81 gpio_direction_output(gsw->reset_pin, 0);
82
83 usleep_range(1000, 1100);
84
85 gpio_set_value(gsw->reset_pin, 1);
86
87 mdelay(500);
88
89 devm_gpio_free(gsw->dev, gsw->reset_pin);
90
91 return 0;
92
93 }
94
95 static int rtl8367s_vlan_config(int want_at_p0)
96 {
97 rtk_vlan_cfg_t vlan1, vlan2;
98
99 /* Set LAN/WAN VLAN partition */
100 memset(&vlan1, 0x00, sizeof(rtk_vlan_cfg_t));
101
102 RTK_PORTMASK_PORT_SET(vlan1.mbr, EXT_PORT0);
103 RTK_PORTMASK_PORT_SET(vlan1.mbr, UTP_PORT1);
104 RTK_PORTMASK_PORT_SET(vlan1.mbr, UTP_PORT2);
105 RTK_PORTMASK_PORT_SET(vlan1.mbr, UTP_PORT3);
106 RTK_PORTMASK_PORT_SET(vlan1.untag, EXT_PORT0);
107 RTK_PORTMASK_PORT_SET(vlan1.untag, UTP_PORT1);
108 RTK_PORTMASK_PORT_SET(vlan1.untag, UTP_PORT2);
109 RTK_PORTMASK_PORT_SET(vlan1.untag, UTP_PORT3);
110
111 if (want_at_p0) {
112 RTK_PORTMASK_PORT_SET(vlan1.mbr, UTP_PORT4);
113 RTK_PORTMASK_PORT_SET(vlan1.untag, UTP_PORT4);
114 } else {
115 RTK_PORTMASK_PORT_SET(vlan1.mbr, UTP_PORT0);
116 RTK_PORTMASK_PORT_SET(vlan1.untag, UTP_PORT0);
117 }
118
119 vlan1.ivl_en = 1;
120
121 rtk_vlan_set(1, &vlan1);
122
123 memset(&vlan2, 0x00, sizeof(rtk_vlan_cfg_t));
124
125 RTK_PORTMASK_PORT_SET(vlan2.mbr, EXT_PORT1);
126 RTK_PORTMASK_PORT_SET(vlan2.untag, EXT_PORT1);
127
128 if (want_at_p0) {
129 RTK_PORTMASK_PORT_SET(vlan2.mbr, UTP_PORT0);
130 RTK_PORTMASK_PORT_SET(vlan2.untag, UTP_PORT0);
131 } else {
132 RTK_PORTMASK_PORT_SET(vlan2.mbr, UTP_PORT4);
133 RTK_PORTMASK_PORT_SET(vlan2.untag, UTP_PORT4);
134 }
135
136 vlan2.ivl_en = 1;
137 rtk_vlan_set(2, &vlan2);
138
139 rtk_vlan_portPvid_set(EXT_PORT0, 1, 0);
140 rtk_vlan_portPvid_set(UTP_PORT1, 1, 0);
141 rtk_vlan_portPvid_set(UTP_PORT2, 1, 0);
142 rtk_vlan_portPvid_set(UTP_PORT3, 1, 0);
143 rtk_vlan_portPvid_set(EXT_PORT1, 2, 0);
144
145 if (want_at_p0) {
146 rtk_vlan_portPvid_set(UTP_PORT0, 2, 0);
147 rtk_vlan_portPvid_set(UTP_PORT4, 1, 0);
148 } else {
149 rtk_vlan_portPvid_set(UTP_PORT0, 1, 0);
150 rtk_vlan_portPvid_set(UTP_PORT4, 2, 0);
151 }
152
153 return 0;
154 }
155
156 static int rtl8367s_hw_init(void)
157 {
158
159 rtl8367s_hw_reset();
160
161 if(rtk_switch_init())
162 return -1;
163
164 mdelay(500);
165
166 if (rtk_vlan_reset())
167 return -1;
168
169 if (rtk_vlan_init())
170 return -1;
171
172 return 0;
173 }
174
175 static void set_rtl8367s_sgmii(void)
176 {
177 rtk_port_mac_ability_t mac_cfg;
178 rtk_mode_ext_t mode;
179
180 mode = MODE_EXT_HSGMII;
181 mac_cfg.forcemode = MAC_FORCE;
182 mac_cfg.speed = PORT_SPEED_2500M;
183 mac_cfg.duplex = PORT_FULL_DUPLEX;
184 mac_cfg.link = PORT_LINKUP;
185 mac_cfg.nway = DISABLED;
186 mac_cfg.txpause = ENABLED;
187 mac_cfg.rxpause = ENABLED;
188 rtk_port_macForceLinkExt_set(EXT_PORT0, mode, &mac_cfg);
189 rtk_port_sgmiiNway_set(EXT_PORT0, DISABLED);
190 rtk_port_phyEnableAll_set(ENABLED);
191
192 }
193
194 static void set_rtl8367s_rgmii(void)
195 {
196 rtk_port_mac_ability_t mac_cfg;
197 rtk_mode_ext_t mode;
198
199 mode = MODE_EXT_RGMII;
200 mac_cfg.forcemode = MAC_FORCE;
201 mac_cfg.speed = PORT_SPEED_1000M;
202 mac_cfg.duplex = PORT_FULL_DUPLEX;
203 mac_cfg.link = PORT_LINKUP;
204 mac_cfg.nway = DISABLED;
205 mac_cfg.txpause = ENABLED;
206 mac_cfg.rxpause = ENABLED;
207 rtk_port_macForceLinkExt_set(EXT_PORT1, mode, &mac_cfg);
208 rtk_port_rgmiiDelayExt_set(EXT_PORT1, 1, 3);
209 rtk_port_phyEnableAll_set(ENABLED);
210
211 }
212
> 213 void init_gsw(void)
214 {
215 rtl8367s_hw_init();
216 set_rtl8367s_sgmii();
217 set_rtl8367s_rgmii();
218 }
219
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
【Amazon】アカウント情報を確認してください
by Amazon.co.jp
Amazon お客様
平素は、Amazonをご利用いただき、誠にありがとうございます。
このたび、ご本人様のご利用かどうかを確認させていただきたいお取引がありましたので、誠に勝手ながら、Amazonのご利用を一部制限させていただき、ご連絡させていただきました。
つきましては、以下へアクセスの上、Amazonのご利用確認にご協力をお願い致します。
ご回答をいただけない場合、Amazonのご利用制限が継続されることもございますので、予めご了承ください。
ご不便とご心配をおかけしまして誠に申し訳ございませんが、何卒ご理解いただきたくお願い申し上げます。
お客様の Amazon アカウント
アカウント所有権の証明をご自身で行う場合は、Amazon 管理コンソールにログインし、所定の手順でお手続きください。アカウント所有権の証明についてのヘルプセンター記事も併せてご参照ください。
状態:
異常は更新待ちです
Amazonクリック&ログイン
Amazonのまたのご利用をお待ちしております。
© 1996-2021, Amazon. Inc. or its affiliates
10 months, 1 week
[chrome-os:chromeos-5.10 1/1] drivers/gpu/drm/evdi/evdi_painter.c:686:12: sparse: sparse: symbol 'dpms_str' was not declared. Should it be static?
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.10
head: ae25dd46c5c2fecb4868af3a91418dea519deac9
commit: ae25dd46c5c2fecb4868af3a91418dea519deac9 [1/1] CHROMIUM: Import latest evdi driver
config: i386-randconfig-s002-20211113 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-5.10
git checkout ae25dd46c5c2fecb4868af3a91418dea519deac9
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash drivers/gpu/drm/evdi/
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/gpu/drm/evdi/evdi_painter.c:686:12: sparse: sparse: symbol 'dpms_str' was not declared. Should it be static?
drivers/gpu/drm/evdi/evdi_painter.c:965:49: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *edid_data @@ got unsigned char const *[noderef] edid @@
drivers/gpu/drm/evdi/evdi_painter.c:965:49: sparse: expected void const [noderef] __user *edid_data
drivers/gpu/drm/evdi/evdi_painter.c:965:49: sparse: got unsigned char const *[noderef] edid
drivers/gpu/drm/evdi/evdi_painter.c:1333:54: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got unsigned char const *[noderef] buffer @@
drivers/gpu/drm/evdi/evdi_painter.c:1333:54: sparse: expected void const [noderef] __user *from
drivers/gpu/drm/evdi/evdi_painter.c:1333:54: sparse: got unsigned char const *[noderef] buffer
drivers/gpu/drm/evdi/evdi_painter.c:965:46: sparse: sparse: dereference of noderef expression
drivers/gpu/drm/evdi/evdi_painter.c:1333:51: sparse: sparse: dereference of noderef expression
drivers/gpu/drm/evdi/evdi_painter.c:1333:51: sparse: sparse: dereference of noderef expression
Please review and possibly fold the followup patch.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
drivers/video/fbdev/i740fb.c:743:20: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 66f4beaa6c1d28161f534471484b2daa2de1dce0
commit: 9294523e3768030ae8afb84110bcecc66425a647 module: add printk formats to add module build ID to stacktraces
date: 4 months ago
config: csky-allyesconfig (attached as .config)
compiler: csky-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 9294523e3768030ae8afb84110bcecc66425a647
# 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__' ARCH=csky
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/video/fbdev/i740fb.c:743:20: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *dest @@ got char [noderef] __iomem *screen_base @@
drivers/video/fbdev/i740fb.c:743:20: sparse: expected void *dest
drivers/video/fbdev/i740fb.c:743:20: sparse: got char [noderef] __iomem *screen_base
drivers/video/fbdev/i740fb.c: note: in included file (through arch/csky/include/asm/io.h, include/linux/io.h, include/linux/irq.h, ...):
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
--
>> drivers/video/fbdev/cirrusfb.c:1852:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *to @@ got char [noderef] __iomem *screen_base @@
drivers/video/fbdev/cirrusfb.c:1852:28: sparse: expected void *to
drivers/video/fbdev/cirrusfb.c:1852:28: sparse: got char [noderef] __iomem *screen_base
drivers/video/fbdev/cirrusfb.c: note: in included file (through arch/csky/include/asm/io.h, include/linux/io.h, include/linux/irq.h, ...):
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] value
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
--
>> net/sched/act_bpf.c:130:35: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const *from @@ got unsigned char [noderef] __rcu * @@
net/sched/act_bpf.c:130:35: sparse: expected void const *from
net/sched/act_bpf.c:130:35: sparse: got unsigned char [noderef] __rcu *
net/sched/act_bpf.c:123:50: sparse: sparse: dereference of noderef expression
net/sched/act_bpf.c:123:50: sparse: sparse: dereference of noderef expression
vim +743 drivers/video/fbdev/i740fb.c
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 732
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 733 static int i740fb_set_par(struct fb_info *info)
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 734 {
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 735 struct i740fb_par *par = info->par;
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 736 u32 itemp;
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 737 int i;
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 738
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 739 i = i740fb_decode_var(&info->var, par, info);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 740 if (i)
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 741 return i;
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 742
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 @743 memset(info->screen_base, 0, info->screen_size);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 744
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 745 vga_protect(par);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 746
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 747 i740outreg(par, XRX, DRAM_EXT_CNTL, DRAM_REFRESH_DISABLE);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 748
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 749 mdelay(1);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 750
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 751 i740outreg(par, XRX, VCLK2_VCO_M, par->video_clk2_m);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 752 i740outreg(par, XRX, VCLK2_VCO_N, par->video_clk2_n);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 753 i740outreg(par, XRX, VCLK2_VCO_MN_MSBS, par->video_clk2_mn_msbs);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 754 i740outreg(par, XRX, VCLK2_VCO_DIV_SEL, par->video_clk2_div_sel);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 755
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 756 i740outreg_mask(par, XRX, PIXPIPE_CONFIG_0,
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 757 par->pixelpipe_cfg0 & DAC_8_BIT, 0x80);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 758
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 759 i740inb(par, 0x3DA);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 760 i740outb(par, 0x3C0, 0x00);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 761
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 762 /* update misc output register */
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 763 i740outb(par, VGA_MIS_W, par->misc | 0x01);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 764
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 765 /* synchronous reset on */
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 766 i740outreg(par, VGA_SEQ_I, VGA_SEQ_RESET, 0x01);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 767 /* write sequencer registers */
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 768 i740outreg(par, VGA_SEQ_I, VGA_SEQ_CLOCK_MODE,
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 769 par->seq[VGA_SEQ_CLOCK_MODE] | 0x20);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 770 for (i = 2; i < VGA_SEQ_C; i++)
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 771 i740outreg(par, VGA_SEQ_I, i, par->seq[i]);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 772
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 773 /* synchronous reset off */
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 774 i740outreg(par, VGA_SEQ_I, VGA_SEQ_RESET, 0x03);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 775
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 776 /* deprotect CRT registers 0-7 */
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 777 i740outreg(par, VGA_CRT_IC, VGA_CRTC_V_SYNC_END,
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 778 par->crtc[VGA_CRTC_V_SYNC_END]);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 779
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 780 /* write CRT registers */
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 781 for (i = 0; i < VGA_CRT_C; i++)
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 782 i740outreg(par, VGA_CRT_IC, i, par->crtc[i]);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 783
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 784 /* write graphics controller registers */
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 785 for (i = 0; i < VGA_GFX_C; i++)
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 786 i740outreg(par, VGA_GFX_I, i, par->gdc[i]);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 787
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 788 /* write attribute controller registers */
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 789 for (i = 0; i < VGA_ATT_C; i++) {
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 790 i740inb(par, VGA_IS1_RC); /* reset flip-flop */
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 791 i740outb(par, VGA_ATT_IW, i);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 792 i740outb(par, VGA_ATT_IW, par->atc[i]);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 793 }
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 794
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 795 i740inb(par, VGA_IS1_RC);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 796 i740outb(par, VGA_ATT_IW, 0x20);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 797
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 798 i740outreg(par, VGA_CRT_IC, EXT_VERT_TOTAL, par->ext_vert_total);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 799 i740outreg(par, VGA_CRT_IC, EXT_VERT_DISPLAY, par->ext_vert_disp_end);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 800 i740outreg(par, VGA_CRT_IC, EXT_VERT_SYNC_START,
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 801 par->ext_vert_sync_start);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 802 i740outreg(par, VGA_CRT_IC, EXT_VERT_BLANK_START,
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 803 par->ext_vert_blank_start);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 804 i740outreg(par, VGA_CRT_IC, EXT_HORIZ_TOTAL, par->ext_horiz_total);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 805 i740outreg(par, VGA_CRT_IC, EXT_HORIZ_BLANK, par->ext_horiz_blank);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 806 i740outreg(par, VGA_CRT_IC, EXT_OFFSET, par->ext_offset);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 807 i740outreg(par, VGA_CRT_IC, EXT_START_ADDR_HI, par->ext_start_addr_hi);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 808 i740outreg(par, VGA_CRT_IC, EXT_START_ADDR, par->ext_start_addr);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 809
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 810 i740outreg_mask(par, VGA_CRT_IC, INTERLACE_CNTL,
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 811 par->interlace_cntl, INTERLACE_ENABLE);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 812 i740outreg_mask(par, XRX, ADDRESS_MAPPING, par->address_mapping, 0x1F);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 813 i740outreg_mask(par, XRX, BITBLT_CNTL, par->bitblt_cntl, COLEXP_MODE);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 814 i740outreg_mask(par, XRX, DISPLAY_CNTL,
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 815 par->display_cntl, VGA_WRAP_MODE | GUI_MODE);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 816 i740outreg_mask(par, XRX, PIXPIPE_CONFIG_0, par->pixelpipe_cfg0, 0x9B);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 817 i740outreg_mask(par, XRX, PIXPIPE_CONFIG_2, par->pixelpipe_cfg2, 0x0C);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 818
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 819 i740outreg(par, XRX, PLL_CNTL, par->pll_cntl);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 820
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 821 i740outreg_mask(par, XRX, PIXPIPE_CONFIG_1,
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 822 par->pixelpipe_cfg1, DISPLAY_COLOR_MODE);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 823
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 824 itemp = readl(par->regs + FWATER_BLC);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 825 itemp &= ~(LMI_BURST_LENGTH | LMI_FIFO_WATERMARK);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 826 itemp |= par->lmi_fifo_watermark;
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 827 writel(itemp, par->regs + FWATER_BLC);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 828
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 829 i740outreg(par, XRX, DRAM_EXT_CNTL, DRAM_REFRESH_60HZ);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 830
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 831 i740outreg_mask(par, MRX, COL_KEY_CNTL_1, 0, BLANK_DISP_OVERLAY);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 832 i740outreg_mask(par, XRX, IO_CTNL,
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 833 par->io_cntl, EXTENDED_ATTR_CNTL | EXTENDED_CRTC_CNTL);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 834
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 835 if (par->pixelpipe_cfg1 != DISPLAY_8BPP_MODE) {
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 836 i740outb(par, VGA_PEL_MSK, 0xFF);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 837 i740outb(par, VGA_PEL_IW, 0x00);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 838 for (i = 0; i < 256; i++) {
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 839 itemp = (par->pixelpipe_cfg0 & DAC_8_BIT) ? i : i >> 2;
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 840 i740outb(par, VGA_PEL_D, itemp);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 841 i740outb(par, VGA_PEL_D, itemp);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 842 i740outb(par, VGA_PEL_D, itemp);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 843 }
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 844 }
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 845
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 846 /* Wait for screen to stabilize. */
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 847 mdelay(50);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 848 vga_unprotect(par);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 849
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 850 info->fix.line_length =
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 851 info->var.xres_virtual * info->var.bits_per_pixel / 8;
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 852 if (info->var.bits_per_pixel == 8)
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 853 info->fix.visual = FB_VISUAL_PSEUDOCOLOR;
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 854 else
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 855 info->fix.visual = FB_VISUAL_TRUECOLOR;
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 856
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 857 return 0;
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 858 }
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 859
:::::: The code at line 743 was first introduced by commit
:::::: 5350c65f4f15bbc111ffa629130d3f32cdd4ccf6 Resurrect Intel740 driver: i740fb
:::::: TO: Ondrej Zary <linux(a)rainbow-software.org>
:::::: CC: Florian Tobias Schandinat <FlorianSchandinat(a)gmx.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
drivers/edac/sifive_edac.c:23: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 66f4beaa6c1d28161f534471484b2daa2de1dce0
commit: a18b14d8886614b3c7d290c4cfc33389822b0535 riscv: Disable STACKPROTECTOR_PER_TASK if GCC_PLUGIN_RANDSTRUCT is enabled
date: 3 months ago
config: riscv-allyesconfig (attached as .config)
compiler: riscv64-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 a18b14d8886614b3c7d290c4cfc33389822b0535
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=riscv
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 >>):
>> drivers/edac/sifive_edac.c:23: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* EDAC error callback
vim +23 drivers/edac/sifive_edac.c
91abaeaaff35d97 Yash Shah 2019-05-06 21
91abaeaaff35d97 Yash Shah 2019-05-06 22 /**
91abaeaaff35d97 Yash Shah 2019-05-06 @23 * EDAC error callback
91abaeaaff35d97 Yash Shah 2019-05-06 24 *
91abaeaaff35d97 Yash Shah 2019-05-06 25 * @event: non-zero if unrecoverable.
91abaeaaff35d97 Yash Shah 2019-05-06 26 */
91abaeaaff35d97 Yash Shah 2019-05-06 27 static
91abaeaaff35d97 Yash Shah 2019-05-06 28 int ecc_err_event(struct notifier_block *this, unsigned long event, void *ptr)
91abaeaaff35d97 Yash Shah 2019-05-06 29 {
91abaeaaff35d97 Yash Shah 2019-05-06 30 const char *msg = (char *)ptr;
91abaeaaff35d97 Yash Shah 2019-05-06 31 struct sifive_edac_priv *p;
91abaeaaff35d97 Yash Shah 2019-05-06 32
91abaeaaff35d97 Yash Shah 2019-05-06 33 p = container_of(this, struct sifive_edac_priv, notifier);
91abaeaaff35d97 Yash Shah 2019-05-06 34
91abaeaaff35d97 Yash Shah 2019-05-06 35 if (event == SIFIVE_L2_ERR_TYPE_UE)
91abaeaaff35d97 Yash Shah 2019-05-06 36 edac_device_handle_ue(p->dci, 0, 0, msg);
91abaeaaff35d97 Yash Shah 2019-05-06 37 else if (event == SIFIVE_L2_ERR_TYPE_CE)
91abaeaaff35d97 Yash Shah 2019-05-06 38 edac_device_handle_ce(p->dci, 0, 0, msg);
91abaeaaff35d97 Yash Shah 2019-05-06 39
91abaeaaff35d97 Yash Shah 2019-05-06 40 return NOTIFY_OK;
91abaeaaff35d97 Yash Shah 2019-05-06 41 }
91abaeaaff35d97 Yash Shah 2019-05-06 42
:::::: The code at line 23 was first introduced by commit
:::::: 91abaeaaff35d97e88d2249f69f19db749a19a68 EDAC/sifive: Add EDAC platform driver for SiFive SoCs
:::::: TO: Yash Shah <yash.shah(a)sifive.com>
:::::: CC: Tony Luck <tony.luck(a)intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[rhvgoyal:fuse-secctx 2/2] fs/fuse/dir.c:502:3: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-se...
by kernel test robot
tree: https://github.com/rhvgoyal/linux fuse-secctx
head: 6df7ad1315eb0cf5fec0a2efc1a35743052f3087
commit: 6df7ad1315eb0cf5fec0a2efc1a35743052f3087 [2/2] fuse: Send security context of inode on file creation
config: riscv-randconfig-c006-20210930 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 28981015526f2192440c18f18e8a20cd11b0779c)
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://github.com/rhvgoyal/linux/commit/6df7ad1315eb0cf5fec0a2efc1a35743...
git remote add rhvgoyal https://github.com/rhvgoyal/linux
git fetch --no-tags rhvgoyal fuse-secctx
git checkout 6df7ad1315eb0cf5fec0a2efc1a35743052f3087
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
>> fs/fuse/dir.c:502:3: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcpy(ptr, name);
^~~~~~
>> fs/fuse/dir.c:772:2: warning: Address of stack memory associated with local variable 'outarg' is still referred to by the stack variable 'args' upon returning to the caller. This will be a dangling reference [clang-analyzer-core.StackAddressEscape]
return err;
^
vim +502 fs/fuse/dir.c
e5e5558e923f35 Miklos Szeredi 2005-09-09 461
6df7ad1315eb0c Vivek Goyal 2021-09-24 462 static int get_security_context(struct dentry *entry, umode_t mode,
6df7ad1315eb0c Vivek Goyal 2021-09-24 463 void **security_ctx, u32 *security_ctxlen)
6df7ad1315eb0c Vivek Goyal 2021-09-24 464 {
6df7ad1315eb0c Vivek Goyal 2021-09-24 465 struct fuse_secctx *fsecctx;
6df7ad1315eb0c Vivek Goyal 2021-09-24 466 void *ctx, *full_ctx;
6df7ad1315eb0c Vivek Goyal 2021-09-24 467 u32 ctxlen, full_ctxlen;
6df7ad1315eb0c Vivek Goyal 2021-09-24 468 int err = 0;
6df7ad1315eb0c Vivek Goyal 2021-09-24 469
6df7ad1315eb0c Vivek Goyal 2021-09-24 470 err = security_dentry_init_security(entry, mode, &entry->d_name, &ctx,
6df7ad1315eb0c Vivek Goyal 2021-09-24 471 &ctxlen);
6df7ad1315eb0c Vivek Goyal 2021-09-24 472 if (err) {
6df7ad1315eb0c Vivek Goyal 2021-09-24 473 if (err != -EOPNOTSUPP)
6df7ad1315eb0c Vivek Goyal 2021-09-24 474 goto out_err;
6df7ad1315eb0c Vivek Goyal 2021-09-24 475 /* No LSM is supporting this security hook. Ignore error */
6df7ad1315eb0c Vivek Goyal 2021-09-24 476 err = 0;
6df7ad1315eb0c Vivek Goyal 2021-09-24 477 ctxlen = 0;
6df7ad1315eb0c Vivek Goyal 2021-09-24 478 }
6df7ad1315eb0c Vivek Goyal 2021-09-24 479
6df7ad1315eb0c Vivek Goyal 2021-09-24 480 if (ctxlen > 0) {
6df7ad1315eb0c Vivek Goyal 2021-09-24 481 /*
6df7ad1315eb0c Vivek Goyal 2021-09-24 482 * security_dentry_init_security() does not return the name
6df7ad1315eb0c Vivek Goyal 2021-09-24 483 * of lsm or xattr to which label belongs. As of now only
6df7ad1315eb0c Vivek Goyal 2021-09-24 484 * selinux implements this. Hence, hardcoding the name to
6df7ad1315eb0c Vivek Goyal 2021-09-24 485 * security.selinux.
6df7ad1315eb0c Vivek Goyal 2021-09-24 486 */
6df7ad1315eb0c Vivek Goyal 2021-09-24 487 char *name = "security.selinux";
6df7ad1315eb0c Vivek Goyal 2021-09-24 488 void *ptr;
6df7ad1315eb0c Vivek Goyal 2021-09-24 489
6df7ad1315eb0c Vivek Goyal 2021-09-24 490 full_ctxlen = sizeof(*fsecctx) + strlen(name) + ctxlen + 1;
6df7ad1315eb0c Vivek Goyal 2021-09-24 491 full_ctx = kzalloc(full_ctxlen, GFP_KERNEL);
6df7ad1315eb0c Vivek Goyal 2021-09-24 492 if (!full_ctx) {
6df7ad1315eb0c Vivek Goyal 2021-09-24 493 err = -ENOMEM;
6df7ad1315eb0c Vivek Goyal 2021-09-24 494 kfree(ctx);
6df7ad1315eb0c Vivek Goyal 2021-09-24 495 goto out_err;
6df7ad1315eb0c Vivek Goyal 2021-09-24 496 }
6df7ad1315eb0c Vivek Goyal 2021-09-24 497
6df7ad1315eb0c Vivek Goyal 2021-09-24 498 ptr = full_ctx;
6df7ad1315eb0c Vivek Goyal 2021-09-24 499 fsecctx = (struct fuse_secctx*) ptr;
6df7ad1315eb0c Vivek Goyal 2021-09-24 500 fsecctx->size = ctxlen;
6df7ad1315eb0c Vivek Goyal 2021-09-24 501 ptr += sizeof(*fsecctx);
6df7ad1315eb0c Vivek Goyal 2021-09-24 @502 strcpy(ptr, name);
6df7ad1315eb0c Vivek Goyal 2021-09-24 503 ptr += strlen(name) + 1;
6df7ad1315eb0c Vivek Goyal 2021-09-24 504 memcpy(ptr, ctx, ctxlen);
6df7ad1315eb0c Vivek Goyal 2021-09-24 505 kfree(ctx);
6df7ad1315eb0c Vivek Goyal 2021-09-24 506 } else {
6df7ad1315eb0c Vivek Goyal 2021-09-24 507 full_ctxlen = sizeof(*fsecctx);
6df7ad1315eb0c Vivek Goyal 2021-09-24 508 full_ctx = kzalloc(full_ctxlen, GFP_KERNEL);
6df7ad1315eb0c Vivek Goyal 2021-09-24 509 if (!full_ctx) {
6df7ad1315eb0c Vivek Goyal 2021-09-24 510 err = -ENOMEM;
6df7ad1315eb0c Vivek Goyal 2021-09-24 511 goto out_err;
6df7ad1315eb0c Vivek Goyal 2021-09-24 512 }
6df7ad1315eb0c Vivek Goyal 2021-09-24 513 }
6df7ad1315eb0c Vivek Goyal 2021-09-24 514
6df7ad1315eb0c Vivek Goyal 2021-09-24 515 *security_ctxlen = full_ctxlen;
6df7ad1315eb0c Vivek Goyal 2021-09-24 516 *security_ctx = full_ctx;
6df7ad1315eb0c Vivek Goyal 2021-09-24 517 out_err:
6df7ad1315eb0c Vivek Goyal 2021-09-24 518 return err;
6df7ad1315eb0c Vivek Goyal 2021-09-24 519 }
6df7ad1315eb0c Vivek Goyal 2021-09-24 520
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:236:9: warning: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage [clang-analyzer-core.uninitialized.Assign]
by kernel test robot
tree: https://github.com/0day-ci/linux/commits/Arunpravin/Enable-buddy-memory-m...
head: 71b3775a5ce7b59e8c5292ae438284e8569c9e9f
commit: 71b3775a5ce7b59e8c5292ae438284e8569c9e9f Add drm buddy manager support to amdgpu driver
date: 7 weeks ago
config: riscv-randconfig-c006-20210927 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project dc6e8dfdfe7efecfda318d43a06fae18b40eb498)
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://github.com/0day-ci/linux/commit/71b3775a5ce7b59e8c5292ae438284e85...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Arunpravin/Enable-buddy-memory-manager-support/20210921-032602
git checkout 71b3775a5ce7b59e8c5292ae438284e8569c9e9f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:236:9: warning: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage [clang-analyzer-core.uninitialized.Assign]
usage += amdgpu_vram_mgr_vis_size(adev, block);
~~~~~ ^
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:227:2: note: 'usage' declared without an initial value
u64 usage;
^~~~~~~~~
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:236:9: note: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage
usage += amdgpu_vram_mgr_vis_size(adev, block);
~~~~~ ^
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:238:2: warning: Undefined or garbage value returned to caller [clang-analyzer-core.uninitialized.UndefReturn]
return usage;
^ ~~~~~
vim +236 drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
3c848bb38aca1f Christian König 2017-08-07 212
5e9244ff585239 Michel Dänzer 2018-06-12 213 /**
ddc21af4d0f37f Michel Dänzer 2018-07-11 214 * amdgpu_vram_mgr_bo_visible_size - CPU visible BO size
5e9244ff585239 Michel Dänzer 2018-06-12 215 *
5e9244ff585239 Michel Dänzer 2018-06-12 216 * @bo: &amdgpu_bo buffer object (must be in VRAM)
5e9244ff585239 Michel Dänzer 2018-06-12 217 *
5e9244ff585239 Michel Dänzer 2018-06-12 218 * Returns:
ddc21af4d0f37f Michel Dänzer 2018-07-11 219 * How much of the given &amdgpu_bo buffer object lies in CPU visible VRAM.
5e9244ff585239 Michel Dänzer 2018-06-12 220 */
ddc21af4d0f37f Michel Dänzer 2018-07-11 221 u64 amdgpu_vram_mgr_bo_visible_size(struct amdgpu_bo *bo)
5e9244ff585239 Michel Dänzer 2018-06-12 222 {
7303b39e46b2f5 Michel Dänzer 2018-06-14 223 struct amdgpu_device *adev = amdgpu_ttm_adev(bo->tbo.bdev);
cb1c81467af355 Christian König 2021-04-30 224 struct ttm_resource *res = bo->tbo.resource;
71b3775a5ce7b5 Arunpravin 2021-09-21 225 struct amdgpu_vram_mgr_node *vnode = to_amdgpu_vram_mgr_node(res);
71b3775a5ce7b5 Arunpravin 2021-09-21 226 struct drm_buddy_block *block;
ddc21af4d0f37f Michel Dänzer 2018-07-11 227 u64 usage;
5e9244ff585239 Michel Dänzer 2018-06-12 228
9735bf1930e658 Michel Dänzer 2018-06-15 229 if (amdgpu_gmc_vram_full_visible(&adev->gmc))
ddc21af4d0f37f Michel Dänzer 2018-07-11 230 return amdgpu_bo_size(bo);
7303b39e46b2f5 Michel Dänzer 2018-06-14 231
cb1c81467af355 Christian König 2021-04-30 232 if (res->start >= adev->gmc.visible_vram_size >> PAGE_SHIFT)
ddc21af4d0f37f Michel Dänzer 2018-07-11 233 return 0;
7303b39e46b2f5 Michel Dänzer 2018-06-14 234
71b3775a5ce7b5 Arunpravin 2021-09-21 235 list_for_each_entry(block, &vnode->blocks, link)
71b3775a5ce7b5 Arunpravin 2021-09-21 @236 usage += amdgpu_vram_mgr_vis_size(adev, block);
7303b39e46b2f5 Michel Dänzer 2018-06-14 237
7303b39e46b2f5 Michel Dänzer 2018-06-14 @238 return usage;
5e9244ff585239 Michel Dänzer 2018-06-12 239 }
5e9244ff585239 Michel Dänzer 2018-06-12 240
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
drivers/leds/led-class-flash.c:210:16: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 ...
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fe91c4725aeed35023ba4f7a1e1adfebb6878c23
commit: 811b5440c6e4998755990fd2c1455f42f3aae3b0 led-class-flash: fix -Wrestrict warning
date: 6 weeks ago
config: i386-randconfig-c001-20210930 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 28981015526f2192440c18f18e8a20cd11b0779c)
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 811b5440c6e4998755990fd2c1455f42f3aae3b0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386 clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
>> drivers/leds/led-class-flash.c:210:16: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
return strlen(strcat(buf, "\n"));
^~~~~~
vim +210 drivers/leds/led-class-flash.c
7aea8389a77abf9 Jacek Anaszewski 2015-01-09 185
7aea8389a77abf9 Jacek Anaszewski 2015-01-09 186 static ssize_t flash_fault_show(struct device *dev,
7aea8389a77abf9 Jacek Anaszewski 2015-01-09 187 struct device_attribute *attr, char *buf)
7aea8389a77abf9 Jacek Anaszewski 2015-01-09 188 {
7aea8389a77abf9 Jacek Anaszewski 2015-01-09 189 struct led_classdev *led_cdev = dev_get_drvdata(dev);
7aea8389a77abf9 Jacek Anaszewski 2015-01-09 190 struct led_classdev_flash *fled_cdev = lcdev_to_flcdev(led_cdev);
7aea8389a77abf9 Jacek Anaszewski 2015-01-09 191 u32 fault, mask = 0x1;
7aea8389a77abf9 Jacek Anaszewski 2015-01-09 192 char *pbuf = buf;
7aea8389a77abf9 Jacek Anaszewski 2015-01-09 193 int i, ret, buf_len;
7aea8389a77abf9 Jacek Anaszewski 2015-01-09 194
7aea8389a77abf9 Jacek Anaszewski 2015-01-09 195 ret = led_get_flash_fault(fled_cdev, &fault);
7aea8389a77abf9 Jacek Anaszewski 2015-01-09 196 if (ret < 0)
7aea8389a77abf9 Jacek Anaszewski 2015-01-09 197 return -EINVAL;
7aea8389a77abf9 Jacek Anaszewski 2015-01-09 198
7aea8389a77abf9 Jacek Anaszewski 2015-01-09 199 *buf = '\0';
7aea8389a77abf9 Jacek Anaszewski 2015-01-09 200
7aea8389a77abf9 Jacek Anaszewski 2015-01-09 201 for (i = 0; i < LED_NUM_FLASH_FAULTS; ++i) {
7aea8389a77abf9 Jacek Anaszewski 2015-01-09 202 if (fault & mask) {
7aea8389a77abf9 Jacek Anaszewski 2015-01-09 203 buf_len = sprintf(pbuf, "%s ",
7aea8389a77abf9 Jacek Anaszewski 2015-01-09 204 led_flash_fault_names[i]);
7aea8389a77abf9 Jacek Anaszewski 2015-01-09 205 pbuf += buf_len;
7aea8389a77abf9 Jacek Anaszewski 2015-01-09 206 }
7aea8389a77abf9 Jacek Anaszewski 2015-01-09 207 mask <<= 1;
7aea8389a77abf9 Jacek Anaszewski 2015-01-09 208 }
7aea8389a77abf9 Jacek Anaszewski 2015-01-09 209
811b5440c6e4998 Arnd Bergmann 2021-09-27 @210 return strlen(strcat(buf, "\n"));
7aea8389a77abf9 Jacek Anaszewski 2015-01-09 211 }
7aea8389a77abf9 Jacek Anaszewski 2015-01-09 212 static DEVICE_ATTR_RO(flash_fault);
7aea8389a77abf9 Jacek Anaszewski 2015-01-09 213
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
Re: [RFC PATCH] erofs: add multiple device support
by kernel test robot
Hi Gao,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on xiang-erofs/dev-test]
[also build test WARNING on v5.15]
[cannot apply to 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/Gao-Xiang/erofs-add-multiple-dev...
base: https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git dev-test
config: i386-randconfig-s002-20210928 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/0day-ci/linux/commit/5fd2e534e5f1ed05de1b7c46d55830c42...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Gao-Xiang/erofs-add-multiple-device-support/20210928-161752
git checkout 5fd2e534e5f1ed05de1b7c46d55830c422b09a3d
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash fs/erofs/
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 >>)
>> fs/erofs/data.c:139:38: sparse: sparse: restricted __le16 degrades to integer
vim +139 fs/erofs/data.c
79
80 static int erofs_map_blocks(struct inode *inode,
81 struct erofs_map_blocks *map, int flags)
82 {
83 struct super_block *sb = inode->i_sb;
84 struct erofs_inode *vi = EROFS_I(inode);
85 struct erofs_inode_chunk_index *idx;
86 struct page *page;
87 u64 chunknr;
88 unsigned int unit;
89 erofs_off_t pos;
90 int err = 0;
91
92 map->m_deviceid = 0;
93 if (map->m_la >= inode->i_size) {
94 /* leave out-of-bound access unmapped */
95 map->m_flags = 0;
96 map->m_plen = 0;
97 goto out;
98 }
99
100 if (vi->datalayout != EROFS_INODE_CHUNK_BASED)
101 return erofs_map_blocks_flatmode(inode, map, flags);
102
103 if (vi->chunkformat & EROFS_CHUNK_FORMAT_INDEXES)
104 unit = sizeof(*idx); /* chunk index */
105 else
106 unit = EROFS_BLOCK_MAP_ENTRY_SIZE; /* block map */
107
108 chunknr = map->m_la >> vi->chunkbits;
109 pos = ALIGN(iloc(EROFS_SB(sb), vi->nid) + vi->inode_isize +
110 vi->xattr_isize, unit) + unit * chunknr;
111
112 page = erofs_get_meta_page(inode->i_sb, erofs_blknr(pos));
113 if (IS_ERR(page))
114 return PTR_ERR(page);
115
116 map->m_la = chunknr << vi->chunkbits;
117 map->m_plen = min_t(erofs_off_t, 1UL << vi->chunkbits,
118 roundup(inode->i_size - map->m_la, EROFS_BLKSIZ));
119
120 /* handle block map */
121 if (!(vi->chunkformat & EROFS_CHUNK_FORMAT_INDEXES)) {
122 __le32 *blkaddr = page_address(page) + erofs_blkoff(pos);
123
124 if (le32_to_cpu(*blkaddr) == EROFS_NULL_ADDR) {
125 map->m_flags = 0;
126 } else {
127 map->m_pa = blknr_to_addr(le32_to_cpu(*blkaddr));
128 map->m_flags = EROFS_MAP_MAPPED;
129 }
130 goto out_unlock;
131 }
132 /* parse chunk indexes */
133 idx = page_address(page) + erofs_blkoff(pos);
134 switch (le32_to_cpu(idx->blkaddr)) {
135 case EROFS_NULL_ADDR:
136 map->m_flags = 0;
137 break;
138 default:
> 139 map->m_deviceid = idx->device_id & EROFS_SB(sb)->device_id_mask;
140 map->m_pa = blknr_to_addr(le32_to_cpu(idx->blkaddr));
141 map->m_flags = EROFS_MAP_MAPPED;
142 break;
143 }
144 out_unlock:
145 unlock_page(page);
146 put_page(page);
147 out:
148 map->m_llen = map->m_plen;
149 return err;
150 }
151
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week