From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=192.198.163.16 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1792444116; b=WEd+Yp2AyEO9wVAgNoP/3uFpADn7xM9u4IMs9G9vK1v3OsZuMB5N7pVjBzuTDZcQdYhz LCt/T6jM/9LiL0keCjfd6aQ4j2KVxikJTxyNCuHeFjp8f0/IpoEq1qVSbo3fVMiJM7m24 uWwuf1LfQNbQTVIFmkjnuOzgebJkYysrF2sSIVrt2geYGI3M56locqOx7jCPWEdulrMAX 2btANFvS6NA266b8agt+HOhkI+HGVtWQJQsA8okLuU5ukULQB6vI0j4V7taCGDhkRfUe7 OJdiA5Ws+OUYvqvJYO3Z14Z5xIMkWXnfOh7hunfAZvWMZVjuW3BmC6uN6PTbvn2o9PA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792444116; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:Received:Date:From:To: Cc:Subject:Message-ID:User-Agent; bh=lYcn5v9hV8ASegfFnN1p2Dsvd+Vr0isrQj+jdNxImgw=; b=O9s7zs8xdKz26lwXyA4gvblVmt4sjdxIkVJjC/wPzhVVsXsU6Vv4IafVSlu3dwLmzrTl +6Mu2og3yeKiEQur4fq1lTck03o9oz7U2KB/aroMjpK+DvAlezPkJOGZUDVNxGh7SLDCh Bi4I6Jw8CjycVM+CRjromZDX2OGssEmK1SlfrAa2LAaWHlIGVFzFWA6Zr7yJkiPndWaFJ lCFPumN1mh+FgRN8sdjFqqaXbDmjr8pJmENjO9pD0T49Vj3PmQ8xkeqR2b7VC66fk7XmO OQQk0HEuyqQ5G/vTq7kCO6c2XMsJjKMCkhwLVOcPf5PO6XPX0ekmnZq6Li0pT/FzynA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=PeUq8QBS; arc=none smtp.remote-ip=192.198.163.16 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4E925606A320 for ; Mon, 19 Oct 2026 21:08:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 4E925606A320 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=PeUq8QBS DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1792444116; x=1823980116; h=date:from:to:cc:subject:message-id; bh=FCMT5bMb2Os4ub5iyNm5RFm199LXOh7uV9XSTjEeca8=; b=PeUq8QBSqxcxHIG8c0IVdB2NdvURVv3A4PpW6H18SDC7+UKpCRIlB92U KXDdLpOfB7OnegKzOScubzGpJx4+yfwgjOGoUkcKEvgdRZyThkfAUyqCx YO2/TmZcyNW5xoffAfjjK1WgqLnKinMrF5reG6XIi0UpQmFePkZsIxrrU aL7SweMyeXzI6WanGQCQMYIrVDnuevUEHsmzwPfjgUSrCQ/3xH8Phloa5 JI7YIKKXNfmS8VSf5RY5/0tOaRGKZf6JtVbl+eHP9jyO5psYLXSzNFR6q K7K3tstA4CsOz1CHjTx7f9m3WTKrSbrz9FlyQ8hU6Yc6SslENYhPY+2Pl g==; X-CSE-ConnectionGUID: DR1v5OVLRUaN3BrizvTpng== X-CSE-MsgGUID: BZJRPSL0TzC67DlMPolWMg== X-IronPort-AV: E=McAfee;i="6800,10657,11940"; a="1155677" X-IronPort-AV: E=Sophos;i="6.27,168,1787036400"; d="scan'208";a="1155677" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2026 14:08:35 -0700 X-CSE-ConnectionGUID: Ovr/6RQYQe2NgoL6CJAO1Q== X-CSE-MsgGUID: 82xanXAqQtK/Ey+EUZhYkw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,168,1787036400"; d="scan'208";a="2686663" Received: from igk-lkp-server01.igk.intel.com (HELO 3c253b998be3) ([10.211.93.152]) by fmviesa003.fm.intel.com with ESMTP; 19 Oct 2026 14:08:33 -0700 Received: from kbuild by 3c253b998be3 with local (Exim 4.98.2) (envelope-from ) id 1xIuat-000000005tj-0xnB; Mon, 19 Oct 2026 21:08:31 +0000 Date: Mon, 19 Oct 2026 23:07:53 +0200 From: kernel test robot To: cros-kernel-buildreports@googlegroups.com Cc: oe-kbuild-all@lists.linux.dev Subject: [android-common:android14-6.1 1/1] drivers/mmc/core/mmc.c:1006:5: warning: no previous prototype for function 'mmc_select_bus_width' Message-ID: <202610192227.KQpAt0RL-lkp@intel.com> User-Agent: s-nail v14.9.25 X-Mailing-List: oe-kbuild-all@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list tree: https://android.googlesource.com/kernel/common android14-6.1 head: bb5a6085be4a3639bc50ef4ec04309dc723a0663 commit: a3a743e67f3ded182826a65262af30ec11ec5bbe [1/1] ANDROID: mmc: core: Export core functions for kernel modules usage config: arm-randconfig-2000-20261018 (https://download.01.org/0day-ci/archive/20261019/202610192227.KQpAt0RL-lkp@intel.com/config) compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 337446dacd2a713010f1c9856c21eb8d899b5613) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261019/202610192227.KQpAt0RL-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202610192227.KQpAt0RL-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/mmc/core/mmc.c:1006:5: warning: no previous prototype for function 'mmc_select_bus_width' [-Wmissing-prototypes] 1006 | int mmc_select_bus_width(struct mmc_card *card) | ^ drivers/mmc/core/mmc.c:1006:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1006 | int mmc_select_bus_width(struct mmc_card *card) | ^ | static >> drivers/mmc/core/mmc.c:1076:5: warning: no previous prototype for function 'mmc_select_hs' [-Wmissing-prototypes] 1076 | int mmc_select_hs(struct mmc_card *card) | ^ drivers/mmc/core/mmc.c:1076:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1076 | int mmc_select_hs(struct mmc_card *card) | ^ | static >> drivers/mmc/core/mmc.c:1095:5: warning: no previous prototype for function 'mmc_select_hs_ddr' [-Wmissing-prototypes] 1095 | int mmc_select_hs_ddr(struct mmc_card *card) | ^ drivers/mmc/core/mmc.c:1095:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1095 | int mmc_select_hs_ddr(struct mmc_card *card) | ^ | static >> drivers/mmc/core/mmc.c:1166:5: warning: no previous prototype for function 'mmc_select_hs400' [-Wmissing-prototypes] 1166 | int mmc_select_hs400(struct mmc_card *card) | ^ drivers/mmc/core/mmc.c:1166:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1166 | int mmc_select_hs400(struct mmc_card *card) | ^ | static >> drivers/mmc/core/mmc.c:1541:5: warning: no previous prototype for function 'mmc_select_timing' [-Wmissing-prototypes] 1541 | int mmc_select_timing(struct mmc_card *card) | ^ drivers/mmc/core/mmc.c:1541:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1541 | int mmc_select_timing(struct mmc_card *card) | ^ | static >> drivers/mmc/core/mmc.c:1582:5: warning: no previous prototype for function 'mmc_hs200_tuning' [-Wmissing-prototypes] 1582 | int mmc_hs200_tuning(struct mmc_card *card) | ^ drivers/mmc/core/mmc.c:1582:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1582 | int mmc_hs200_tuning(struct mmc_card *card) | ^ | static 6 warnings generated. vim +/mmc_select_bus_width +1006 drivers/mmc/core/mmc.c 1000 1001 /* 1002 * Select the bus width amoung 4-bit and 8-bit(SDR). 1003 * If the bus width is changed successfully, return the selected width value. 1004 * Zero is returned instead of error value if the wide width is not supported. 1005 */ > 1006 int mmc_select_bus_width(struct mmc_card *card) 1007 { 1008 static unsigned ext_csd_bits[] = { 1009 EXT_CSD_BUS_WIDTH_8, 1010 EXT_CSD_BUS_WIDTH_4, 1011 }; 1012 static unsigned bus_widths[] = { 1013 MMC_BUS_WIDTH_8, 1014 MMC_BUS_WIDTH_4, 1015 }; 1016 struct mmc_host *host = card->host; 1017 unsigned idx, bus_width = 0; 1018 int err = 0; 1019 1020 if (!mmc_can_ext_csd(card) || 1021 !(host->caps & (MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA))) 1022 return 0; 1023 1024 idx = (host->caps & MMC_CAP_8_BIT_DATA) ? 0 : 1; 1025 1026 /* 1027 * Unlike SD, MMC cards dont have a configuration register to notify 1028 * supported bus width. So bus test command should be run to identify 1029 * the supported bus width or compare the ext csd values of current 1030 * bus width and ext csd values of 1 bit mode read earlier. 1031 */ 1032 for (; idx < ARRAY_SIZE(bus_widths); idx++) { 1033 /* 1034 * Host is capable of 8bit transfer, then switch 1035 * the device to work in 8bit transfer mode. If the 1036 * mmc switch command returns error then switch to 1037 * 4bit transfer mode. On success set the corresponding 1038 * bus width on the host. 1039 */ 1040 err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, 1041 EXT_CSD_BUS_WIDTH, 1042 ext_csd_bits[idx], 1043 card->ext_csd.generic_cmd6_time); 1044 if (err) 1045 continue; 1046 1047 bus_width = bus_widths[idx]; 1048 mmc_set_bus_width(host, bus_width); 1049 1050 /* 1051 * If controller can't handle bus width test, 1052 * compare ext_csd previously read in 1 bit mode 1053 * against ext_csd at new bus width 1054 */ 1055 if (!(host->caps & MMC_CAP_BUS_WIDTH_TEST)) 1056 err = mmc_compare_ext_csds(card, bus_width); 1057 else 1058 err = mmc_bus_test(card, bus_width); 1059 1060 if (!err) { 1061 err = bus_width; 1062 break; 1063 } else { 1064 pr_warn("%s: switch to bus width %d failed\n", 1065 mmc_hostname(host), 1 << bus_width); 1066 } 1067 } 1068 1069 return err; 1070 } 1071 EXPORT_SYMBOL_GPL(mmc_select_bus_width); 1072 1073 /* 1074 * Switch to the high-speed mode 1075 */ > 1076 int mmc_select_hs(struct mmc_card *card) 1077 { 1078 int err; 1079 1080 err = __mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, 1081 EXT_CSD_HS_TIMING, EXT_CSD_TIMING_HS, 1082 card->ext_csd.generic_cmd6_time, MMC_TIMING_MMC_HS, 1083 true, true, MMC_CMD_RETRIES); 1084 if (err) 1085 pr_warn("%s: switch to high-speed failed, err:%d\n", 1086 mmc_hostname(card->host), err); 1087 1088 return err; 1089 } 1090 EXPORT_SYMBOL_GPL(mmc_select_hs); 1091 1092 /* 1093 * Activate wide bus and DDR if supported. 1094 */ > 1095 int mmc_select_hs_ddr(struct mmc_card *card) 1096 { 1097 struct mmc_host *host = card->host; 1098 u32 bus_width, ext_csd_bits; 1099 int err = 0; 1100 1101 if (!(card->mmc_avail_type & EXT_CSD_CARD_TYPE_DDR_52)) 1102 return 0; 1103 1104 bus_width = host->ios.bus_width; 1105 if (bus_width == MMC_BUS_WIDTH_1) 1106 return 0; 1107 1108 ext_csd_bits = (bus_width == MMC_BUS_WIDTH_8) ? 1109 EXT_CSD_DDR_BUS_WIDTH_8 : EXT_CSD_DDR_BUS_WIDTH_4; 1110 1111 err = __mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, 1112 EXT_CSD_BUS_WIDTH, 1113 ext_csd_bits, 1114 card->ext_csd.generic_cmd6_time, 1115 MMC_TIMING_MMC_DDR52, 1116 true, true, MMC_CMD_RETRIES); 1117 if (err) { 1118 pr_err("%s: switch to bus width %d ddr failed\n", 1119 mmc_hostname(host), 1 << bus_width); 1120 return err; 1121 } 1122 1123 /* 1124 * eMMC cards can support 3.3V to 1.2V i/o (vccq) 1125 * signaling. 1126 * 1127 * EXT_CSD_CARD_TYPE_DDR_1_8V means 3.3V or 1.8V vccq. 1128 * 1129 * 1.8V vccq at 3.3V core voltage (vcc) is not required 1130 * in the JEDEC spec for DDR. 1131 * 1132 * Even (e)MMC card can support 3.3v to 1.2v vccq, but not all 1133 * host controller can support this, like some of the SDHCI 1134 * controller which connect to an eMMC device. Some of these 1135 * host controller still needs to use 1.8v vccq for supporting 1136 * DDR mode. 1137 * 1138 * So the sequence will be: 1139 * if (host and device can both support 1.2v IO) 1140 * use 1.2v IO; 1141 * else if (host and device can both support 1.8v IO) 1142 * use 1.8v IO; 1143 * so if host and device can only support 3.3v IO, this is the 1144 * last choice. 1145 * 1146 * WARNING: eMMC rules are NOT the same as SD DDR 1147 */ 1148 if (card->mmc_avail_type & EXT_CSD_CARD_TYPE_DDR_1_2V) { 1149 err = mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_120); 1150 if (!err) 1151 return 0; 1152 } 1153 1154 if (card->mmc_avail_type & EXT_CSD_CARD_TYPE_DDR_1_8V && 1155 host->caps & MMC_CAP_1_8V_DDR) 1156 err = mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_180); 1157 1158 /* make sure vccq is 3.3v after switching disaster */ 1159 if (err) 1160 err = mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330); 1161 1162 return err; 1163 } 1164 EXPORT_SYMBOL_GPL(mmc_select_hs_ddr); 1165 > 1166 int mmc_select_hs400(struct mmc_card *card) 1167 { 1168 struct mmc_host *host = card->host; 1169 unsigned int max_dtr; 1170 int err = 0; 1171 u8 val; 1172 1173 /* 1174 * HS400 mode requires 8-bit bus width 1175 */ 1176 if (!(card->mmc_avail_type & EXT_CSD_CARD_TYPE_HS400 && 1177 host->ios.bus_width == MMC_BUS_WIDTH_8)) 1178 return 0; 1179 1180 /* Switch card to HS mode */ 1181 val = EXT_CSD_TIMING_HS; 1182 err = __mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, 1183 EXT_CSD_HS_TIMING, val, 1184 card->ext_csd.generic_cmd6_time, 0, 1185 false, true, MMC_CMD_RETRIES); 1186 if (err) { 1187 pr_err("%s: switch to high-speed from hs200 failed, err:%d\n", 1188 mmc_hostname(host), err); 1189 return err; 1190 } 1191 1192 /* Prepare host to downgrade to HS timing */ 1193 if (host->ops->hs400_downgrade) 1194 host->ops->hs400_downgrade(host); 1195 1196 /* Set host controller to HS timing */ 1197 mmc_set_timing(host, MMC_TIMING_MMC_HS); 1198 1199 /* Reduce frequency to HS frequency */ 1200 max_dtr = card->ext_csd.hs_max_dtr; 1201 mmc_set_clock(host, max_dtr); 1202 1203 err = mmc_switch_status(card, true); 1204 if (err) 1205 goto out_err; 1206 1207 if (host->ops->hs400_prepare_ddr) 1208 host->ops->hs400_prepare_ddr(host); 1209 1210 /* Switch card to DDR */ 1211 err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, 1212 EXT_CSD_BUS_WIDTH, 1213 EXT_CSD_DDR_BUS_WIDTH_8, 1214 card->ext_csd.generic_cmd6_time); 1215 if (err) { 1216 pr_err("%s: switch to bus width for hs400 failed, err:%d\n", 1217 mmc_hostname(host), err); 1218 return err; 1219 } 1220 1221 /* Switch card to HS400 */ 1222 val = EXT_CSD_TIMING_HS400 | 1223 card->drive_strength << EXT_CSD_DRV_STR_SHIFT; 1224 err = __mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, 1225 EXT_CSD_HS_TIMING, val, 1226 card->ext_csd.generic_cmd6_time, 0, 1227 false, true, MMC_CMD_RETRIES); 1228 if (err) { 1229 pr_err("%s: switch to hs400 failed, err:%d\n", 1230 mmc_hostname(host), err); 1231 return err; 1232 } 1233 1234 /* Set host controller to HS400 timing and frequency */ 1235 mmc_set_timing(host, MMC_TIMING_MMC_HS400); 1236 mmc_set_bus_speed(card); 1237 1238 if (host->ops->execute_hs400_tuning) { 1239 mmc_retune_disable(host); 1240 err = host->ops->execute_hs400_tuning(host, card); 1241 mmc_retune_enable(host); 1242 if (err) 1243 goto out_err; 1244 } 1245 1246 if (host->ops->hs400_complete) 1247 host->ops->hs400_complete(host); 1248 1249 err = mmc_switch_status(card, true); 1250 if (err) 1251 goto out_err; 1252 1253 return 0; 1254 1255 out_err: 1256 pr_err("%s: %s failed, error %d\n", mmc_hostname(card->host), 1257 __func__, err); 1258 return err; 1259 } 1260 EXPORT_SYMBOL_GPL(mmc_select_hs400); 1261 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki