mirror of https://gitee.com/openkylin/linux.git
Kbuild fixes for v5.9
- move -Wsign-compare warning from W=2 to W=3 - fix the keyword _restrict to __restrict in genksyms - fix more bugs in qconf -----BEGIN PGP SIGNATURE----- iQJJBAABCgAzFiEEbmPs18K1szRHjPqEPYsBB53g2wYFAl9BIv8VHG1hc2FoaXJv eUBrZXJuZWwub3JnAAoJED2LAQed4NsGgUgQAKvWTNNvrY0YEY5YrFjh5swT/bBs 9YfYdrEe7MOkmUtIf0DemwzdmaiZmLSGLAZZNfMEElLdk4bofi13uznh/7M/Yd7H Vws7qeQDypRYxieUhrQMubpxoK/ZFPb89x+zX9LlFO9nB1/810iMVJkrysSbVDDU QnQWcKIa7X+narruX3DWz5I9FxarODXTIVLz4mR29z7xo1UGfuGuLlH3/mmGLaCt kmVnDs0eEFpRt1y70plZ5YZqhFV3619LvRQW8RwJgVXEPzXb5FaWhoJnfIlLgcJb epZ0miZgTMAugqryfD0cyqAImNglQTkfhXtmWJR5g77qrqwqHkSi/xnMHhbEP499 h/GwUmmfUzcjwJJlCzfLE1tuSPRgOvoy6Yp/6T0f+rCVhr8EyZ15BG0qDF3leHY9 Wlz6CdnRvmBKicMyK6MhH0MFWGmE4h2XM7eCMkVYG6u7WiDxC/FjCYI/73I2632t YXeMevAtXfNM5J0TOk1zzUeIordan4s5J5ddlRCRd7GMMmqq5BnfuNI+B9n5Npev 6g+XerkCreHEgOX1HSAj1SYmSykHjIyIl5AmWwRJEvRlxMKuNPPvar0oJqSUlJ7j HPsKAhdl+dlKCxKmz7e3nyfkc5IfMrMAfc6dD9/DAxggWBTeCU0UgaB0ZrFkHMdm yx4fimZilwKm3wUA =bySb -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
c3d8f220d0
5
Makefile
5
Makefile
|
@ -265,8 +265,7 @@ no-dot-config-targets := $(clean-targets) \
|
|||
$(version_h) headers headers_% archheaders archscripts \
|
||||
%asm-generic kernelversion %src-pkg dt_binding_check \
|
||||
outputmakefile
|
||||
no-sync-config-targets := $(no-dot-config-targets) install %install \
|
||||
kernelrelease
|
||||
no-sync-config-targets := $(no-dot-config-targets) %install kernelrelease
|
||||
single-targets := %.a %.i %.ko %.lds %.ll %.lst %.mod %.o %.s %.symtypes %/
|
||||
|
||||
config-build :=
|
||||
|
@ -292,7 +291,7 @@ ifneq ($(KBUILD_EXTMOD),)
|
|||
endif
|
||||
|
||||
ifeq ($(KBUILD_EXTMOD),)
|
||||
ifneq ($(filter config %config,$(MAKECMDGOALS)),)
|
||||
ifneq ($(filter %config,$(MAKECMDGOALS)),)
|
||||
config-build := 1
|
||||
ifneq ($(words $(MAKECMDGOALS)),1)
|
||||
mixed-build := 1
|
||||
|
|
|
@ -66,7 +66,6 @@ KBUILD_CFLAGS += -Wnested-externs
|
|||
KBUILD_CFLAGS += -Wshadow
|
||||
KBUILD_CFLAGS += $(call cc-option, -Wlogical-op)
|
||||
KBUILD_CFLAGS += -Wmissing-field-initializers
|
||||
KBUILD_CFLAGS += -Wsign-compare
|
||||
KBUILD_CFLAGS += -Wtype-limits
|
||||
KBUILD_CFLAGS += $(call cc-option, -Wmaybe-uninitialized)
|
||||
KBUILD_CFLAGS += $(call cc-option, -Wunused-macros)
|
||||
|
@ -87,6 +86,7 @@ KBUILD_CFLAGS += -Wpacked
|
|||
KBUILD_CFLAGS += -Wpadded
|
||||
KBUILD_CFLAGS += -Wpointer-arith
|
||||
KBUILD_CFLAGS += -Wredundant-decls
|
||||
KBUILD_CFLAGS += -Wsign-compare
|
||||
KBUILD_CFLAGS += -Wswitch-default
|
||||
KBUILD_CFLAGS += $(call cc-option, -Wpacked-bitfield-compat)
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ static void drain_openssl_errors(void)
|
|||
static const char *key_pass;
|
||||
static BIO *wb;
|
||||
static char *cert_dst;
|
||||
int kbuild_verbose;
|
||||
static int kbuild_verbose;
|
||||
|
||||
static void write_cert(X509 *x509)
|
||||
{
|
||||
|
|
|
@ -25,9 +25,9 @@ static struct resword {
|
|||
{ "__int128_t", BUILTIN_INT_KEYW },
|
||||
{ "__uint128_t", BUILTIN_INT_KEYW },
|
||||
|
||||
// According to rth, c99 defines "_Bool", __restrict", __restrict__", "restrict". KAO
|
||||
// According to rth, c99 defines "_Bool", "__restrict", "__restrict__", "restrict". KAO
|
||||
{ "_Bool", BOOL_KEYW },
|
||||
{ "_restrict", RESTRICT_KEYW },
|
||||
{ "__restrict", RESTRICT_KEYW },
|
||||
{ "__restrict__", RESTRICT_KEYW },
|
||||
{ "restrict", RESTRICT_KEYW },
|
||||
{ "asm", ASM_KEYW },
|
||||
|
|
|
@ -885,7 +885,7 @@ void ConfigList::contextMenuEvent(QContextMenuEvent *e)
|
|||
connect(action, SIGNAL(toggled(bool)),
|
||||
parent(), SLOT(setShowName(bool)));
|
||||
connect(parent(), SIGNAL(showNameChanged(bool)),
|
||||
action, SLOT(setOn(bool)));
|
||||
action, SLOT(setChecked(bool)));
|
||||
action->setChecked(showName);
|
||||
headerPopup->addAction(action);
|
||||
|
||||
|
@ -894,7 +894,7 @@ void ConfigList::contextMenuEvent(QContextMenuEvent *e)
|
|||
connect(action, SIGNAL(toggled(bool)),
|
||||
parent(), SLOT(setShowRange(bool)));
|
||||
connect(parent(), SIGNAL(showRangeChanged(bool)),
|
||||
action, SLOT(setOn(bool)));
|
||||
action, SLOT(setChecked(bool)));
|
||||
action->setChecked(showRange);
|
||||
headerPopup->addAction(action);
|
||||
|
||||
|
@ -903,7 +903,7 @@ void ConfigList::contextMenuEvent(QContextMenuEvent *e)
|
|||
connect(action, SIGNAL(toggled(bool)),
|
||||
parent(), SLOT(setShowData(bool)));
|
||||
connect(parent(), SIGNAL(showDataChanged(bool)),
|
||||
action, SLOT(setOn(bool)));
|
||||
action, SLOT(setChecked(bool)));
|
||||
action->setChecked(showData);
|
||||
headerPopup->addAction(action);
|
||||
}
|
||||
|
@ -1012,6 +1012,16 @@ ConfigInfoView::ConfigInfoView(QWidget* parent, const char *name)
|
|||
configSettings->endGroup();
|
||||
connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings()));
|
||||
}
|
||||
|
||||
contextMenu = createStandardContextMenu();
|
||||
QAction *action = new QAction("Show Debug Info", contextMenu);
|
||||
|
||||
action->setCheckable(true);
|
||||
connect(action, SIGNAL(toggled(bool)), SLOT(setShowDebug(bool)));
|
||||
connect(this, SIGNAL(showDebugChanged(bool)), action, SLOT(setChecked(bool)));
|
||||
action->setChecked(showDebug());
|
||||
contextMenu->addSeparator();
|
||||
contextMenu->addAction(action);
|
||||
}
|
||||
|
||||
void ConfigInfoView::saveSettings(void)
|
||||
|
@ -1066,80 +1076,80 @@ void ConfigInfoView::symbolInfo(void)
|
|||
void ConfigInfoView::menuInfo(void)
|
||||
{
|
||||
struct symbol* sym;
|
||||
QString head, debug, help;
|
||||
QString info;
|
||||
QTextStream stream(&info);
|
||||
|
||||
sym = _menu->sym;
|
||||
if (sym) {
|
||||
if (_menu->prompt) {
|
||||
head += "<big><b>";
|
||||
head += print_filter(_menu->prompt->text);
|
||||
head += "</b></big>";
|
||||
stream << "<big><b>";
|
||||
stream << print_filter(_menu->prompt->text);
|
||||
stream << "</b></big>";
|
||||
if (sym->name) {
|
||||
head += " (";
|
||||
stream << " (";
|
||||
if (showDebug())
|
||||
head += QString().sprintf("<a href=\"s%s\">", sym->name);
|
||||
head += print_filter(sym->name);
|
||||
stream << "<a href=\"s" << sym->name << "\">";
|
||||
stream << print_filter(sym->name);
|
||||
if (showDebug())
|
||||
head += "</a>";
|
||||
head += ")";
|
||||
stream << "</a>";
|
||||
stream << ")";
|
||||
}
|
||||
} else if (sym->name) {
|
||||
head += "<big><b>";
|
||||
stream << "<big><b>";
|
||||
if (showDebug())
|
||||
head += QString().sprintf("<a href=\"s%s\">", sym->name);
|
||||
head += print_filter(sym->name);
|
||||
stream << "<a href=\"s" << sym->name << "\">";
|
||||
stream << print_filter(sym->name);
|
||||
if (showDebug())
|
||||
head += "</a>";
|
||||
head += "</b></big>";
|
||||
stream << "</a>";
|
||||
stream << "</b></big>";
|
||||
}
|
||||
head += "<br><br>";
|
||||
stream << "<br><br>";
|
||||
|
||||
if (showDebug())
|
||||
debug = debug_info(sym);
|
||||
stream << debug_info(sym);
|
||||
|
||||
struct gstr help_gstr = str_new();
|
||||
menu_get_ext_help(_menu, &help_gstr);
|
||||
help = print_filter(str_get(&help_gstr));
|
||||
str_free(&help_gstr);
|
||||
} else if (_menu->prompt) {
|
||||
head += "<big><b>";
|
||||
head += print_filter(_menu->prompt->text);
|
||||
head += "</b></big><br><br>";
|
||||
stream << "<big><b>";
|
||||
stream << print_filter(_menu->prompt->text);
|
||||
stream << "</b></big><br><br>";
|
||||
if (showDebug()) {
|
||||
if (_menu->prompt->visible.expr) {
|
||||
debug += " dep: ";
|
||||
expr_print(_menu->prompt->visible.expr, expr_print_help, &debug, E_NONE);
|
||||
debug += "<br><br>";
|
||||
stream << " dep: ";
|
||||
expr_print(_menu->prompt->visible.expr,
|
||||
expr_print_help, &stream, E_NONE);
|
||||
stream << "<br><br>";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (showDebug())
|
||||
debug += QString().sprintf("defined at %s:%d<br><br>", _menu->file->name, _menu->lineno);
|
||||
stream << "defined at " << _menu->file->name << ":"
|
||||
<< _menu->lineno << "<br><br>";
|
||||
|
||||
setText(head + debug + help);
|
||||
setText(info);
|
||||
}
|
||||
|
||||
QString ConfigInfoView::debug_info(struct symbol *sym)
|
||||
{
|
||||
QString debug;
|
||||
QTextStream stream(&debug);
|
||||
|
||||
debug += "type: ";
|
||||
debug += print_filter(sym_type_name(sym->type));
|
||||
stream << "type: ";
|
||||
stream << print_filter(sym_type_name(sym->type));
|
||||
if (sym_is_choice(sym))
|
||||
debug += " (choice)";
|
||||
stream << " (choice)";
|
||||
debug += "<br>";
|
||||
if (sym->rev_dep.expr) {
|
||||
debug += "reverse dep: ";
|
||||
expr_print(sym->rev_dep.expr, expr_print_help, &debug, E_NONE);
|
||||
debug += "<br>";
|
||||
stream << "reverse dep: ";
|
||||
expr_print(sym->rev_dep.expr, expr_print_help, &stream, E_NONE);
|
||||
stream << "<br>";
|
||||
}
|
||||
for (struct property *prop = sym->prop; prop; prop = prop->next) {
|
||||
switch (prop->type) {
|
||||
case P_PROMPT:
|
||||
case P_MENU:
|
||||
debug += QString().sprintf("prompt: <a href=\"m%s\">", sym->name);
|
||||
debug += print_filter(prop->text);
|
||||
debug += "</a><br>";
|
||||
stream << "prompt: <a href=\"m" << sym->name << "\">";
|
||||
stream << print_filter(prop->text);
|
||||
stream << "</a><br>";
|
||||
break;
|
||||
case P_DEFAULT:
|
||||
case P_SELECT:
|
||||
|
@ -1147,30 +1157,33 @@ QString ConfigInfoView::debug_info(struct symbol *sym)
|
|||
case P_COMMENT:
|
||||
case P_IMPLY:
|
||||
case P_SYMBOL:
|
||||
debug += prop_get_type_name(prop->type);
|
||||
debug += ": ";
|
||||
expr_print(prop->expr, expr_print_help, &debug, E_NONE);
|
||||
debug += "<br>";
|
||||
stream << prop_get_type_name(prop->type);
|
||||
stream << ": ";
|
||||
expr_print(prop->expr, expr_print_help,
|
||||
&stream, E_NONE);
|
||||
stream << "<br>";
|
||||
break;
|
||||
case P_CHOICE:
|
||||
if (sym_is_choice(sym)) {
|
||||
debug += "choice: ";
|
||||
expr_print(prop->expr, expr_print_help, &debug, E_NONE);
|
||||
debug += "<br>";
|
||||
stream << "choice: ";
|
||||
expr_print(prop->expr, expr_print_help,
|
||||
&stream, E_NONE);
|
||||
stream << "<br>";
|
||||
}
|
||||
break;
|
||||
default:
|
||||
debug += "unknown property: ";
|
||||
debug += prop_get_type_name(prop->type);
|
||||
debug += "<br>";
|
||||
stream << "unknown property: ";
|
||||
stream << prop_get_type_name(prop->type);
|
||||
stream << "<br>";
|
||||
}
|
||||
if (prop->visible.expr) {
|
||||
debug += " dep: ";
|
||||
expr_print(prop->visible.expr, expr_print_help, &debug, E_NONE);
|
||||
debug += "<br>";
|
||||
stream << " dep: ";
|
||||
expr_print(prop->visible.expr, expr_print_help,
|
||||
&stream, E_NONE);
|
||||
stream << "<br>";
|
||||
}
|
||||
}
|
||||
debug += "<br>";
|
||||
stream << "<br>";
|
||||
|
||||
return debug;
|
||||
}
|
||||
|
@ -1208,15 +1221,15 @@ QString ConfigInfoView::print_filter(const QString &str)
|
|||
|
||||
void ConfigInfoView::expr_print_help(void *data, struct symbol *sym, const char *str)
|
||||
{
|
||||
QString* text = reinterpret_cast<QString*>(data);
|
||||
QString str2 = print_filter(str);
|
||||
QTextStream *stream = reinterpret_cast<QTextStream *>(data);
|
||||
|
||||
if (sym && sym->name && !(sym->flags & SYMBOL_CONST)) {
|
||||
*text += QString().sprintf("<a href=\"s%s\">", sym->name);
|
||||
*text += str2;
|
||||
*text += "</a>";
|
||||
} else
|
||||
*text += str2;
|
||||
*stream << "<a href=\"s" << sym->name << "\">";
|
||||
*stream << print_filter(str);
|
||||
*stream << "</a>";
|
||||
} else {
|
||||
*stream << print_filter(str);
|
||||
}
|
||||
}
|
||||
|
||||
void ConfigInfoView::clicked(const QUrl &url)
|
||||
|
@ -1228,7 +1241,6 @@ void ConfigInfoView::clicked(const QUrl &url)
|
|||
struct menu *m = NULL;
|
||||
|
||||
if (count < 1) {
|
||||
qInfo() << "Clicked link is empty";
|
||||
delete[] data;
|
||||
return;
|
||||
}
|
||||
|
@ -1241,7 +1253,6 @@ void ConfigInfoView::clicked(const QUrl &url)
|
|||
strcat(data, "$");
|
||||
result = sym_re_search(data);
|
||||
if (!result) {
|
||||
qInfo() << "Clicked symbol is invalid:" << data;
|
||||
delete[] data;
|
||||
return;
|
||||
}
|
||||
|
@ -1268,23 +1279,10 @@ void ConfigInfoView::clicked(const QUrl &url)
|
|||
delete data;
|
||||
}
|
||||
|
||||
QMenu* ConfigInfoView::createStandardContextMenu(const QPoint & pos)
|
||||
void ConfigInfoView::contextMenuEvent(QContextMenuEvent *event)
|
||||
{
|
||||
QMenu* popup = Parent::createStandardContextMenu(pos);
|
||||
QAction* action = new QAction("Show Debug Info", popup);
|
||||
|
||||
action->setCheckable(true);
|
||||
connect(action, SIGNAL(toggled(bool)), SLOT(setShowDebug(bool)));
|
||||
connect(this, SIGNAL(showDebugChanged(bool)), action, SLOT(setOn(bool)));
|
||||
action->setChecked(showDebug());
|
||||
popup->addSeparator();
|
||||
popup->addAction(action);
|
||||
return popup;
|
||||
}
|
||||
|
||||
void ConfigInfoView::contextMenuEvent(QContextMenuEvent *e)
|
||||
{
|
||||
Parent::contextMenuEvent(e);
|
||||
contextMenu->popup(event->globalPos());
|
||||
event->accept();
|
||||
}
|
||||
|
||||
ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow *parent)
|
||||
|
|
|
@ -30,7 +30,7 @@ class ConfigSettings : public QSettings {
|
|||
};
|
||||
|
||||
enum colIdx {
|
||||
promptColIdx, nameColIdx, noColIdx, modColIdx, yesColIdx, dataColIdx, colNr
|
||||
promptColIdx, nameColIdx, noColIdx, modColIdx, yesColIdx, dataColIdx
|
||||
};
|
||||
enum listMode {
|
||||
singleMode, menuMode, symbolMode, fullMode, listMode
|
||||
|
@ -215,6 +215,7 @@ public slots:
|
|||
class ConfigInfoView : public QTextBrowser {
|
||||
Q_OBJECT
|
||||
typedef class QTextBrowser Parent;
|
||||
QMenu *contextMenu;
|
||||
public:
|
||||
ConfigInfoView(QWidget* parent, const char *name = 0);
|
||||
bool showDebug(void) const { return _showDebug; }
|
||||
|
@ -235,8 +236,7 @@ public slots:
|
|||
QString debug_info(struct symbol *sym);
|
||||
static QString print_filter(const QString &str);
|
||||
static void expr_print_help(void *data, struct symbol *sym, const char *str);
|
||||
QMenu *createStandardContextMenu(const QPoint & pos);
|
||||
void contextMenuEvent(QContextMenuEvent *e);
|
||||
void contextMenuEvent(QContextMenuEvent *event);
|
||||
|
||||
struct symbol *sym;
|
||||
struct menu *_menu;
|
||||
|
|
Loading…
Reference in New Issue