Skip to content

Commit 142c332

Browse files
committed
Merge tag 'kbuild-fixes-v5.8-4' of git://git.kernel.org/pub/scm/linux/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
2 parents 628e04d + 28ab576 commit 142c332

File tree

6 files changed

+16
-30
lines changed

6 files changed

+16
-30
lines changed

scripts/Makefile.modpost

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,6 @@ existing-targets := $(wildcard $(sort $(targets)))
124124

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

127-
PHONY += FORCE
128-
FORCE:
129-
130127
endif
131128

132129
.PHONY: $(PHONY)

scripts/kconfig/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# SPDX-License-Identifier: GPL-2.0-only
2-
*.moc
2+
/qconf-moc.cc
33
*conf-cfg
44

55
#

scripts/kconfig/Makefile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,19 +181,22 @@ $(addprefix $(obj)/, mconf.o $(lxdialog)): $(obj)/mconf-cfg
181181

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

187187
HOSTLDLIBS_qconf = $(shell . $(obj)/qconf-cfg && echo $$libs)
188188
HOSTCXXFLAGS_qconf.o = $(shell . $(obj)/qconf-cfg && echo $$cflags)
189+
HOSTCXXFLAGS_qconf-moc.o = $(shell . $(obj)/qconf-cfg && echo $$cflags)
189190

190-
$(obj)/qconf.o: $(obj)/qconf-cfg $(obj)/qconf.moc
191+
$(obj)/qconf.o: $(obj)/qconf-cfg
191192

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

195-
$(obj)/%.moc: $(src)/%.h $(obj)/qconf-cfg
196-
$(call cmd,moc)
196+
$(obj)/qconf-moc.cc: $(src)/qconf.h $(obj)/qconf-cfg FORCE
197+
$(call if_changed,moc)
198+
199+
targets += qconf-moc.cc
197200

198201
# gconf: Used for the gconfig target based on GTK+
199202
hostprogs += gconf

scripts/kconfig/qconf.cc

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
#include "lkc.h"
2424
#include "qconf.h"
2525

26-
#include "qconf.moc"
2726
#include "images.h"
2827

2928

@@ -308,10 +307,7 @@ ConfigList::ConfigList(ConfigView* p, const char *name)
308307
setVerticalScrollMode(ScrollPerPixel);
309308
setHorizontalScrollMode(ScrollPerPixel);
310309

311-
if (mode == symbolMode)
312-
setHeaderLabels(QStringList() << "Item" << "Name" << "N" << "M" << "Y" << "Value");
313-
else
314-
setHeaderLabels(QStringList() << "Option" << "Name" << "N" << "M" << "Y" << "Value");
310+
setHeaderLabels(QStringList() << "Option" << "Name" << "N" << "M" << "Y" << "Value");
315311

316312
connect(this, SIGNAL(itemSelectionChanged(void)),
317313
SLOT(updateSelection(void)));
@@ -392,11 +388,6 @@ void ConfigList::updateSelection(void)
392388
struct menu *menu;
393389
enum prop_type type;
394390

395-
if (mode == symbolMode)
396-
setHeaderLabels(QStringList() << "Item" << "Name" << "N" << "M" << "Y" << "Value");
397-
else
398-
setHeaderLabels(QStringList() << "Option" << "Name" << "N" << "M" << "Y" << "Value");
399-
400391
if (selectedItems().count() == 0)
401392
return;
402393

@@ -437,14 +428,13 @@ void ConfigList::updateList(ConfigItem* item)
437428
if (rootEntry != &rootmenu && (mode == singleMode ||
438429
(mode == symbolMode && rootEntry->parent != &rootmenu))) {
439430
item = (ConfigItem *)topLevelItem(0);
440-
if (!item && mode != symbolMode) {
431+
if (!item)
441432
item = new ConfigItem(this, 0, true);
442-
last = item;
443-
}
433+
last = item;
444434
}
445435
if ((mode == singleMode || (mode == symbolMode && !(rootEntry->flags & MENU_ROOT))) &&
446436
rootEntry->sym && rootEntry->prompt) {
447-
item = last ? last->nextSibling() : firstChild();
437+
item = last ? last->nextSibling() : nullptr;
448438
if (!item)
449439
item = new ConfigItem(this, last, rootEntry, true);
450440
else
@@ -1239,7 +1229,7 @@ void ConfigInfoView::clicked(const QUrl &url)
12391229

12401230
if (count < 1) {
12411231
qInfo() << "Clicked link is empty";
1242-
delete data;
1232+
delete[] data;
12431233
return;
12441234
}
12451235

@@ -1252,7 +1242,7 @@ void ConfigInfoView::clicked(const QUrl &url)
12521242
result = sym_re_search(data);
12531243
if (!result) {
12541244
qInfo() << "Clicked symbol is invalid:" << data;
1255-
delete data;
1245+
delete[] data;
12561246
return;
12571247
}
12581248

@@ -1735,7 +1725,6 @@ void ConfigMainWindow::listFocusChanged(void)
17351725

17361726
void ConfigMainWindow::goBack(void)
17371727
{
1738-
qInfo() << __FUNCTION__;
17391728
if (configList->rootEntry == &rootmenu)
17401729
return;
17411730

scripts/kconfig/qconf.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,6 @@ public slots:
9292
{
9393
return this;
9494
}
95-
ConfigItem* firstChild() const
96-
{
97-
return (ConfigItem *)children().first();
98-
}
9995
void addColumn(colIdx idx)
10096
{
10197
showColumn(idx);

scripts/mod/modpost.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ char *get_line(char **stringp)
144144
if (!orig || *orig == '\0')
145145
return NULL;
146146

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

0 commit comments

Comments
 (0)