Commit c3d8f220 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'kbuild-fixes-v5.9' of...

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
parents dd105d64 510bc3cb
...@@ -265,8 +265,7 @@ no-dot-config-targets := $(clean-targets) \ ...@@ -265,8 +265,7 @@ no-dot-config-targets := $(clean-targets) \
$(version_h) headers headers_% archheaders archscripts \ $(version_h) headers headers_% archheaders archscripts \
%asm-generic kernelversion %src-pkg dt_binding_check \ %asm-generic kernelversion %src-pkg dt_binding_check \
outputmakefile outputmakefile
no-sync-config-targets := $(no-dot-config-targets) install %install \ no-sync-config-targets := $(no-dot-config-targets) %install kernelrelease
kernelrelease
single-targets := %.a %.i %.ko %.lds %.ll %.lst %.mod %.o %.s %.symtypes %/ single-targets := %.a %.i %.ko %.lds %.ll %.lst %.mod %.o %.s %.symtypes %/
config-build := config-build :=
...@@ -292,7 +291,7 @@ ifneq ($(KBUILD_EXTMOD),) ...@@ -292,7 +291,7 @@ ifneq ($(KBUILD_EXTMOD),)
endif endif
ifeq ($(KBUILD_EXTMOD),) ifeq ($(KBUILD_EXTMOD),)
ifneq ($(filter config %config,$(MAKECMDGOALS)),) ifneq ($(filter %config,$(MAKECMDGOALS)),)
config-build := 1 config-build := 1
ifneq ($(words $(MAKECMDGOALS)),1) ifneq ($(words $(MAKECMDGOALS)),1)
mixed-build := 1 mixed-build := 1
......
...@@ -66,7 +66,6 @@ KBUILD_CFLAGS += -Wnested-externs ...@@ -66,7 +66,6 @@ KBUILD_CFLAGS += -Wnested-externs
KBUILD_CFLAGS += -Wshadow KBUILD_CFLAGS += -Wshadow
KBUILD_CFLAGS += $(call cc-option, -Wlogical-op) KBUILD_CFLAGS += $(call cc-option, -Wlogical-op)
KBUILD_CFLAGS += -Wmissing-field-initializers KBUILD_CFLAGS += -Wmissing-field-initializers
KBUILD_CFLAGS += -Wsign-compare
KBUILD_CFLAGS += -Wtype-limits KBUILD_CFLAGS += -Wtype-limits
KBUILD_CFLAGS += $(call cc-option, -Wmaybe-uninitialized) KBUILD_CFLAGS += $(call cc-option, -Wmaybe-uninitialized)
KBUILD_CFLAGS += $(call cc-option, -Wunused-macros) KBUILD_CFLAGS += $(call cc-option, -Wunused-macros)
...@@ -87,6 +86,7 @@ KBUILD_CFLAGS += -Wpacked ...@@ -87,6 +86,7 @@ KBUILD_CFLAGS += -Wpacked
KBUILD_CFLAGS += -Wpadded KBUILD_CFLAGS += -Wpadded
KBUILD_CFLAGS += -Wpointer-arith KBUILD_CFLAGS += -Wpointer-arith
KBUILD_CFLAGS += -Wredundant-decls KBUILD_CFLAGS += -Wredundant-decls
KBUILD_CFLAGS += -Wsign-compare
KBUILD_CFLAGS += -Wswitch-default KBUILD_CFLAGS += -Wswitch-default
KBUILD_CFLAGS += $(call cc-option, -Wpacked-bitfield-compat) KBUILD_CFLAGS += $(call cc-option, -Wpacked-bitfield-compat)
......
...@@ -71,7 +71,7 @@ static void drain_openssl_errors(void) ...@@ -71,7 +71,7 @@ static void drain_openssl_errors(void)
static const char *key_pass; static const char *key_pass;
static BIO *wb; static BIO *wb;
static char *cert_dst; static char *cert_dst;
int kbuild_verbose; static int kbuild_verbose;
static void write_cert(X509 *x509) static void write_cert(X509 *x509)
{ {
......
...@@ -25,9 +25,9 @@ static struct resword { ...@@ -25,9 +25,9 @@ static struct resword {
{ "__int128_t", BUILTIN_INT_KEYW }, { "__int128_t", BUILTIN_INT_KEYW },
{ "__uint128_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 }, { "_Bool", BOOL_KEYW },
{ "_restrict", RESTRICT_KEYW }, { "__restrict", RESTRICT_KEYW },
{ "__restrict__", RESTRICT_KEYW }, { "__restrict__", RESTRICT_KEYW },
{ "restrict", RESTRICT_KEYW }, { "restrict", RESTRICT_KEYW },
{ "asm", ASM_KEYW }, { "asm", ASM_KEYW },
......
...@@ -885,7 +885,7 @@ void ConfigList::contextMenuEvent(QContextMenuEvent *e) ...@@ -885,7 +885,7 @@ void ConfigList::contextMenuEvent(QContextMenuEvent *e)
connect(action, SIGNAL(toggled(bool)), connect(action, SIGNAL(toggled(bool)),
parent(), SLOT(setShowName(bool))); parent(), SLOT(setShowName(bool)));
connect(parent(), SIGNAL(showNameChanged(bool)), connect(parent(), SIGNAL(showNameChanged(bool)),
action, SLOT(setOn(bool))); action, SLOT(setChecked(bool)));
action->setChecked(showName); action->setChecked(showName);
headerPopup->addAction(action); headerPopup->addAction(action);
...@@ -894,7 +894,7 @@ void ConfigList::contextMenuEvent(QContextMenuEvent *e) ...@@ -894,7 +894,7 @@ void ConfigList::contextMenuEvent(QContextMenuEvent *e)
connect(action, SIGNAL(toggled(bool)), connect(action, SIGNAL(toggled(bool)),
parent(), SLOT(setShowRange(bool))); parent(), SLOT(setShowRange(bool)));
connect(parent(), SIGNAL(showRangeChanged(bool)), connect(parent(), SIGNAL(showRangeChanged(bool)),
action, SLOT(setOn(bool))); action, SLOT(setChecked(bool)));
action->setChecked(showRange); action->setChecked(showRange);
headerPopup->addAction(action); headerPopup->addAction(action);
...@@ -903,7 +903,7 @@ void ConfigList::contextMenuEvent(QContextMenuEvent *e) ...@@ -903,7 +903,7 @@ void ConfigList::contextMenuEvent(QContextMenuEvent *e)
connect(action, SIGNAL(toggled(bool)), connect(action, SIGNAL(toggled(bool)),
parent(), SLOT(setShowData(bool))); parent(), SLOT(setShowData(bool)));
connect(parent(), SIGNAL(showDataChanged(bool)), connect(parent(), SIGNAL(showDataChanged(bool)),
action, SLOT(setOn(bool))); action, SLOT(setChecked(bool)));
action->setChecked(showData); action->setChecked(showData);
headerPopup->addAction(action); headerPopup->addAction(action);
} }
...@@ -1012,6 +1012,16 @@ ConfigInfoView::ConfigInfoView(QWidget* parent, const char *name) ...@@ -1012,6 +1012,16 @@ ConfigInfoView::ConfigInfoView(QWidget* parent, const char *name)
configSettings->endGroup(); configSettings->endGroup();
connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings())); 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) void ConfigInfoView::saveSettings(void)
...@@ -1066,80 +1076,80 @@ void ConfigInfoView::symbolInfo(void) ...@@ -1066,80 +1076,80 @@ void ConfigInfoView::symbolInfo(void)
void ConfigInfoView::menuInfo(void) void ConfigInfoView::menuInfo(void)
{ {
struct symbol* sym; struct symbol* sym;
QString head, debug, help; QString info;
QTextStream stream(&info);
sym = _menu->sym; sym = _menu->sym;
if (sym) { if (sym) {
if (_menu->prompt) { if (_menu->prompt) {
head += "<big><b>"; stream << "<big><b>";
head += print_filter(_menu->prompt->text); stream << print_filter(_menu->prompt->text);
head += "</b></big>"; stream << "</b></big>";
if (sym->name) { if (sym->name) {
head += " ("; stream << " (";
if (showDebug()) if (showDebug())
head += QString().sprintf("<a href=\"s%s\">", sym->name); stream << "<a href=\"s" << sym->name << "\">";
head += print_filter(sym->name); stream << print_filter(sym->name);
if (showDebug()) if (showDebug())
head += "</a>"; stream << "</a>";
head += ")"; stream << ")";
} }
} else if (sym->name) { } else if (sym->name) {
head += "<big><b>"; stream << "<big><b>";
if (showDebug()) if (showDebug())
head += QString().sprintf("<a href=\"s%s\">", sym->name); stream << "<a href=\"s" << sym->name << "\">";
head += print_filter(sym->name); stream << print_filter(sym->name);
if (showDebug()) if (showDebug())
head += "</a>"; stream << "</a>";
head += "</b></big>"; stream << "</b></big>";
} }
head += "<br><br>"; stream << "<br><br>";
if (showDebug()) 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) { } else if (_menu->prompt) {
head += "<big><b>"; stream << "<big><b>";
head += print_filter(_menu->prompt->text); stream << print_filter(_menu->prompt->text);
head += "</b></big><br><br>"; stream << "</b></big><br><br>";
if (showDebug()) { if (showDebug()) {
if (_menu->prompt->visible.expr) { if (_menu->prompt->visible.expr) {
debug += "&nbsp;&nbsp;dep: "; stream << "&nbsp;&nbsp;dep: ";
expr_print(_menu->prompt->visible.expr, expr_print_help, &debug, E_NONE); expr_print(_menu->prompt->visible.expr,
debug += "<br><br>"; expr_print_help, &stream, E_NONE);
stream << "<br><br>";
} }
} }
} }
if (showDebug()) 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 ConfigInfoView::debug_info(struct symbol *sym)
{ {
QString debug; QString debug;
QTextStream stream(&debug);
debug += "type: "; stream << "type: ";
debug += print_filter(sym_type_name(sym->type)); stream << print_filter(sym_type_name(sym->type));
if (sym_is_choice(sym)) if (sym_is_choice(sym))
debug += " (choice)"; stream << " (choice)";
debug += "<br>"; debug += "<br>";
if (sym->rev_dep.expr) { if (sym->rev_dep.expr) {
debug += "reverse dep: "; stream << "reverse dep: ";
expr_print(sym->rev_dep.expr, expr_print_help, &debug, E_NONE); expr_print(sym->rev_dep.expr, expr_print_help, &stream, E_NONE);
debug += "<br>"; stream << "<br>";
} }
for (struct property *prop = sym->prop; prop; prop = prop->next) { for (struct property *prop = sym->prop; prop; prop = prop->next) {
switch (prop->type) { switch (prop->type) {
case P_PROMPT: case P_PROMPT:
case P_MENU: case P_MENU:
debug += QString().sprintf("prompt: <a href=\"m%s\">", sym->name); stream << "prompt: <a href=\"m" << sym->name << "\">";
debug += print_filter(prop->text); stream << print_filter(prop->text);
debug += "</a><br>"; stream << "</a><br>";
break; break;
case P_DEFAULT: case P_DEFAULT:
case P_SELECT: case P_SELECT:
...@@ -1147,30 +1157,33 @@ QString ConfigInfoView::debug_info(struct symbol *sym) ...@@ -1147,30 +1157,33 @@ QString ConfigInfoView::debug_info(struct symbol *sym)
case P_COMMENT: case P_COMMENT:
case P_IMPLY: case P_IMPLY:
case P_SYMBOL: case P_SYMBOL:
debug += prop_get_type_name(prop->type); stream << prop_get_type_name(prop->type);
debug += ": "; stream << ": ";
expr_print(prop->expr, expr_print_help, &debug, E_NONE); expr_print(prop->expr, expr_print_help,
debug += "<br>"; &stream, E_NONE);
stream << "<br>";
break; break;
case P_CHOICE: case P_CHOICE:
if (sym_is_choice(sym)) { if (sym_is_choice(sym)) {
debug += "choice: "; stream << "choice: ";
expr_print(prop->expr, expr_print_help, &debug, E_NONE); expr_print(prop->expr, expr_print_help,
debug += "<br>"; &stream, E_NONE);
stream << "<br>";
} }
break; break;
default: default:
debug += "unknown property: "; stream << "unknown property: ";
debug += prop_get_type_name(prop->type); stream << prop_get_type_name(prop->type);
debug += "<br>"; stream << "<br>";
} }
if (prop->visible.expr) { if (prop->visible.expr) {
debug += "&nbsp;&nbsp;&nbsp;&nbsp;dep: "; stream << "&nbsp;&nbsp;&nbsp;&nbsp;dep: ";
expr_print(prop->visible.expr, expr_print_help, &debug, E_NONE); expr_print(prop->visible.expr, expr_print_help,
debug += "<br>"; &stream, E_NONE);
stream << "<br>";
} }
} }
debug += "<br>"; stream << "<br>";
return debug; return debug;
} }
...@@ -1208,15 +1221,15 @@ QString ConfigInfoView::print_filter(const QString &str) ...@@ -1208,15 +1221,15 @@ QString ConfigInfoView::print_filter(const QString &str)
void ConfigInfoView::expr_print_help(void *data, struct symbol *sym, const char *str) void ConfigInfoView::expr_print_help(void *data, struct symbol *sym, const char *str)
{ {
QString* text = reinterpret_cast<QString*>(data); QTextStream *stream = reinterpret_cast<QTextStream *>(data);
QString str2 = print_filter(str);
if (sym && sym->name && !(sym->flags & SYMBOL_CONST)) { if (sym && sym->name && !(sym->flags & SYMBOL_CONST)) {
*text += QString().sprintf("<a href=\"s%s\">", sym->name); *stream << "<a href=\"s" << sym->name << "\">";
*text += str2; *stream << print_filter(str);
*text += "</a>"; *stream << "</a>";
} else } else {
*text += str2; *stream << print_filter(str);
}
} }
void ConfigInfoView::clicked(const QUrl &url) void ConfigInfoView::clicked(const QUrl &url)
...@@ -1228,7 +1241,6 @@ void ConfigInfoView::clicked(const QUrl &url) ...@@ -1228,7 +1241,6 @@ void ConfigInfoView::clicked(const QUrl &url)
struct menu *m = NULL; struct menu *m = NULL;
if (count < 1) { if (count < 1) {
qInfo() << "Clicked link is empty";
delete[] data; delete[] data;
return; return;
} }
...@@ -1241,7 +1253,6 @@ void ConfigInfoView::clicked(const QUrl &url) ...@@ -1241,7 +1253,6 @@ void ConfigInfoView::clicked(const QUrl &url)
strcat(data, "$"); strcat(data, "$");
result = sym_re_search(data); result = sym_re_search(data);
if (!result) { if (!result) {
qInfo() << "Clicked symbol is invalid:" << data;
delete[] data; delete[] data;
return; return;
} }
...@@ -1268,23 +1279,10 @@ void ConfigInfoView::clicked(const QUrl &url) ...@@ -1268,23 +1279,10 @@ void ConfigInfoView::clicked(const QUrl &url)
delete data; 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) ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow *parent)
......
...@@ -30,7 +30,7 @@ class ConfigSettings : public QSettings { ...@@ -30,7 +30,7 @@ class ConfigSettings : public QSettings {
}; };
enum colIdx { enum colIdx {
promptColIdx, nameColIdx, noColIdx, modColIdx, yesColIdx, dataColIdx, colNr promptColIdx, nameColIdx, noColIdx, modColIdx, yesColIdx, dataColIdx
}; };
enum listMode { enum listMode {
singleMode, menuMode, symbolMode, fullMode, listMode singleMode, menuMode, symbolMode, fullMode, listMode
...@@ -215,6 +215,7 @@ public slots: ...@@ -215,6 +215,7 @@ public slots:
class ConfigInfoView : public QTextBrowser { class ConfigInfoView : public QTextBrowser {
Q_OBJECT Q_OBJECT
typedef class QTextBrowser Parent; typedef class QTextBrowser Parent;
QMenu *contextMenu;
public: public:
ConfigInfoView(QWidget* parent, const char *name = 0); ConfigInfoView(QWidget* parent, const char *name = 0);
bool showDebug(void) const { return _showDebug; } bool showDebug(void) const { return _showDebug; }
...@@ -235,8 +236,7 @@ public slots: ...@@ -235,8 +236,7 @@ public slots:
QString debug_info(struct symbol *sym); QString debug_info(struct symbol *sym);
static QString print_filter(const QString &str); static QString print_filter(const QString &str);
static void expr_print_help(void *data, struct symbol *sym, const char *str); static void expr_print_help(void *data, struct symbol *sym, const char *str);
QMenu *createStandardContextMenu(const QPoint & pos); void contextMenuEvent(QContextMenuEvent *event);
void contextMenuEvent(QContextMenuEvent *e);
struct symbol *sym; struct symbol *sym;
struct menu *_menu; struct menu *_menu;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment