drivers/scsi/FlashPoint.c:1185:11: error: 'struct sccb_mgr_info' has no member named 'si_relative_cardnum'
by kernel test robot
Hi Christoph,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c3d0e3fd41b7f0f5d5d5b6022ab7e813f04ea727
commit: 8cad3b66bff4ee7c7d52b9a663cb6a2c5f66a7f7 Buslogic: remove ISA support
date: 6 weeks ago
config: ia64-allyesconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/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 8cad3b66bff4ee7c7d52b9a663cb6a2c5f66a7f7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
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 >>):
from include/linux/irq.h:589,
from arch/ia64/include/asm/hardirq.h:19,
from include/linux/hardirq.h:10,
from include/linux/interrupt.h:11,
from drivers/scsi/BusLogic.c:27:
arch/ia64/include/uapi/asm/siginfo.h:15:27: error: expected ':', ',', ';', '}' or '__attribute__' before '.' token
15 | #define si_flags _sifields._sigfault._flags
| ^
drivers/scsi/FlashPoint.c:43:6: note: in expansion of macro 'si_flags'
43 | u16 si_flags;
| ^~~~~~~~
In file included from drivers/scsi/BusLogic.c:51:
drivers/scsi/FlashPoint.c: In function 'FlashPoint_ProbeHostAdapter':
drivers/scsi/FlashPoint.c:1076:11: error: 'struct sccb_mgr_info' has no member named '_sifields'
1076 | pCardInfo->si_flags = 0x0000;
| ^~
drivers/scsi/FlashPoint.c:1079:12: error: 'struct sccb_mgr_info' has no member named '_sifields'
1079 | pCardInfo->si_flags |= SCSI_PARITY_ENA;
| ^~
drivers/scsi/FlashPoint.c:1082:12: error: 'struct sccb_mgr_info' has no member named '_sifields'
1082 | pCardInfo->si_flags |= SOFT_RESET;
| ^~
drivers/scsi/FlashPoint.c:1085:12: error: 'struct sccb_mgr_info' has no member named '_sifields'
1085 | pCardInfo->si_flags |= EXTENDED_TRANSLATION;
| ^~
drivers/scsi/FlashPoint.c:1088:12: error: 'struct sccb_mgr_info' has no member named '_sifields'
1088 | pCardInfo->si_flags |= FLAG_SCAM_ENABLED;
| ^~
drivers/scsi/FlashPoint.c:1091:12: error: 'struct sccb_mgr_info' has no member named '_sifields'
1091 | pCardInfo->si_flags |= FLAG_SCAM_LEVEL2;
| ^~
drivers/scsi/FlashPoint.c:1107:12: error: 'struct sccb_mgr_info' has no member named '_sifields'
1107 | pCardInfo->si_flags |= SUPPORT_16TAR_32LUN;
| ^~
drivers/scsi/FlashPoint.c:1109:11: error: 'struct sccb_mgr_info' has no member named 'si_card_family'
1109 | pCardInfo->si_card_family = HARPOON_FAMILY;
| ^~
drivers/scsi/FlashPoint.c:1110:11: error: 'struct sccb_mgr_info' has no member named 'si_bustype'
1110 | pCardInfo->si_bustype = BUSTYPE_PCI;
| ^~
drivers/scsi/FlashPoint.c:1113:12: error: 'struct sccb_mgr_info' has no member named 'si_card_model'
1113 | pCardInfo->si_card_model[0] = '9';
| ^~
drivers/scsi/FlashPoint.c:1116:13: error: 'struct sccb_mgr_info' has no member named 'si_card_model'
1116 | pCardInfo->si_card_model[1] = '3';
| ^~
drivers/scsi/FlashPoint.c:1117:13: error: 'struct sccb_mgr_info' has no member named 'si_card_model'
1117 | pCardInfo->si_card_model[2] = '0';
| ^~
drivers/scsi/FlashPoint.c:1120:13: error: 'struct sccb_mgr_info' has no member named 'si_card_model'
1120 | pCardInfo->si_card_model[1] = '5';
| ^~
drivers/scsi/FlashPoint.c:1121:13: error: 'struct sccb_mgr_info' has no member named 'si_card_model'
1121 | pCardInfo->si_card_model[2] = '0';
| ^~
drivers/scsi/FlashPoint.c:1124:13: error: 'struct sccb_mgr_info' has no member named 'si_card_model'
1124 | pCardInfo->si_card_model[1] = '3';
| ^~
drivers/scsi/FlashPoint.c:1125:13: error: 'struct sccb_mgr_info' has no member named 'si_card_model'
1125 | pCardInfo->si_card_model[2] = '2';
| ^~
drivers/scsi/FlashPoint.c:1128:13: error: 'struct sccb_mgr_info' has no member named 'si_card_model'
1128 | pCardInfo->si_card_model[1] = '5';
| ^~
drivers/scsi/FlashPoint.c:1129:13: error: 'struct sccb_mgr_info' has no member named 'si_card_model'
1129 | pCardInfo->si_card_model[2] = '2';
| ^~
drivers/scsi/FlashPoint.c:1134:12: error: 'struct sccb_mgr_info' has no member named 'si_card_model'
1134 | pCardInfo->si_card_model[0] = (unsigned char)(temp >> 8);
| ^~
drivers/scsi/FlashPoint.c:1137:12: error: 'struct sccb_mgr_info' has no member named 'si_card_model'
1137 | pCardInfo->si_card_model[1] = (unsigned char)(temp & 0x00FF);
| ^~
drivers/scsi/FlashPoint.c:1138:12: error: 'struct sccb_mgr_info' has no member named 'si_card_model'
1138 | pCardInfo->si_card_model[2] = (unsigned char)(temp >> 8);
| ^~
drivers/scsi/FlashPoint.c:1141:15: error: 'struct sccb_mgr_info' has no member named 'si_card_model'
1141 | if (pCardInfo->si_card_model[1] == '3') {
| ^~
drivers/scsi/FlashPoint.c:1143:13: error: 'struct sccb_mgr_info' has no member named '_sifields'
1143 | pCardInfo->si_flags |= LOW_BYTE_TERM;
| ^~
drivers/scsi/FlashPoint.c:1144:22: error: 'struct sccb_mgr_info' has no member named 'si_card_model'
1144 | } else if (pCardInfo->si_card_model[2] == '0') {
| ^~
drivers/scsi/FlashPoint.c:1148:13: error: 'struct sccb_mgr_info' has no member named '_sifields'
1148 | pCardInfo->si_flags |= LOW_BYTE_TERM;
| ^~
drivers/scsi/FlashPoint.c:1151:13: error: 'struct sccb_mgr_info' has no member named '_sifields'
1151 | pCardInfo->si_flags |= HIGH_BYTE_TERM;
| ^~
drivers/scsi/FlashPoint.c:1169:13: error: 'struct sccb_mgr_info' has no member named '_sifields'
1169 | pCardInfo->si_flags |= LOW_BYTE_TERM;
| ^~
drivers/scsi/FlashPoint.c:1171:13: error: 'struct sccb_mgr_info' has no member named '_sifields'
1171 | pCardInfo->si_flags |= HIGH_BYTE_TERM;
| ^~
drivers/scsi/FlashPoint.c:1178:12: error: 'struct sccb_mgr_info' has no member named 'si_XlatInfo'
1178 | pCardInfo->si_XlatInfo[i] =
| ^~
>> drivers/scsi/FlashPoint.c:1185:11: error: 'struct sccb_mgr_info' has no member named 'si_relative_cardnum'
1185 | pCardInfo->si_relative_cardnum =
| ^~
drivers/scsi/FlashPoint.c: In function 'FlashPoint_HardwareResetHostAdapter':
drivers/scsi/FlashPoint.c:1278:30: error: 'struct sccb_mgr_info' has no member named '_sifields'
1278 | i = (unsigned char)pCardInfo->si_flags;
| ^~
drivers/scsi/FlashPoint.c:1292:17: error: 'struct sccb_mgr_info' has no member named '_sifields'
1292 | if (!(pCardInfo->si_flags & SOFT_RESET)) {
| ^~
drivers/scsi/FlashPoint.c:1299:15: error: 'struct sccb_mgr_info' has no member named '_sifields'
1299 | if (pCardInfo->si_flags & POST_ALL_UNDERRRUNS)
| ^~
drivers/scsi/FlashPoint.c: In function 'FlashPoint_AbortCCB':
drivers/scsi/FlashPoint.c:1618:16: warning: variable 'TID' set but not used [-Wunused-but-set-variable]
1618 | unsigned char TID;
| ^~~
drivers/scsi/BusLogic.c: In function 'blogic_msg':
drivers/scsi/BusLogic.c:3447:2: warning: function 'blogic_msg' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
3447 | len = vsprintf(buf, fmt, args);
| ^~~
vim +1185 drivers/scsi/FlashPoint.c
^1da177e4c3f415 Linus Torvalds 2005-04-16 929
47b5d69c4aa753f James Bottomley 2005-04-24 930 /*---------------------------------------------------------------------
^1da177e4c3f415 Linus Torvalds 2005-04-16 931 *
d8b6b8bd8a99ee9 Alexey Dobriyan 2006-03-08 932 * Function: FlashPoint_ProbeHostAdapter
^1da177e4c3f415 Linus Torvalds 2005-04-16 933 *
47b5d69c4aa753f James Bottomley 2005-04-24 934 * Description: Setup and/or Search for cards and return info to caller.
^1da177e4c3f415 Linus Torvalds 2005-04-16 935 *
47b5d69c4aa753f James Bottomley 2005-04-24 936 *---------------------------------------------------------------------*/
^1da177e4c3f415 Linus Torvalds 2005-04-16 937
7f101662dd55aa1 Alexey Dobriyan 2006-03-08 938 static int FlashPoint_ProbeHostAdapter(struct sccb_mgr_info *pCardInfo)
47b5d69c4aa753f James Bottomley 2005-04-24 939 {
db038cf86fc63d3 Alexey Dobriyan 2006-03-08 940 static unsigned char first_time = 1;
^1da177e4c3f415 Linus Torvalds 2005-04-16 941
db038cf86fc63d3 Alexey Dobriyan 2006-03-08 942 unsigned char i, j, id, ScamFlg;
c823feeb33161c0 Alexey Dobriyan 2006-03-08 943 unsigned short temp, temp2, temp3, temp4, temp5, temp6;
391e2f25601e34a Khalid Aziz 2013-05-16 944 u32 ioport;
68d0c1ae66413ef Alexey Dobriyan 2006-03-08 945 struct nvram_info *pCurrNvRam;
^1da177e4c3f415 Linus Torvalds 2005-04-16 946
47b5d69c4aa753f James Bottomley 2005-04-24 947 ioport = pCardInfo->si_baseaddr;
^1da177e4c3f415 Linus Torvalds 2005-04-16 948
47b5d69c4aa753f James Bottomley 2005-04-24 949 if (RD_HARPOON(ioport + hp_vendor_id_0) != ORION_VEND_0)
5c1b85e209af41c Alexey Dobriyan 2006-03-08 950 return (int)FAILURE;
^1da177e4c3f415 Linus Torvalds 2005-04-16 951
^1da177e4c3f415 Linus Torvalds 2005-04-16 952 if ((RD_HARPOON(ioport + hp_vendor_id_1) != ORION_VEND_1))
5c1b85e209af41c Alexey Dobriyan 2006-03-08 953 return (int)FAILURE;
^1da177e4c3f415 Linus Torvalds 2005-04-16 954
^1da177e4c3f415 Linus Torvalds 2005-04-16 955 if ((RD_HARPOON(ioport + hp_device_id_0) != ORION_DEV_0))
5c1b85e209af41c Alexey Dobriyan 2006-03-08 956 return (int)FAILURE;
^1da177e4c3f415 Linus Torvalds 2005-04-16 957
^1da177e4c3f415 Linus Torvalds 2005-04-16 958 if ((RD_HARPOON(ioport + hp_device_id_1) != ORION_DEV_1))
5c1b85e209af41c Alexey Dobriyan 2006-03-08 959 return (int)FAILURE;
^1da177e4c3f415 Linus Torvalds 2005-04-16 960
^1da177e4c3f415 Linus Torvalds 2005-04-16 961 if (RD_HARPOON(ioport + hp_rev_num) != 0x0f) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 962
^1da177e4c3f415 Linus Torvalds 2005-04-16 963 /* For new Harpoon then check for sub_device ID LSB
^1da177e4c3f415 Linus Torvalds 2005-04-16 964 the bits(0-3) must be all ZERO for compatible with
^1da177e4c3f415 Linus Torvalds 2005-04-16 965 current version of SCCBMgr, else skip this Harpoon
^1da177e4c3f415 Linus Torvalds 2005-04-16 966 device. */
^1da177e4c3f415 Linus Torvalds 2005-04-16 967
^1da177e4c3f415 Linus Torvalds 2005-04-16 968 if (RD_HARPOON(ioport + hp_sub_device_id_0) & 0x0f)
5c1b85e209af41c Alexey Dobriyan 2006-03-08 969 return (int)FAILURE;
^1da177e4c3f415 Linus Torvalds 2005-04-16 970 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 971
5c04a7b8981f285 Alexey Dobriyan 2006-03-08 972 if (first_time) {
47b5d69c4aa753f James Bottomley 2005-04-24 973 FPT_SccbMgrTableInitAll();
^1da177e4c3f415 Linus Torvalds 2005-04-16 974 first_time = 0;
47b5d69c4aa753f James Bottomley 2005-04-24 975 FPT_mbCards = 0;
^1da177e4c3f415 Linus Torvalds 2005-04-16 976 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 977
47b5d69c4aa753f James Bottomley 2005-04-24 978 if (FPT_RdStack(ioport, 0) != 0x00) {
5c04a7b8981f285 Alexey Dobriyan 2006-03-08 979 if (FPT_ChkIfChipInitialized(ioport) == 0) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 980 pCurrNvRam = NULL;
^1da177e4c3f415 Linus Torvalds 2005-04-16 981 WR_HARPOON(ioport + hp_semaphore, 0x00);
47b5d69c4aa753f James Bottomley 2005-04-24 982 FPT_XbowInit(ioport, 0); /*Must Init the SCSI before attempting */
47b5d69c4aa753f James Bottomley 2005-04-24 983 FPT_DiagEEPROM(ioport);
5c04a7b8981f285 Alexey Dobriyan 2006-03-08 984 } else {
47b5d69c4aa753f James Bottomley 2005-04-24 985 if (FPT_mbCards < MAX_MB_CARDS) {
47b5d69c4aa753f James Bottomley 2005-04-24 986 pCurrNvRam = &FPT_nvRamInfo[FPT_mbCards];
47b5d69c4aa753f James Bottomley 2005-04-24 987 FPT_mbCards++;
^1da177e4c3f415 Linus Torvalds 2005-04-16 988 pCurrNvRam->niBaseAddr = ioport;
47b5d69c4aa753f James Bottomley 2005-04-24 989 FPT_RNVRamData(pCurrNvRam);
^1da177e4c3f415 Linus Torvalds 2005-04-16 990 } else
5c1b85e209af41c Alexey Dobriyan 2006-03-08 991 return (int)FAILURE;
^1da177e4c3f415 Linus Torvalds 2005-04-16 992 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 993 } else
^1da177e4c3f415 Linus Torvalds 2005-04-16 994 pCurrNvRam = NULL;
^1da177e4c3f415 Linus Torvalds 2005-04-16 995
^1da177e4c3f415 Linus Torvalds 2005-04-16 996 WR_HARPOON(ioport + hp_clkctrl_0, CLKCTRL_DEFAULT);
^1da177e4c3f415 Linus Torvalds 2005-04-16 997 WR_HARPOON(ioport + hp_sys_ctrl, 0x00);
^1da177e4c3f415 Linus Torvalds 2005-04-16 998
^1da177e4c3f415 Linus Torvalds 2005-04-16 999 if (pCurrNvRam)
^1da177e4c3f415 Linus Torvalds 2005-04-16 1000 pCardInfo->si_id = pCurrNvRam->niAdapId;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1001 else
5c04a7b8981f285 Alexey Dobriyan 2006-03-08 1002 pCardInfo->si_id =
5c04a7b8981f285 Alexey Dobriyan 2006-03-08 1003 (unsigned
5c04a7b8981f285 Alexey Dobriyan 2006-03-08 1004 char)(FPT_utilEERead(ioport,
5c04a7b8981f285 Alexey Dobriyan 2006-03-08 1005 (ADAPTER_SCSI_ID /
5c04a7b8981f285 Alexey Dobriyan 2006-03-08 1006 2)) & (unsigned char)0x0FF);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1007
^1da177e4c3f415 Linus Torvalds 2005-04-16 1008 pCardInfo->si_lun = 0x00;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1009 pCardInfo->si_fw_revision = ORION_FW_REV;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1010 temp2 = 0x0000;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1011 temp3 = 0x0000;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1012 temp4 = 0x0000;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1013 temp5 = 0x0000;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1014 temp6 = 0x0000;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1015
^1da177e4c3f415 Linus Torvalds 2005-04-16 1016 for (id = 0; id < (16 / 2); id++) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1017
^1da177e4c3f415 Linus Torvalds 2005-04-16 1018 if (pCurrNvRam) {
c823feeb33161c0 Alexey Dobriyan 2006-03-08 1019 temp = (unsigned short)pCurrNvRam->niSyncTbl[id];
^1da177e4c3f415 Linus Torvalds 2005-04-16 1020 temp = ((temp & 0x03) + ((temp << 4) & 0xc0)) +
^1da177e4c3f415 Linus Torvalds 2005-04-16 1021 (((temp << 4) & 0x0300) + ((temp << 8) & 0xc000));
^1da177e4c3f415 Linus Torvalds 2005-04-16 1022 } else
5c04a7b8981f285 Alexey Dobriyan 2006-03-08 1023 temp =
5c04a7b8981f285 Alexey Dobriyan 2006-03-08 1024 FPT_utilEERead(ioport,
5c04a7b8981f285 Alexey Dobriyan 2006-03-08 1025 (unsigned short)((SYNC_RATE_TBL / 2)
5c04a7b8981f285 Alexey Dobriyan 2006-03-08 1026 + id));
^1da177e4c3f415 Linus Torvalds 2005-04-16 1027
^1da177e4c3f415 Linus Torvalds 2005-04-16 1028 for (i = 0; i < 2; temp >>= 8, i++) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1029
^1da177e4c3f415 Linus Torvalds 2005-04-16 1030 temp2 >>= 1;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1031 temp3 >>= 1;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1032 temp4 >>= 1;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1033 temp5 >>= 1;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1034 temp6 >>= 1;
5c04a7b8981f285 Alexey Dobriyan 2006-03-08 1035 switch (temp & 0x3) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1036 case AUTO_RATE_20: /* Synchronous, 20 mega-transfers/second */
df561f6688fef77 Gustavo A. R. Silva 2020-08-23 1037 temp6 |= 0x8000;
df561f6688fef77 Gustavo A. R. Silva 2020-08-23 1038 fallthrough;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1039 case AUTO_RATE_10: /* Synchronous, 10 mega-transfers/second */
df561f6688fef77 Gustavo A. R. Silva 2020-08-23 1040 temp5 |= 0x8000;
df561f6688fef77 Gustavo A. R. Silva 2020-08-23 1041 fallthrough;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1042 case AUTO_RATE_05: /* Synchronous, 5 mega-transfers/second */
df561f6688fef77 Gustavo A. R. Silva 2020-08-23 1043 temp2 |= 0x8000;
df561f6688fef77 Gustavo A. R. Silva 2020-08-23 1044 fallthrough;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1045 case AUTO_RATE_00: /* Asynchronous */
^1da177e4c3f415 Linus Torvalds 2005-04-16 1046 break;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1047 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 1048
^1da177e4c3f415 Linus Torvalds 2005-04-16 1049 if (temp & DISC_ENABLE_BIT)
^1da177e4c3f415 Linus Torvalds 2005-04-16 1050 temp3 |= 0x8000;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1051
^1da177e4c3f415 Linus Torvalds 2005-04-16 1052 if (temp & WIDE_NEGO_BIT)
^1da177e4c3f415 Linus Torvalds 2005-04-16 1053 temp4 |= 0x8000;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1054
^1da177e4c3f415 Linus Torvalds 2005-04-16 1055 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 1056 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 1057
^1da177e4c3f415 Linus Torvalds 2005-04-16 1058 pCardInfo->si_per_targ_init_sync = temp2;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1059 pCardInfo->si_per_targ_no_disc = temp3;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1060 pCardInfo->si_per_targ_wide_nego = temp4;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1061 pCardInfo->si_per_targ_fast_nego = temp5;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1062 pCardInfo->si_per_targ_ultra_nego = temp6;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1063
^1da177e4c3f415 Linus Torvalds 2005-04-16 1064 if (pCurrNvRam)
^1da177e4c3f415 Linus Torvalds 2005-04-16 1065 i = pCurrNvRam->niSysConf;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1066 else
5c04a7b8981f285 Alexey Dobriyan 2006-03-08 1067 i = (unsigned
5c04a7b8981f285 Alexey Dobriyan 2006-03-08 1068 char)(FPT_utilEERead(ioport, (SYSTEM_CONFIG / 2)));
^1da177e4c3f415 Linus Torvalds 2005-04-16 1069
^1da177e4c3f415 Linus Torvalds 2005-04-16 1070 if (pCurrNvRam)
^1da177e4c3f415 Linus Torvalds 2005-04-16 1071 ScamFlg = pCurrNvRam->niScamConf;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1072 else
5c04a7b8981f285 Alexey Dobriyan 2006-03-08 1073 ScamFlg =
5c04a7b8981f285 Alexey Dobriyan 2006-03-08 1074 (unsigned char)FPT_utilEERead(ioport, SCAM_CONFIG / 2);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1075
^1da177e4c3f415 Linus Torvalds 2005-04-16 1076 pCardInfo->si_flags = 0x0000;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1077
^1da177e4c3f415 Linus Torvalds 2005-04-16 1078 if (i & 0x01)
^1da177e4c3f415 Linus Torvalds 2005-04-16 1079 pCardInfo->si_flags |= SCSI_PARITY_ENA;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1080
^1da177e4c3f415 Linus Torvalds 2005-04-16 1081 if (!(i & 0x02))
^1da177e4c3f415 Linus Torvalds 2005-04-16 1082 pCardInfo->si_flags |= SOFT_RESET;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1083
^1da177e4c3f415 Linus Torvalds 2005-04-16 1084 if (i & 0x10)
^1da177e4c3f415 Linus Torvalds 2005-04-16 1085 pCardInfo->si_flags |= EXTENDED_TRANSLATION;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1086
^1da177e4c3f415 Linus Torvalds 2005-04-16 1087 if (ScamFlg & SCAM_ENABLED)
^1da177e4c3f415 Linus Torvalds 2005-04-16 1088 pCardInfo->si_flags |= FLAG_SCAM_ENABLED;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1089
^1da177e4c3f415 Linus Torvalds 2005-04-16 1090 if (ScamFlg & SCAM_LEVEL2)
^1da177e4c3f415 Linus Torvalds 2005-04-16 1091 pCardInfo->si_flags |= FLAG_SCAM_LEVEL2;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1092
^1da177e4c3f415 Linus Torvalds 2005-04-16 1093 j = (RD_HARPOON(ioport + hp_bm_ctrl) & ~SCSI_TERM_ENA_L);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1094 if (i & 0x04) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1095 j |= SCSI_TERM_ENA_L;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1096 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 1097 WR_HARPOON(ioport + hp_bm_ctrl, j);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1098
^1da177e4c3f415 Linus Torvalds 2005-04-16 1099 j = (RD_HARPOON(ioport + hp_ee_ctrl) & ~SCSI_TERM_ENA_H);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1100 if (i & 0x08) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1101 j |= SCSI_TERM_ENA_H;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1102 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 1103 WR_HARPOON(ioport + hp_ee_ctrl, j);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1104
^1da177e4c3f415 Linus Torvalds 2005-04-16 1105 if (!(RD_HARPOON(ioport + hp_page_ctrl) & NARROW_SCSI_CARD))
^1da177e4c3f415 Linus Torvalds 2005-04-16 1106
^1da177e4c3f415 Linus Torvalds 2005-04-16 1107 pCardInfo->si_flags |= SUPPORT_16TAR_32LUN;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1108
^1da177e4c3f415 Linus Torvalds 2005-04-16 1109 pCardInfo->si_card_family = HARPOON_FAMILY;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1110 pCardInfo->si_bustype = BUSTYPE_PCI;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1111
^1da177e4c3f415 Linus Torvalds 2005-04-16 1112 if (pCurrNvRam) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1113 pCardInfo->si_card_model[0] = '9';
^1da177e4c3f415 Linus Torvalds 2005-04-16 1114 switch (pCurrNvRam->niModel & 0x0f) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1115 case MODEL_LT:
^1da177e4c3f415 Linus Torvalds 2005-04-16 1116 pCardInfo->si_card_model[1] = '3';
^1da177e4c3f415 Linus Torvalds 2005-04-16 1117 pCardInfo->si_card_model[2] = '0';
^1da177e4c3f415 Linus Torvalds 2005-04-16 1118 break;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1119 case MODEL_LW:
^1da177e4c3f415 Linus Torvalds 2005-04-16 1120 pCardInfo->si_card_model[1] = '5';
^1da177e4c3f415 Linus Torvalds 2005-04-16 1121 pCardInfo->si_card_model[2] = '0';
^1da177e4c3f415 Linus Torvalds 2005-04-16 1122 break;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1123 case MODEL_DL:
^1da177e4c3f415 Linus Torvalds 2005-04-16 1124 pCardInfo->si_card_model[1] = '3';
^1da177e4c3f415 Linus Torvalds 2005-04-16 1125 pCardInfo->si_card_model[2] = '2';
^1da177e4c3f415 Linus Torvalds 2005-04-16 1126 break;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1127 case MODEL_DW:
^1da177e4c3f415 Linus Torvalds 2005-04-16 1128 pCardInfo->si_card_model[1] = '5';
^1da177e4c3f415 Linus Torvalds 2005-04-16 1129 pCardInfo->si_card_model[2] = '2';
^1da177e4c3f415 Linus Torvalds 2005-04-16 1130 break;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1131 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 1132 } else {
47b5d69c4aa753f James Bottomley 2005-04-24 1133 temp = FPT_utilEERead(ioport, (MODEL_NUMB_0 / 2));
db038cf86fc63d3 Alexey Dobriyan 2006-03-08 1134 pCardInfo->si_card_model[0] = (unsigned char)(temp >> 8);
47b5d69c4aa753f James Bottomley 2005-04-24 1135 temp = FPT_utilEERead(ioport, (MODEL_NUMB_2 / 2));
^1da177e4c3f415 Linus Torvalds 2005-04-16 1136
db038cf86fc63d3 Alexey Dobriyan 2006-03-08 1137 pCardInfo->si_card_model[1] = (unsigned char)(temp & 0x00FF);
db038cf86fc63d3 Alexey Dobriyan 2006-03-08 1138 pCardInfo->si_card_model[2] = (unsigned char)(temp >> 8);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1139 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 1140
5c04a7b8981f285 Alexey Dobriyan 2006-03-08 1141 if (pCardInfo->si_card_model[1] == '3') {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1142 if (RD_HARPOON(ioport + hp_ee_ctrl) & BIT(7))
^1da177e4c3f415 Linus Torvalds 2005-04-16 1143 pCardInfo->si_flags |= LOW_BYTE_TERM;
5c04a7b8981f285 Alexey Dobriyan 2006-03-08 1144 } else if (pCardInfo->si_card_model[2] == '0') {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1145 temp = RD_HARPOON(ioport + hp_xfer_pad);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1146 WR_HARPOON(ioport + hp_xfer_pad, (temp & ~BIT(4)));
^1da177e4c3f415 Linus Torvalds 2005-04-16 1147 if (RD_HARPOON(ioport + hp_ee_ctrl) & BIT(7))
^1da177e4c3f415 Linus Torvalds 2005-04-16 1148 pCardInfo->si_flags |= LOW_BYTE_TERM;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1149 WR_HARPOON(ioport + hp_xfer_pad, (temp | BIT(4)));
^1da177e4c3f415 Linus Torvalds 2005-04-16 1150 if (RD_HARPOON(ioport + hp_ee_ctrl) & BIT(7))
^1da177e4c3f415 Linus Torvalds 2005-04-16 1151 pCardInfo->si_flags |= HIGH_BYTE_TERM;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1152 WR_HARPOON(ioport + hp_xfer_pad, temp);
5c04a7b8981f285 Alexey Dobriyan 2006-03-08 1153 } else {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1154 temp = RD_HARPOON(ioport + hp_ee_ctrl);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1155 temp2 = RD_HARPOON(ioport + hp_xfer_pad);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1156 WR_HARPOON(ioport + hp_ee_ctrl, (temp | SEE_CS));
^1da177e4c3f415 Linus Torvalds 2005-04-16 1157 WR_HARPOON(ioport + hp_xfer_pad, (temp2 | BIT(4)));
^1da177e4c3f415 Linus Torvalds 2005-04-16 1158 temp3 = 0;
5c04a7b8981f285 Alexey Dobriyan 2006-03-08 1159 for (i = 0; i < 8; i++) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1160 temp3 <<= 1;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1161 if (!(RD_HARPOON(ioport + hp_ee_ctrl) & BIT(7)))
^1da177e4c3f415 Linus Torvalds 2005-04-16 1162 temp3 |= 1;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1163 WR_HARPOON(ioport + hp_xfer_pad, (temp2 & ~BIT(4)));
^1da177e4c3f415 Linus Torvalds 2005-04-16 1164 WR_HARPOON(ioport + hp_xfer_pad, (temp2 | BIT(4)));
^1da177e4c3f415 Linus Torvalds 2005-04-16 1165 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 1166 WR_HARPOON(ioport + hp_ee_ctrl, temp);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1167 WR_HARPOON(ioport + hp_xfer_pad, temp2);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1168 if (!(temp3 & BIT(7)))
^1da177e4c3f415 Linus Torvalds 2005-04-16 1169 pCardInfo->si_flags |= LOW_BYTE_TERM;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1170 if (!(temp3 & BIT(6)))
^1da177e4c3f415 Linus Torvalds 2005-04-16 1171 pCardInfo->si_flags |= HIGH_BYTE_TERM;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1172 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 1173
^1da177e4c3f415 Linus Torvalds 2005-04-16 1174 ARAM_ACCESS(ioport);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1175
^1da177e4c3f415 Linus Torvalds 2005-04-16 1176 for (i = 0; i < 4; i++) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1177
^1da177e4c3f415 Linus Torvalds 2005-04-16 1178 pCardInfo->si_XlatInfo[i] =
^1da177e4c3f415 Linus Torvalds 2005-04-16 1179 RD_HARPOON(ioport + hp_aramBase + BIOS_DATA_OFFSET + i);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1180 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 1181
^1da177e4c3f415 Linus Torvalds 2005-04-16 1182 /* return with -1 if no sort, else return with
^1da177e4c3f415 Linus Torvalds 2005-04-16 1183 logical card number sorted by BIOS (zero-based) */
^1da177e4c3f415 Linus Torvalds 2005-04-16 1184
^1da177e4c3f415 Linus Torvalds 2005-04-16 @1185 pCardInfo->si_relative_cardnum =
5c04a7b8981f285 Alexey Dobriyan 2006-03-08 1186 (unsigned
5c04a7b8981f285 Alexey Dobriyan 2006-03-08 1187 char)(RD_HARPOON(ioport + hp_aramBase + BIOS_RELATIVE_CARD) - 1);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1188
^1da177e4c3f415 Linus Torvalds 2005-04-16 1189 SGRAM_ACCESS(ioport);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1190
47b5d69c4aa753f James Bottomley 2005-04-24 1191 FPT_s_PhaseTbl[0] = FPT_phaseDataOut;
47b5d69c4aa753f James Bottomley 2005-04-24 1192 FPT_s_PhaseTbl[1] = FPT_phaseDataIn;
47b5d69c4aa753f James Bottomley 2005-04-24 1193 FPT_s_PhaseTbl[2] = FPT_phaseIllegal;
47b5d69c4aa753f James Bottomley 2005-04-24 1194 FPT_s_PhaseTbl[3] = FPT_phaseIllegal;
47b5d69c4aa753f James Bottomley 2005-04-24 1195 FPT_s_PhaseTbl[4] = FPT_phaseCommand;
47b5d69c4aa753f James Bottomley 2005-04-24 1196 FPT_s_PhaseTbl[5] = FPT_phaseStatus;
47b5d69c4aa753f James Bottomley 2005-04-24 1197 FPT_s_PhaseTbl[6] = FPT_phaseMsgOut;
47b5d69c4aa753f James Bottomley 2005-04-24 1198 FPT_s_PhaseTbl[7] = FPT_phaseMsgIn;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1199
^1da177e4c3f415 Linus Torvalds 2005-04-16 1200 pCardInfo->si_present = 0x01;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1201
5c1b85e209af41c Alexey Dobriyan 2006-03-08 1202 return 0;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1203 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 1204
:::::: The code at line 1185 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds(a)ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds(a)ppc970.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
arch/powerpc/lib/sstep.c:1172:21: error: variable 'suffix' set but not used
by kernel test robot
Hi Jordan,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c3d0e3fd41b7f0f5d5d5b6022ab7e813f04ea727
commit: 650b55b707fdfa764e9f2b81314d3eb4216fb962 powerpc: Add prefixed instructions to instruction data type
date: 1 year ago
config: powerpc-klondike_defconfig (attached as .config)
compiler: powerpc-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/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 650b55b707fdfa764e9f2b81314d3eb4216fb962
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.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 errors (new ones prefixed by >>):
arch/powerpc/lib/sstep.c: In function 'analyse_instr':
>> arch/powerpc/lib/sstep.c:1172:21: error: variable 'suffix' set but not used [-Werror=unused-but-set-variable]
1172 | unsigned int word, suffix;
| ^~~~~~
arch/powerpc/lib/sstep.c:1168:31: error: variable 'rc' set but not used [-Werror=unused-but-set-variable]
1168 | unsigned int opcode, ra, rb, rc, rd, spr, u;
| ^~
cc1: all warnings being treated as errors
vim +/suffix +1172 arch/powerpc/lib/sstep.c
1153
1154 /*
1155 * Decode an instruction, and return information about it in *op
1156 * without changing *regs.
1157 * Integer arithmetic and logical instructions, branches, and barrier
1158 * instructions can be emulated just using the information in *op.
1159 *
1160 * Return value is 1 if the instruction can be emulated just by
1161 * updating *regs with the information in *op, -1 if we need the
1162 * GPRs but *regs doesn't contain the full register set, or 0
1163 * otherwise.
1164 */
1165 int analyse_instr(struct instruction_op *op, const struct pt_regs *regs,
1166 struct ppc_inst instr)
1167 {
1168 unsigned int opcode, ra, rb, rc, rd, spr, u;
1169 unsigned long int imm;
1170 unsigned long int val, val2;
1171 unsigned int mb, me, sh;
> 1172 unsigned int word, suffix;
1173 long ival;
1174
1175 word = ppc_inst_val(instr);
1176 suffix = ppc_inst_suffix(instr);
1177
1178 op->type = COMPUTE;
1179
1180 opcode = ppc_inst_primary_opcode(instr);
1181 switch (opcode) {
1182 case 16: /* bc */
1183 op->type = BRANCH;
1184 imm = (signed short)(word & 0xfffc);
1185 if ((word & 2) == 0)
1186 imm += regs->nip;
1187 op->val = truncate_if_32bit(regs->msr, imm);
1188 if (word & 1)
1189 op->type |= SETLK;
1190 if (branch_taken(word, regs, op))
1191 op->type |= BRTAKEN;
1192 return 1;
1193 #ifdef CONFIG_PPC64
1194 case 17: /* sc */
1195 if ((word & 0xfe2) == 2)
1196 op->type = SYSCALL;
1197 else
1198 op->type = UNKNOWN;
1199 return 0;
1200 #endif
1201 case 18: /* b */
1202 op->type = BRANCH | BRTAKEN;
1203 imm = word & 0x03fffffc;
1204 if (imm & 0x02000000)
1205 imm -= 0x04000000;
1206 if ((word & 2) == 0)
1207 imm += regs->nip;
1208 op->val = truncate_if_32bit(regs->msr, imm);
1209 if (word & 1)
1210 op->type |= SETLK;
1211 return 1;
1212 case 19:
1213 switch ((word >> 1) & 0x3ff) {
1214 case 0: /* mcrf */
1215 op->type = COMPUTE + SETCC;
1216 rd = 7 - ((word >> 23) & 0x7);
1217 ra = 7 - ((word >> 18) & 0x7);
1218 rd *= 4;
1219 ra *= 4;
1220 val = (regs->ccr >> ra) & 0xf;
1221 op->ccval = (regs->ccr & ~(0xfUL << rd)) | (val << rd);
1222 return 1;
1223
1224 case 16: /* bclr */
1225 case 528: /* bcctr */
1226 op->type = BRANCH;
1227 imm = (word & 0x400)? regs->ctr: regs->link;
1228 op->val = truncate_if_32bit(regs->msr, imm);
1229 if (word & 1)
1230 op->type |= SETLK;
1231 if (branch_taken(word, regs, op))
1232 op->type |= BRTAKEN;
1233 return 1;
1234
1235 case 18: /* rfid, scary */
1236 if (regs->msr & MSR_PR)
1237 goto priv;
1238 op->type = RFI;
1239 return 0;
1240
1241 case 150: /* isync */
1242 op->type = BARRIER | BARRIER_ISYNC;
1243 return 1;
1244
1245 case 33: /* crnor */
1246 case 129: /* crandc */
1247 case 193: /* crxor */
1248 case 225: /* crnand */
1249 case 257: /* crand */
1250 case 289: /* creqv */
1251 case 417: /* crorc */
1252 case 449: /* cror */
1253 op->type = COMPUTE + SETCC;
1254 ra = (word >> 16) & 0x1f;
1255 rb = (word >> 11) & 0x1f;
1256 rd = (word >> 21) & 0x1f;
1257 ra = (regs->ccr >> (31 - ra)) & 1;
1258 rb = (regs->ccr >> (31 - rb)) & 1;
1259 val = (word >> (6 + ra * 2 + rb)) & 1;
1260 op->ccval = (regs->ccr & ~(1UL << (31 - rd))) |
1261 (val << (31 - rd));
1262 return 1;
1263 }
1264 break;
1265 case 31:
1266 switch ((word >> 1) & 0x3ff) {
1267 case 598: /* sync */
1268 op->type = BARRIER + BARRIER_SYNC;
1269 #ifdef __powerpc64__
1270 switch ((word >> 21) & 3) {
1271 case 1: /* lwsync */
1272 op->type = BARRIER + BARRIER_LWSYNC;
1273 break;
1274 case 2: /* ptesync */
1275 op->type = BARRIER + BARRIER_PTESYNC;
1276 break;
1277 }
1278 #endif
1279 return 1;
1280
1281 case 854: /* eieio */
1282 op->type = BARRIER + BARRIER_EIEIO;
1283 return 1;
1284 }
1285 break;
1286 }
1287
1288 /* Following cases refer to regs->gpr[], so we need all regs */
1289 if (!FULL_REGS(regs))
1290 return -1;
1291
1292 rd = (word >> 21) & 0x1f;
1293 ra = (word >> 16) & 0x1f;
1294 rb = (word >> 11) & 0x1f;
1295 rc = (word >> 6) & 0x1f;
1296
1297 switch (opcode) {
1298 #ifdef __powerpc64__
1299 case 2: /* tdi */
1300 if (rd & trap_compare(regs->gpr[ra], (short) word))
1301 goto trap;
1302 return 1;
1303 #endif
1304 case 3: /* twi */
1305 if (rd & trap_compare((int)regs->gpr[ra], (short) word))
1306 goto trap;
1307 return 1;
1308
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[kees:kspp/memcpy/next-20210519/v0 51/53] kernel/panic.c:739:6: warning: no previous prototype for function '__runtime_write_check'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git kspp/memcpy/next-20210519/v0
head: 48fff7f29af65f2ab9e56bc71a0ef652f91a68cd
commit: 03404e22f4e88583981e087b1c28cd877f3f627a [51/53] [DEBUG] fortify: Add additional instrumentation
config: arm64-randconfig-r033-20210519 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project bf9ef3efaa99c02e7bfc4c57207301b8de39a278)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git/commit/?id...
git remote add kees https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git
git fetch --no-tags kees kspp/memcpy/next-20210519/v0
git checkout 03404e22f4e88583981e087b1c28cd877f3f627a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
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 >>):
kernel/panic.c:577:6: warning: no previous prototype for function '__warn' [-Wmissing-prototypes]
void __warn(const char *file, int line, void *caller, unsigned taint,
^
kernel/panic.c:577:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __warn(const char *file, int line, void *caller, unsigned taint,
^
static
kernel/panic.c:641:6: warning: no previous prototype for function '__warn_printk' [-Wmissing-prototypes]
void __warn_printk(const char *fmt, ...)
^
kernel/panic.c:641:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __warn_printk(const char *fmt, ...)
^
static
>> kernel/panic.c:739:6: warning: no previous prototype for function '__runtime_write_check' [-Wmissing-prototypes]
void __runtime_write_check(void)
^
kernel/panic.c:739:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __runtime_write_check(void)
^
static
>> kernel/panic.c:743:6: warning: no previous prototype for function '__runtime_read_check' [-Wmissing-prototypes]
void __runtime_read_check(void)
^
kernel/panic.c:743:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __runtime_read_check(void)
^
static
4 warnings generated.
vim +/__runtime_write_check +739 kernel/panic.c
738
> 739 void __runtime_write_check(void)
740 { }
741 EXPORT_SYMBOL(__runtime_write_check);
742
> 743 void __runtime_read_check(void)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[nomadik:ixp4xx-cleanup-v5.13-rc1 10/25] arch/arm/mach-ixp4xx/common-pci.c:143:5: warning: no previous prototype for 'ixp4xx_pci_write'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git ixp4xx-cleanup-v5.13-rc1
head: 8574f87706366e1de4541fff047660ac06462cd3
commit: b758cf1a8b4e468b6a58d49620dd163ff88fdab4 [10/25] ARM/ixp4xx: Make NEED_MACH_IO_H optional
config: arm-ixp4xx_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git/...
git remote add nomadik https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git
git fetch --no-tags nomadik ixp4xx-cleanup-v5.13-rc1
git checkout b758cf1a8b4e468b6a58d49620dd163ff88fdab4
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
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 >>):
arch/arm/mach-ixp4xx/common-pci.c:94:5: warning: no previous prototype for 'ixp4xx_pci_read_errata' [-Wmissing-prototypes]
94 | int ixp4xx_pci_read_errata(u32 addr, u32 cmd, u32* data)
| ^~~~~~~~~~~~~~~~~~~~~~
arch/arm/mach-ixp4xx/common-pci.c:121:5: warning: no previous prototype for 'ixp4xx_pci_read_no_errata' [-Wmissing-prototypes]
121 | int ixp4xx_pci_read_no_errata(u32 addr, u32 cmd, u32* data)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/arm/mach-ixp4xx/common-pci.c:143:5: warning: no previous prototype for 'ixp4xx_pci_write' [-Wmissing-prototypes]
143 | int ixp4xx_pci_write(u32 addr, u32 cmd, u32 data)
| ^~~~~~~~~~~~~~~~
vim +/ixp4xx_pci_write +143 arch/arm/mach-ixp4xx/common-pci.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 93
^1da177e4c3f41 Linus Torvalds 2005-04-16 @94 int ixp4xx_pci_read_errata(u32 addr, u32 cmd, u32* data)
^1da177e4c3f41 Linus Torvalds 2005-04-16 95 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 96 unsigned long flags;
^1da177e4c3f41 Linus Torvalds 2005-04-16 97 int retval = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 98 int i;
^1da177e4c3f41 Linus Torvalds 2005-04-16 99
bd31b85960a7fc Thomas Gleixner 2009-07-03 100 raw_spin_lock_irqsave(&ixp4xx_pci_lock, flags);
^1da177e4c3f41 Linus Torvalds 2005-04-16 101
^1da177e4c3f41 Linus Torvalds 2005-04-16 102 *PCI_NP_AD = addr;
^1da177e4c3f41 Linus Torvalds 2005-04-16 103
^1da177e4c3f41 Linus Torvalds 2005-04-16 104 /*
^1da177e4c3f41 Linus Torvalds 2005-04-16 105 * PCI workaround - only works if NP PCI space reads have
^1da177e4c3f41 Linus Torvalds 2005-04-16 106 * no side effects!!! Read 8 times. last one will be good.
^1da177e4c3f41 Linus Torvalds 2005-04-16 107 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 108 for (i = 0; i < 8; i++) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 109 *PCI_NP_CBE = cmd;
^1da177e4c3f41 Linus Torvalds 2005-04-16 110 *data = *PCI_NP_RDATA;
^1da177e4c3f41 Linus Torvalds 2005-04-16 111 *data = *PCI_NP_RDATA;
^1da177e4c3f41 Linus Torvalds 2005-04-16 112 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 113
^1da177e4c3f41 Linus Torvalds 2005-04-16 114 if(check_master_abort())
^1da177e4c3f41 Linus Torvalds 2005-04-16 115 retval = 1;
^1da177e4c3f41 Linus Torvalds 2005-04-16 116
bd31b85960a7fc Thomas Gleixner 2009-07-03 117 raw_spin_unlock_irqrestore(&ixp4xx_pci_lock, flags);
^1da177e4c3f41 Linus Torvalds 2005-04-16 118 return retval;
^1da177e4c3f41 Linus Torvalds 2005-04-16 119 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 120
^1da177e4c3f41 Linus Torvalds 2005-04-16 121 int ixp4xx_pci_read_no_errata(u32 addr, u32 cmd, u32* data)
^1da177e4c3f41 Linus Torvalds 2005-04-16 122 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 123 unsigned long flags;
^1da177e4c3f41 Linus Torvalds 2005-04-16 124 int retval = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 125
bd31b85960a7fc Thomas Gleixner 2009-07-03 126 raw_spin_lock_irqsave(&ixp4xx_pci_lock, flags);
^1da177e4c3f41 Linus Torvalds 2005-04-16 127
^1da177e4c3f41 Linus Torvalds 2005-04-16 128 *PCI_NP_AD = addr;
^1da177e4c3f41 Linus Torvalds 2005-04-16 129
^1da177e4c3f41 Linus Torvalds 2005-04-16 130 /* set up and execute the read */
^1da177e4c3f41 Linus Torvalds 2005-04-16 131 *PCI_NP_CBE = cmd;
^1da177e4c3f41 Linus Torvalds 2005-04-16 132
^1da177e4c3f41 Linus Torvalds 2005-04-16 133 /* the result of the read is now in NP_RDATA */
^1da177e4c3f41 Linus Torvalds 2005-04-16 134 *data = *PCI_NP_RDATA;
^1da177e4c3f41 Linus Torvalds 2005-04-16 135
^1da177e4c3f41 Linus Torvalds 2005-04-16 136 if(check_master_abort())
^1da177e4c3f41 Linus Torvalds 2005-04-16 137 retval = 1;
^1da177e4c3f41 Linus Torvalds 2005-04-16 138
bd31b85960a7fc Thomas Gleixner 2009-07-03 139 raw_spin_unlock_irqrestore(&ixp4xx_pci_lock, flags);
^1da177e4c3f41 Linus Torvalds 2005-04-16 140 return retval;
^1da177e4c3f41 Linus Torvalds 2005-04-16 141 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 142
^1da177e4c3f41 Linus Torvalds 2005-04-16 @143 int ixp4xx_pci_write(u32 addr, u32 cmd, u32 data)
^1da177e4c3f41 Linus Torvalds 2005-04-16 144 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 145 unsigned long flags;
^1da177e4c3f41 Linus Torvalds 2005-04-16 146 int retval = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 147
bd31b85960a7fc Thomas Gleixner 2009-07-03 148 raw_spin_lock_irqsave(&ixp4xx_pci_lock, flags);
^1da177e4c3f41 Linus Torvalds 2005-04-16 149
^1da177e4c3f41 Linus Torvalds 2005-04-16 150 *PCI_NP_AD = addr;
^1da177e4c3f41 Linus Torvalds 2005-04-16 151
^1da177e4c3f41 Linus Torvalds 2005-04-16 152 /* set up the write */
^1da177e4c3f41 Linus Torvalds 2005-04-16 153 *PCI_NP_CBE = cmd;
^1da177e4c3f41 Linus Torvalds 2005-04-16 154
^1da177e4c3f41 Linus Torvalds 2005-04-16 155 /* execute the write by writing to NP_WDATA */
^1da177e4c3f41 Linus Torvalds 2005-04-16 156 *PCI_NP_WDATA = data;
^1da177e4c3f41 Linus Torvalds 2005-04-16 157
^1da177e4c3f41 Linus Torvalds 2005-04-16 158 if(check_master_abort())
^1da177e4c3f41 Linus Torvalds 2005-04-16 159 retval = 1;
^1da177e4c3f41 Linus Torvalds 2005-04-16 160
bd31b85960a7fc Thomas Gleixner 2009-07-03 161 raw_spin_unlock_irqrestore(&ixp4xx_pci_lock, flags);
^1da177e4c3f41 Linus Torvalds 2005-04-16 162 return retval;
^1da177e4c3f41 Linus Torvalds 2005-04-16 163 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 164
:::::: The code at line 143 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds(a)ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds(a)ppc970.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[kees:kspp/memcpy/next-20210519/v0 51/53] kernel/panic.c:739:6: warning: no previous prototype for '__runtime_write_check'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git kspp/memcpy/next-20210519/v0
head: 48fff7f29af65f2ab9e56bc71a0ef652f91a68cd
commit: 03404e22f4e88583981e087b1c28cd877f3f627a [51/53] [DEBUG] fortify: Add additional instrumentation
config: i386-tinyconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git/commit/?id...
git remote add kees https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git
git fetch --no-tags kees kspp/memcpy/next-20210519/v0
git checkout 03404e22f4e88583981e087b1c28cd877f3f627a
# save the attached .config to linux build tree
make W=1 ARCH=i386
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 >>):
kernel/panic.c:577:6: warning: no previous prototype for '__warn' [-Wmissing-prototypes]
577 | void __warn(const char *file, int line, void *caller, unsigned taint,
| ^~~~~~
kernel/panic.c: In function '__warn':
kernel/panic.c:591:3: warning: function '__warn' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
591 | vprintk(args->fmt, args->args);
| ^~~~~~~
kernel/panic.c: At top level:
kernel/panic.c:641:6: warning: no previous prototype for '__warn_printk' [-Wmissing-prototypes]
641 | void __warn_printk(const char *fmt, ...)
| ^~~~~~~~~~~~~
kernel/panic.c: In function '__warn_printk':
kernel/panic.c:648:2: warning: function '__warn_printk' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
648 | vprintk(fmt, args);
| ^~~~~~~
kernel/panic.c: At top level:
>> kernel/panic.c:739:6: warning: no previous prototype for '__runtime_write_check' [-Wmissing-prototypes]
739 | void __runtime_write_check(void)
| ^~~~~~~~~~~~~~~~~~~~~
>> kernel/panic.c:743:6: warning: no previous prototype for '__runtime_read_check' [-Wmissing-prototypes]
743 | void __runtime_read_check(void)
| ^~~~~~~~~~~~~~~~~~~~
vim +/__runtime_write_check +739 kernel/panic.c
738
> 739 void __runtime_write_check(void)
740 { }
741 EXPORT_SYMBOL(__runtime_write_check);
742
> 743 void __runtime_read_check(void)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c:721 dpaa2_eth_build_sg_fd_single_buf() warn: overwrite may leak 'sgt_buf'
by Dan Carpenter
[ Why is kbuild sending out 8 month old bug reports??? -dan ]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: acd3d28594536e9096c1ea76c5867d8a68babef6
commit: 5d8dccf8bad96bdc5bd5594344ff67539cf3a733 dpaa2-eth: add a dpaa2_eth_ prefix to all functions in dpaa2-eth.c
config: arm-randconfig-m031-20210428 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c:721 dpaa2_eth_build_sg_fd_single_buf() warn: overwrite may leak 'sgt_buf'
vim +/sgt_buf +721 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
5d8dccf8bad96b drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-08-31 696 static int dpaa2_eth_build_sg_fd_single_buf(struct dpaa2_eth_priv *priv,
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 697 struct sk_buff *skb,
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 698 struct dpaa2_fd *fd)
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 699 {
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 700 struct device *dev = priv->net_dev->dev.parent;
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 701 struct dpaa2_eth_sgt_cache *sgt_cache;
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 702 struct dpaa2_sg_entry *sgt;
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 703 struct dpaa2_eth_swa *swa;
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 704 dma_addr_t addr, sgt_addr;
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 705 void *sgt_buf = NULL;
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 706 int sgt_buf_size;
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 707 int err;
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 708
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 709 /* Prepare the HW SGT structure */
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 710 sgt_cache = this_cpu_ptr(priv->sgt_cache);
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 711 sgt_buf_size = priv->tx_data_offset + sizeof(struct dpaa2_sg_entry);
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 712
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 713 if (sgt_cache->count == 0)
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 714 sgt_buf = kzalloc(sgt_buf_size + DPAA2_ETH_TX_BUF_ALIGN,
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 715 GFP_ATOMIC);
sgt_buf is assigned here.
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 716 else
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 717 sgt_buf = sgt_cache->buf[--sgt_cache->count];
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 718 if (unlikely(!sgt_buf))
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 719 return -ENOMEM;
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 720
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 @721 sgt_buf = PTR_ALIGN(sgt_buf, DPAA2_ETH_TX_BUF_ALIGN);
We're losing track of the original "sgt_buf" pointer so we won't be
able to pass it to kfree().
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 722 sgt = (struct dpaa2_sg_entry *)(sgt_buf + priv->tx_data_offset);
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 723
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 724 addr = dma_map_single(dev, skb->data, skb->len, DMA_BIDIRECTIONAL);
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 725 if (unlikely(dma_mapping_error(dev, addr))) {
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 726 err = -ENOMEM;
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 727 goto data_map_failed;
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 728 }
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 729
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 730 /* Fill in the HW SGT structure */
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 731 dpaa2_sg_set_addr(sgt, addr);
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 732 dpaa2_sg_set_len(sgt, skb->len);
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 733 dpaa2_sg_set_final(sgt, true);
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 734
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 735 /* Store the skb backpointer in the SGT buffer */
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 736 swa = (struct dpaa2_eth_swa *)sgt_buf;
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 737 swa->type = DPAA2_ETH_SWA_SINGLE;
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 738 swa->single.skb = skb;
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 739 swa->sg.sgt_size = sgt_buf_size;
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 740
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 741 /* Separately map the SGT buffer */
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 742 sgt_addr = dma_map_single(dev, sgt_buf, sgt_buf_size, DMA_BIDIRECTIONAL);
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 743 if (unlikely(dma_mapping_error(dev, sgt_addr))) {
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 744 err = -ENOMEM;
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 745 goto sgt_map_failed;
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 746 }
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 747
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 748 dpaa2_fd_set_offset(fd, priv->tx_data_offset);
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 749 dpaa2_fd_set_format(fd, dpaa2_fd_sg);
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 750 dpaa2_fd_set_addr(fd, sgt_addr);
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 751 dpaa2_fd_set_len(fd, skb->len);
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 752 dpaa2_fd_set_ctrl(fd, FD_CTRL_PTA);
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 753
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 754 if (priv->tx_tstamp && skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)
5d8dccf8bad96b drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-08-31 755 dpaa2_eth_enable_tx_tstamp(fd, sgt_buf);
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 756
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 757 return 0;
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 758
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 759 sgt_map_failed:
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 760 dma_unmap_single(dev, addr, skb->len, DMA_BIDIRECTIONAL);
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 761 data_map_failed:
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 762 if (sgt_cache->count >= DPAA2_ETH_SGT_CACHE_SIZE)
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 763 kfree(sgt_buf);
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 764 else
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 765 sgt_cache->buf[sgt_cache->count++] = sgt_buf;
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 766
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 767 return err;
d70446ee1f406e drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c Ioana Ciornei 2020-06-29 768 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[kbuild] [linux-next:master 7132/11526] drivers/bluetooth/btusb.c:3775 btusb_mtk_setup() error: uninitialized symbol 'fw_version'.
by Dan Carpenter
[ Why is linux-mm CC'd on these patches??? - dan ]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 6553715b6db5ff5d4898895dad1b2926cfe406cf
commit: fc342c4dc408754f50f19dc832152fbb4b73f1e6 [7132/11526] Bluetooth: btusb: Add protocol support for MediaTek MT7921U USB devices
config: parisc-randconfig-m031-20210216 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
New smatch warnings:
drivers/bluetooth/btusb.c:3775 btusb_mtk_setup() error: uninitialized symbol 'fw_version'.
Old smatch warnings:
drivers/bluetooth/btusb.c:2201 btusb_setup_intel() warn: inconsistent indenting
vim +/fw_version +3775 drivers/bluetooth/btusb.c
a1c49c434e15050 Sean Wang 2019-06-02 3729 static int btusb_mtk_setup(struct hci_dev *hdev)
a1c49c434e15050 Sean Wang 2019-06-02 3730 {
a1c49c434e15050 Sean Wang 2019-06-02 3731 struct btusb_data *data = hci_get_drvdata(hdev);
a1c49c434e15050 Sean Wang 2019-06-02 3732 struct btmtk_hci_wmt_params wmt_params;
a1c49c434e15050 Sean Wang 2019-06-02 3733 ktime_t calltime, delta, rettime;
a1c49c434e15050 Sean Wang 2019-06-02 3734 struct btmtk_tci_sleep tci_sleep;
a1c49c434e15050 Sean Wang 2019-06-02 3735 unsigned long long duration;
a1c49c434e15050 Sean Wang 2019-06-02 3736 struct sk_buff *skb;
a1c49c434e15050 Sean Wang 2019-06-02 3737 const char *fwname;
a1c49c434e15050 Sean Wang 2019-06-02 3738 int err, status;
a1c49c434e15050 Sean Wang 2019-06-02 3739 u32 dev_id;
fc342c4dc408754 Mark Chen 2021-02-02 3740 char fw_bin_name[64];
fc342c4dc408754 Mark Chen 2021-02-02 3741 u32 fw_version;
a1c49c434e15050 Sean Wang 2019-06-02 3742 u8 param;
a1c49c434e15050 Sean Wang 2019-06-02 3743
a1c49c434e15050 Sean Wang 2019-06-02 3744 calltime = ktime_get();
a1c49c434e15050 Sean Wang 2019-06-02 3745
48c13301e6baba5 Mark Chen 2021-02-02 3746 err = btusb_mtk_id_get(data, 0x80000008, &dev_id);
a1c49c434e15050 Sean Wang 2019-06-02 3747 if (err < 0) {
a1c49c434e15050 Sean Wang 2019-06-02 3748 bt_dev_err(hdev, "Failed to get device id (%d)", err);
a1c49c434e15050 Sean Wang 2019-06-02 3749 return err;
a1c49c434e15050 Sean Wang 2019-06-02 3750 }
a1c49c434e15050 Sean Wang 2019-06-02 3751
fc342c4dc408754 Mark Chen 2021-02-02 3752 if (!dev_id) {
fc342c4dc408754 Mark Chen 2021-02-02 3753 err = btusb_mtk_id_get(data, 0x70010200, &dev_id);
fc342c4dc408754 Mark Chen 2021-02-02 3754 if (err < 0) {
fc342c4dc408754 Mark Chen 2021-02-02 3755 bt_dev_err(hdev, "Failed to get device id (%d)", err);
fc342c4dc408754 Mark Chen 2021-02-02 3756 return err;
fc342c4dc408754 Mark Chen 2021-02-02 3757 }
fc342c4dc408754 Mark Chen 2021-02-02 3758 err = btusb_mtk_id_get(data, 0x80021004, &fw_version);
fc342c4dc408754 Mark Chen 2021-02-02 3759 if (err < 0) {
fc342c4dc408754 Mark Chen 2021-02-02 3760 bt_dev_err(hdev, "Failed to get fw version (%d)", err);
fc342c4dc408754 Mark Chen 2021-02-02 3761 return err;
fc342c4dc408754 Mark Chen 2021-02-02 3762 }
fc342c4dc408754 Mark Chen 2021-02-02 3763 }
"fw_version" not initialized on else path.
fc342c4dc408754 Mark Chen 2021-02-02 3764
a1c49c434e15050 Sean Wang 2019-06-02 3765 switch (dev_id) {
9ce67c3235be71e Sean Wang 2019-06-02 3766 case 0x7663:
9ce67c3235be71e Sean Wang 2019-06-02 3767 fwname = FIRMWARE_MT7663;
9ce67c3235be71e Sean Wang 2019-06-02 3768 break;
a1c49c434e15050 Sean Wang 2019-06-02 3769 case 0x7668:
a1c49c434e15050 Sean Wang 2019-06-02 3770 fwname = FIRMWARE_MT7668;
a1c49c434e15050 Sean Wang 2019-06-02 3771 break;
fc342c4dc408754 Mark Chen 2021-02-02 3772 case 0x7961:
fc342c4dc408754 Mark Chen 2021-02-02 3773 snprintf(fw_bin_name, sizeof(fw_bin_name),
fc342c4dc408754 Mark Chen 2021-02-02 3774 "mediatek/BT_RAM_CODE_MT%04x_1_%x_hdr.bin",
fc342c4dc408754 Mark Chen 2021-02-02 @3775 dev_id & 0xffff, (fw_version & 0xff) + 1);
^^^^^^^^^^
fc342c4dc408754 Mark Chen 2021-02-02 3776 err = btusb_mtk_setup_firmware_79xx(hdev, fw_bin_name);
fc342c4dc408754 Mark Chen 2021-02-02 3777
fc342c4dc408754 Mark Chen 2021-02-02 3778 /* Enable Bluetooth protocol */
fc342c4dc408754 Mark Chen 2021-02-02 3779 param = 1;
fc342c4dc408754 Mark Chen 2021-02-02 3780 wmt_params.op = BTMTK_WMT_FUNC_CTRL;
fc342c4dc408754 Mark Chen 2021-02-02 3781 wmt_params.flag = 0;
fc342c4dc408754 Mark Chen 2021-02-02 3782 wmt_params.dlen = sizeof(param);
fc342c4dc408754 Mark Chen 2021-02-02 3783 wmt_params.data = ¶m;
fc342c4dc408754 Mark Chen 2021-02-02 3784 wmt_params.status = NULL;
fc342c4dc408754 Mark Chen 2021-02-02 3785
fc342c4dc408754 Mark Chen 2021-02-02 3786 err = btusb_mtk_hci_wmt_sync(hdev, &wmt_params);
fc342c4dc408754 Mark Chen 2021-02-02 3787 if (err < 0) {
fc342c4dc408754 Mark Chen 2021-02-02 3788 bt_dev_err(hdev, "Failed to send wmt func ctrl (%d)", err);
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
_______________________________________________
kbuild mailing list -- kbuild(a)lists.01.org
To unsubscribe send an email to kbuild-leave(a)lists.01.org
1 year, 4 months
[agd5f:drm-next 422/435] drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c:383:22: warning: variable 'ring' set but not used
by kernel test robot
tree: https://gitlab.freedesktop.org/agd5f/linux.git drm-next
head: c1c4d8efdddec8a0ccc8525b29740640bd652ce8
commit: a5aef8f0ab6adb3e41f5e739ea1b794989a2495a [422/435] drm/amdgpu: stop touching sched.ready in the backend
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git remote add agd5f https://gitlab.freedesktop.org/agd5f/linux.git
git fetch --no-tags agd5f drm-next
git checkout a5aef8f0ab6adb3e41f5e739ea1b794989a2495a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc
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/gpu/drm/amd/amdgpu/vcn_v3_0.c: In function 'vcn_v3_0_hw_fini':
>> drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c:383:22: warning: variable 'ring' set but not used [-Wunused-but-set-variable]
383 | struct amdgpu_ring *ring;
| ^~~~
--
drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c: In function 'jpeg_v2_5_hw_fini':
>> drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c:190:22: warning: variable 'ring' set but not used [-Wunused-but-set-variable]
190 | struct amdgpu_ring *ring;
| ^~~~
--
drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c: In function 'jpeg_v3_0_hw_fini':
>> drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c:162:22: warning: variable 'ring' set but not used [-Wunused-but-set-variable]
162 | struct amdgpu_ring *ring;
| ^~~~
vim +/ring +383 drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c
cf14826cdfb5c9f Leo Liu 2019-11-15 372
cf14826cdfb5c9f Leo Liu 2019-11-15 373 /**
cf14826cdfb5c9f Leo Liu 2019-11-15 374 * vcn_v3_0_hw_fini - stop the hardware block
cf14826cdfb5c9f Leo Liu 2019-11-15 375 *
cf14826cdfb5c9f Leo Liu 2019-11-15 376 * @handle: amdgpu_device pointer
cf14826cdfb5c9f Leo Liu 2019-11-15 377 *
cf14826cdfb5c9f Leo Liu 2019-11-15 378 * Stop the VCN block, mark ring as not ready any more
cf14826cdfb5c9f Leo Liu 2019-11-15 379 */
cf14826cdfb5c9f Leo Liu 2019-11-15 380 static int vcn_v3_0_hw_fini(void *handle)
cf14826cdfb5c9f Leo Liu 2019-11-15 381 {
cf14826cdfb5c9f Leo Liu 2019-11-15 382 struct amdgpu_device *adev = (struct amdgpu_device *)handle;
cf14826cdfb5c9f Leo Liu 2019-11-15 @383 struct amdgpu_ring *ring;
a5aef8f0ab6adb3 Christian König 2021-05-18 384 int i;
cf14826cdfb5c9f Leo Liu 2019-11-15 385
cf14826cdfb5c9f Leo Liu 2019-11-15 386 for (i = 0; i < adev->vcn.num_vcn_inst; ++i) {
cf14826cdfb5c9f Leo Liu 2019-11-15 387 if (adev->vcn.harvest_config & (1 << i))
cf14826cdfb5c9f Leo Liu 2019-11-15 388 continue;
cf14826cdfb5c9f Leo Liu 2019-11-15 389
cf14826cdfb5c9f Leo Liu 2019-11-15 390 ring = &adev->vcn.inst[i].ring_dec;
cf14826cdfb5c9f Leo Liu 2019-11-15 391
c8466cc0d2a419e Jack Zhang 2020-06-29 392 if (!amdgpu_sriov_vf(adev)) {
d00b0fa90f4e524 Boyuan Zhang 2020-04-02 393 if ((adev->pg_flags & AMD_PG_SUPPORT_VCN_DPG) ||
d00b0fa90f4e524 Boyuan Zhang 2020-04-02 394 (adev->vcn.cur_state != AMD_PG_STATE_GATE &&
c8466cc0d2a419e Jack Zhang 2020-06-29 395 RREG32_SOC15(VCN, i, mmUVD_STATUS))) {
cf14826cdfb5c9f Leo Liu 2019-11-15 396 vcn_v3_0_set_powergating_state(adev, AMD_PG_STATE_GATE);
c8466cc0d2a419e Jack Zhang 2020-06-29 397 }
c8466cc0d2a419e Jack Zhang 2020-06-29 398 }
cf14826cdfb5c9f Leo Liu 2019-11-15 399 }
cf14826cdfb5c9f Leo Liu 2019-11-15 400
cf14826cdfb5c9f Leo Liu 2019-11-15 401 return 0;
cf14826cdfb5c9f Leo Liu 2019-11-15 402 }
cf14826cdfb5c9f Leo Liu 2019-11-15 403
:::::: The code at line 383 was first introduced by commit
:::::: cf14826cdfb5c9fe10f98210d040b9d7486c381d drm/amdgpu: add VCN3.0 support for Sienna_Cichlid
:::::: TO: Leo Liu <leo.liu(a)amd.com>
:::::: CC: Alex Deucher <alexander.deucher(a)amd.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months