Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'kbuild-fixes-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull Kbuild fixes from Masahiro Yamada:

- move -Wsign-compare warning from W=2 to W=3

- fix the keyword _restrict to __restrict in genksyms

- fix more bugs in qconf

* tag 'kbuild-fixes-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
kconfig: qconf: replace deprecated QString::sprintf() with QTextStream
kconfig: qconf: remove redundant help in the info view
kconfig: qconf: remove qInfo() to get back Qt4 support
kconfig: qconf: remove unused colNr
kconfig: qconf: fix the popup menu in the ConfigInfoView window
kconfig: qconf: fix signal connection to invalid slots
genksyms: keywords: Use __restrict not _restrict
kbuild: remove redundant patterns in filter/filter-out
extract-cert: add static to local data
Makefile.extrawarn: Move sign-compare from W=2 to W=3

+86 -89
+2 -3
Makefile
··· 265 265 $(version_h) headers headers_% archheaders archscripts \ 266 266 %asm-generic kernelversion %src-pkg dt_binding_check \ 267 267 outputmakefile 268 - no-sync-config-targets := $(no-dot-config-targets) install %install \ 269 - kernelrelease 268 + no-sync-config-targets := $(no-dot-config-targets) %install kernelrelease 270 269 single-targets := %.a %.i %.ko %.lds %.ll %.lst %.mod %.o %.s %.symtypes %/ 271 270 272 271 config-build := ··· 291 292 endif 292 293 293 294 ifeq ($(KBUILD_EXTMOD),) 294 - ifneq ($(filter config %config,$(MAKECMDGOALS)),) 295 + ifneq ($(filter %config,$(MAKECMDGOALS)),) 295 296 config-build := 1 296 297 ifneq ($(words $(MAKECMDGOALS)),1) 297 298 mixed-build := 1
+1 -1
scripts/Makefile.extrawarn
··· 66 66 KBUILD_CFLAGS += -Wshadow 67 67 KBUILD_CFLAGS += $(call cc-option, -Wlogical-op) 68 68 KBUILD_CFLAGS += -Wmissing-field-initializers 69 - KBUILD_CFLAGS += -Wsign-compare 70 69 KBUILD_CFLAGS += -Wtype-limits 71 70 KBUILD_CFLAGS += $(call cc-option, -Wmaybe-uninitialized) 72 71 KBUILD_CFLAGS += $(call cc-option, -Wunused-macros) ··· 86 87 KBUILD_CFLAGS += -Wpadded 87 88 KBUILD_CFLAGS += -Wpointer-arith 88 89 KBUILD_CFLAGS += -Wredundant-decls 90 + KBUILD_CFLAGS += -Wsign-compare 89 91 KBUILD_CFLAGS += -Wswitch-default 90 92 KBUILD_CFLAGS += $(call cc-option, -Wpacked-bitfield-compat) 91 93
+1 -1
scripts/extract-cert.c
··· 71 71 static const char *key_pass; 72 72 static BIO *wb; 73 73 static char *cert_dst; 74 - int kbuild_verbose; 74 + static int kbuild_verbose; 75 75 76 76 static void write_cert(X509 *x509) 77 77 {
+2 -2
scripts/genksyms/keywords.c
··· 25 25 { "__int128_t", BUILTIN_INT_KEYW }, 26 26 { "__uint128_t", BUILTIN_INT_KEYW }, 27 27 28 - // According to rth, c99 defines "_Bool", __restrict", __restrict__", "restrict". KAO 28 + // According to rth, c99 defines "_Bool", "__restrict", "__restrict__", "restrict". KAO 29 29 { "_Bool", BOOL_KEYW }, 30 - { "_restrict", RESTRICT_KEYW }, 30 + { "__restrict", RESTRICT_KEYW }, 31 31 { "__restrict__", RESTRICT_KEYW }, 32 32 { "restrict", RESTRICT_KEYW }, 33 33 { "asm", ASM_KEYW },
+77 -79
scripts/kconfig/qconf.cc
··· 885 885 connect(action, SIGNAL(toggled(bool)), 886 886 parent(), SLOT(setShowName(bool))); 887 887 connect(parent(), SIGNAL(showNameChanged(bool)), 888 - action, SLOT(setOn(bool))); 888 + action, SLOT(setChecked(bool))); 889 889 action->setChecked(showName); 890 890 headerPopup->addAction(action); 891 891 ··· 894 894 connect(action, SIGNAL(toggled(bool)), 895 895 parent(), SLOT(setShowRange(bool))); 896 896 connect(parent(), SIGNAL(showRangeChanged(bool)), 897 - action, SLOT(setOn(bool))); 897 + action, SLOT(setChecked(bool))); 898 898 action->setChecked(showRange); 899 899 headerPopup->addAction(action); 900 900 ··· 903 903 connect(action, SIGNAL(toggled(bool)), 904 904 parent(), SLOT(setShowData(bool))); 905 905 connect(parent(), SIGNAL(showDataChanged(bool)), 906 - action, SLOT(setOn(bool))); 906 + action, SLOT(setChecked(bool))); 907 907 action->setChecked(showData); 908 908 headerPopup->addAction(action); 909 909 } ··· 1012 1012 configSettings->endGroup(); 1013 1013 connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings())); 1014 1014 } 1015 + 1016 + contextMenu = createStandardContextMenu(); 1017 + QAction *action = new QAction("Show Debug Info", contextMenu); 1018 + 1019 + action->setCheckable(true); 1020 + connect(action, SIGNAL(toggled(bool)), SLOT(setShowDebug(bool))); 1021 + connect(this, SIGNAL(showDebugChanged(bool)), action, SLOT(setChecked(bool))); 1022 + action->setChecked(showDebug()); 1023 + contextMenu->addSeparator(); 1024 + contextMenu->addAction(action); 1015 1025 } 1016 1026 1017 1027 void ConfigInfoView::saveSettings(void) ··· 1076 1066 void ConfigInfoView::menuInfo(void) 1077 1067 { 1078 1068 struct symbol* sym; 1079 - QString head, debug, help; 1069 + QString info; 1070 + QTextStream stream(&info); 1080 1071 1081 1072 sym = _menu->sym; 1082 1073 if (sym) { 1083 1074 if (_menu->prompt) { 1084 - head += "<big><b>"; 1085 - head += print_filter(_menu->prompt->text); 1086 - head += "</b></big>"; 1075 + stream << "<big><b>"; 1076 + stream << print_filter(_menu->prompt->text); 1077 + stream << "</b></big>"; 1087 1078 if (sym->name) { 1088 - head += " ("; 1079 + stream << " ("; 1089 1080 if (showDebug()) 1090 - head += QString().sprintf("<a href=\"s%s\">", sym->name); 1091 - head += print_filter(sym->name); 1081 + stream << "<a href=\"s" << sym->name << "\">"; 1082 + stream << print_filter(sym->name); 1092 1083 if (showDebug()) 1093 - head += "</a>"; 1094 - head += ")"; 1084 + stream << "</a>"; 1085 + stream << ")"; 1095 1086 } 1096 1087 } else if (sym->name) { 1097 - head += "<big><b>"; 1088 + stream << "<big><b>"; 1098 1089 if (showDebug()) 1099 - head += QString().sprintf("<a href=\"s%s\">", sym->name); 1100 - head += print_filter(sym->name); 1090 + stream << "<a href=\"s" << sym->name << "\">"; 1091 + stream << print_filter(sym->name); 1101 1092 if (showDebug()) 1102 - head += "</a>"; 1103 - head += "</b></big>"; 1093 + stream << "</a>"; 1094 + stream << "</b></big>"; 1104 1095 } 1105 - head += "<br><br>"; 1096 + stream << "<br><br>"; 1106 1097 1107 1098 if (showDebug()) 1108 - debug = debug_info(sym); 1099 + stream << debug_info(sym); 1109 1100 1110 - struct gstr help_gstr = str_new(); 1111 - menu_get_ext_help(_menu, &help_gstr); 1112 - help = print_filter(str_get(&help_gstr)); 1113 - str_free(&help_gstr); 1114 1101 } else if (_menu->prompt) { 1115 - head += "<big><b>"; 1116 - head += print_filter(_menu->prompt->text); 1117 - head += "</b></big><br><br>"; 1102 + stream << "<big><b>"; 1103 + stream << print_filter(_menu->prompt->text); 1104 + stream << "</b></big><br><br>"; 1118 1105 if (showDebug()) { 1119 1106 if (_menu->prompt->visible.expr) { 1120 - debug += "&nbsp;&nbsp;dep: "; 1121 - expr_print(_menu->prompt->visible.expr, expr_print_help, &debug, E_NONE); 1122 - debug += "<br><br>"; 1107 + stream << "&nbsp;&nbsp;dep: "; 1108 + expr_print(_menu->prompt->visible.expr, 1109 + expr_print_help, &stream, E_NONE); 1110 + stream << "<br><br>"; 1123 1111 } 1124 1112 } 1125 1113 } 1126 1114 if (showDebug()) 1127 - debug += QString().sprintf("defined at %s:%d<br><br>", _menu->file->name, _menu->lineno); 1115 + stream << "defined at " << _menu->file->name << ":" 1116 + << _menu->lineno << "<br><br>"; 1128 1117 1129 - setText(head + debug + help); 1118 + setText(info); 1130 1119 } 1131 1120 1132 1121 QString ConfigInfoView::debug_info(struct symbol *sym) 1133 1122 { 1134 1123 QString debug; 1124 + QTextStream stream(&debug); 1135 1125 1136 - debug += "type: "; 1137 - debug += print_filter(sym_type_name(sym->type)); 1126 + stream << "type: "; 1127 + stream << print_filter(sym_type_name(sym->type)); 1138 1128 if (sym_is_choice(sym)) 1139 - debug += " (choice)"; 1129 + stream << " (choice)"; 1140 1130 debug += "<br>"; 1141 1131 if (sym->rev_dep.expr) { 1142 - debug += "reverse dep: "; 1143 - expr_print(sym->rev_dep.expr, expr_print_help, &debug, E_NONE); 1144 - debug += "<br>"; 1132 + stream << "reverse dep: "; 1133 + expr_print(sym->rev_dep.expr, expr_print_help, &stream, E_NONE); 1134 + stream << "<br>"; 1145 1135 } 1146 1136 for (struct property *prop = sym->prop; prop; prop = prop->next) { 1147 1137 switch (prop->type) { 1148 1138 case P_PROMPT: 1149 1139 case P_MENU: 1150 - debug += QString().sprintf("prompt: <a href=\"m%s\">", sym->name); 1151 - debug += print_filter(prop->text); 1152 - debug += "</a><br>"; 1140 + stream << "prompt: <a href=\"m" << sym->name << "\">"; 1141 + stream << print_filter(prop->text); 1142 + stream << "</a><br>"; 1153 1143 break; 1154 1144 case P_DEFAULT: 1155 1145 case P_SELECT: ··· 1157 1147 case P_COMMENT: 1158 1148 case P_IMPLY: 1159 1149 case P_SYMBOL: 1160 - debug += prop_get_type_name(prop->type); 1161 - debug += ": "; 1162 - expr_print(prop->expr, expr_print_help, &debug, E_NONE); 1163 - debug += "<br>"; 1150 + stream << prop_get_type_name(prop->type); 1151 + stream << ": "; 1152 + expr_print(prop->expr, expr_print_help, 1153 + &stream, E_NONE); 1154 + stream << "<br>"; 1164 1155 break; 1165 1156 case P_CHOICE: 1166 1157 if (sym_is_choice(sym)) { 1167 - debug += "choice: "; 1168 - expr_print(prop->expr, expr_print_help, &debug, E_NONE); 1169 - debug += "<br>"; 1158 + stream << "choice: "; 1159 + expr_print(prop->expr, expr_print_help, 1160 + &stream, E_NONE); 1161 + stream << "<br>"; 1170 1162 } 1171 1163 break; 1172 1164 default: 1173 - debug += "unknown property: "; 1174 - debug += prop_get_type_name(prop->type); 1175 - debug += "<br>"; 1165 + stream << "unknown property: "; 1166 + stream << prop_get_type_name(prop->type); 1167 + stream << "<br>"; 1176 1168 } 1177 1169 if (prop->visible.expr) { 1178 - debug += "&nbsp;&nbsp;&nbsp;&nbsp;dep: "; 1179 - expr_print(prop->visible.expr, expr_print_help, &debug, E_NONE); 1180 - debug += "<br>"; 1170 + stream << "&nbsp;&nbsp;&nbsp;&nbsp;dep: "; 1171 + expr_print(prop->visible.expr, expr_print_help, 1172 + &stream, E_NONE); 1173 + stream << "<br>"; 1181 1174 } 1182 1175 } 1183 - debug += "<br>"; 1176 + stream << "<br>"; 1184 1177 1185 1178 return debug; 1186 1179 } ··· 1221 1208 1222 1209 void ConfigInfoView::expr_print_help(void *data, struct symbol *sym, const char *str) 1223 1210 { 1224 - QString* text = reinterpret_cast<QString*>(data); 1225 - QString str2 = print_filter(str); 1211 + QTextStream *stream = reinterpret_cast<QTextStream *>(data); 1226 1212 1227 1213 if (sym && sym->name && !(sym->flags & SYMBOL_CONST)) { 1228 - *text += QString().sprintf("<a href=\"s%s\">", sym->name); 1229 - *text += str2; 1230 - *text += "</a>"; 1231 - } else 1232 - *text += str2; 1214 + *stream << "<a href=\"s" << sym->name << "\">"; 1215 + *stream << print_filter(str); 1216 + *stream << "</a>"; 1217 + } else { 1218 + *stream << print_filter(str); 1219 + } 1233 1220 } 1234 1221 1235 1222 void ConfigInfoView::clicked(const QUrl &url) ··· 1241 1228 struct menu *m = NULL; 1242 1229 1243 1230 if (count < 1) { 1244 - qInfo() << "Clicked link is empty"; 1245 1231 delete[] data; 1246 1232 return; 1247 1233 } ··· 1253 1241 strcat(data, "$"); 1254 1242 result = sym_re_search(data); 1255 1243 if (!result) { 1256 - qInfo() << "Clicked symbol is invalid:" << data; 1257 1244 delete[] data; 1258 1245 return; 1259 1246 } ··· 1279 1268 delete data; 1280 1269 } 1281 1270 1282 - QMenu* ConfigInfoView::createStandardContextMenu(const QPoint & pos) 1271 + void ConfigInfoView::contextMenuEvent(QContextMenuEvent *event) 1283 1272 { 1284 - QMenu* popup = Parent::createStandardContextMenu(pos); 1285 - QAction* action = new QAction("Show Debug Info", popup); 1286 - 1287 - action->setCheckable(true); 1288 - connect(action, SIGNAL(toggled(bool)), SLOT(setShowDebug(bool))); 1289 - connect(this, SIGNAL(showDebugChanged(bool)), action, SLOT(setOn(bool))); 1290 - action->setChecked(showDebug()); 1291 - popup->addSeparator(); 1292 - popup->addAction(action); 1293 - return popup; 1294 - } 1295 - 1296 - void ConfigInfoView::contextMenuEvent(QContextMenuEvent *e) 1297 - { 1298 - Parent::contextMenuEvent(e); 1273 + contextMenu->popup(event->globalPos()); 1274 + event->accept(); 1299 1275 } 1300 1276 1301 1277 ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow *parent)
+3 -3
scripts/kconfig/qconf.h
··· 30 30 }; 31 31 32 32 enum colIdx { 33 - promptColIdx, nameColIdx, noColIdx, modColIdx, yesColIdx, dataColIdx, colNr 33 + promptColIdx, nameColIdx, noColIdx, modColIdx, yesColIdx, dataColIdx 34 34 }; 35 35 enum listMode { 36 36 singleMode, menuMode, symbolMode, fullMode, listMode ··· 215 215 class ConfigInfoView : public QTextBrowser { 216 216 Q_OBJECT 217 217 typedef class QTextBrowser Parent; 218 + QMenu *contextMenu; 218 219 public: 219 220 ConfigInfoView(QWidget* parent, const char *name = 0); 220 221 bool showDebug(void) const { return _showDebug; } ··· 236 235 QString debug_info(struct symbol *sym); 237 236 static QString print_filter(const QString &str); 238 237 static void expr_print_help(void *data, struct symbol *sym, const char *str); 239 - QMenu *createStandardContextMenu(const QPoint & pos); 240 - void contextMenuEvent(QContextMenuEvent *e); 238 + void contextMenuEvent(QContextMenuEvent *event); 241 239 242 240 struct symbol *sym; 243 241 struct menu *_menu;