Skip to content

Commit

Permalink
Merge tag 'kbuild-fixes-v5.8-4' of git://git.kernel.org/pub/scm/linux…
Browse files Browse the repository at this point in the history
…/kernel/git/masahiroy/linux-kbuild

Pull Kbuild fixes from Masahiro Yamada:

 - clean the generated moc file for xconfig

 - fix xconfig bugs, and revert some bad commits

* tag 'kbuild-fixes-v5.8-4' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
  kbuild: remove redundant FORCE definition in scripts/Makefile.modpost
  kconfig: qconf: remove wrong ConfigList::firstChild()
  Revert "kconfig: qconf: don't show goback button on splitMode"
  Revert "kconfig: qconf: Change title for the item window"
  kconfig: qconf: remove "goBack" debug message
  kconfig: qconf: use delete[] instead of delete to free array
  kconfig: qconf: compile moc object separately
  kconfig: qconf: use if_changed for qconf.moc rule
  modpost: explain why we can't use strsep
  • Loading branch information
Linus Torvalds committed Aug 2, 2020
2 parents 628e04d + 28ab576 commit 142c332
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 30 deletions.
3 changes: 0 additions & 3 deletions scripts/Makefile.modpost
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,6 @@ existing-targets := $(wildcard $(sort $(targets)))

-include $(foreach f,$(existing-targets),$(dir $(f)).$(notdir $(f)).cmd)

PHONY += FORCE
FORCE:

endif

.PHONY: $(PHONY)
2 changes: 1 addition & 1 deletion scripts/kconfig/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-only
*.moc
/qconf-moc.cc
*conf-cfg

#
Expand Down
13 changes: 8 additions & 5 deletions scripts/kconfig/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -181,19 +181,22 @@ $(addprefix $(obj)/, mconf.o $(lxdialog)): $(obj)/mconf-cfg

# qconf: Used for the xconfig target based on Qt
hostprogs += qconf
qconf-cxxobjs := qconf.o
qconf-cxxobjs := qconf.o qconf-moc.o
qconf-objs := images.o $(common-objs)

HOSTLDLIBS_qconf = $(shell . $(obj)/qconf-cfg && echo $$libs)
HOSTCXXFLAGS_qconf.o = $(shell . $(obj)/qconf-cfg && echo $$cflags)
HOSTCXXFLAGS_qconf-moc.o = $(shell . $(obj)/qconf-cfg && echo $$cflags)

$(obj)/qconf.o: $(obj)/qconf-cfg $(obj)/qconf.moc
$(obj)/qconf.o: $(obj)/qconf-cfg

quiet_cmd_moc = MOC $@
cmd_moc = $(shell . $(obj)/qconf-cfg && echo $$moc) -i $< -o $@
cmd_moc = $(shell . $(obj)/qconf-cfg && echo $$moc) $< -o $@

$(obj)/%.moc: $(src)/%.h $(obj)/qconf-cfg
$(call cmd,moc)
$(obj)/qconf-moc.cc: $(src)/qconf.h $(obj)/qconf-cfg FORCE
$(call if_changed,moc)

targets += qconf-moc.cc

# gconf: Used for the gconfig target based on GTK+
hostprogs += gconf
Expand Down
23 changes: 6 additions & 17 deletions scripts/kconfig/qconf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include "lkc.h"
#include "qconf.h"

#include "qconf.moc"
#include "images.h"


Expand Down Expand Up @@ -308,10 +307,7 @@ ConfigList::ConfigList(ConfigView* p, const char *name)
setVerticalScrollMode(ScrollPerPixel);
setHorizontalScrollMode(ScrollPerPixel);

if (mode == symbolMode)
setHeaderLabels(QStringList() << "Item" << "Name" << "N" << "M" << "Y" << "Value");
else
setHeaderLabels(QStringList() << "Option" << "Name" << "N" << "M" << "Y" << "Value");
setHeaderLabels(QStringList() << "Option" << "Name" << "N" << "M" << "Y" << "Value");

connect(this, SIGNAL(itemSelectionChanged(void)),
SLOT(updateSelection(void)));
Expand Down Expand Up @@ -392,11 +388,6 @@ void ConfigList::updateSelection(void)
struct menu *menu;
enum prop_type type;

if (mode == symbolMode)
setHeaderLabels(QStringList() << "Item" << "Name" << "N" << "M" << "Y" << "Value");
else
setHeaderLabels(QStringList() << "Option" << "Name" << "N" << "M" << "Y" << "Value");

if (selectedItems().count() == 0)
return;

Expand Down Expand Up @@ -437,14 +428,13 @@ void ConfigList::updateList(ConfigItem* item)
if (rootEntry != &rootmenu && (mode == singleMode ||
(mode == symbolMode && rootEntry->parent != &rootmenu))) {
item = (ConfigItem *)topLevelItem(0);
if (!item && mode != symbolMode) {
if (!item)
item = new ConfigItem(this, 0, true);
last = item;
}
last = item;
}
if ((mode == singleMode || (mode == symbolMode && !(rootEntry->flags & MENU_ROOT))) &&
rootEntry->sym && rootEntry->prompt) {
item = last ? last->nextSibling() : firstChild();
item = last ? last->nextSibling() : nullptr;
if (!item)
item = new ConfigItem(this, last, rootEntry, true);
else
Expand Down Expand Up @@ -1239,7 +1229,7 @@ void ConfigInfoView::clicked(const QUrl &url)

if (count < 1) {
qInfo() << "Clicked link is empty";
delete data;
delete[] data;
return;
}

Expand All @@ -1252,7 +1242,7 @@ void ConfigInfoView::clicked(const QUrl &url)
result = sym_re_search(data);
if (!result) {
qInfo() << "Clicked symbol is invalid:" << data;
delete data;
delete[] data;
return;
}

Expand Down Expand Up @@ -1735,7 +1725,6 @@ void ConfigMainWindow::listFocusChanged(void)

void ConfigMainWindow::goBack(void)
{
qInfo() << __FUNCTION__;
if (configList->rootEntry == &rootmenu)
return;

Expand Down
4 changes: 0 additions & 4 deletions scripts/kconfig/qconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,6 @@ public slots:
{
return this;
}
ConfigItem* firstChild() const
{
return (ConfigItem *)children().first();
}
void addColumn(colIdx idx)
{
showColumn(idx);
Expand Down
1 change: 1 addition & 0 deletions scripts/mod/modpost.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ char *get_line(char **stringp)
if (!orig || *orig == '\0')
return NULL;

/* don't use strsep here, it is not available everywhere */
next = strchr(orig, '\n');
if (next)
*next++ = '\0';
Expand Down

0 comments on commit 142c332

Please sign in to comment.