All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv2] kconfig: simplify select-with-unmet-direct-dependency warning
@ 2010-12-06 19:27 Arnaud Lacombe
  2010-12-06 19:35 ` Arnaud Lacombe
  2010-12-20 15:10 ` Michal Marek
  0 siblings, 2 replies; 5+ messages in thread
From: Arnaud Lacombe @ 2010-12-06 19:27 UTC (permalink / raw)
  To: linux-kbuild; +Cc: Arnaud Lacombe, Catalin Marinas

Hi,

This is an updated version of the patch I sent in mid-September to simplify the
unmet dependency warnings.

 - Arnaud

---

This is an attempt to simplify the expressing printed by kconfig when a
symbol is selected but still has direct unmet dependency.

First, the symbol reverse dependency is split in sub-expression. Then,
each sub-expression is checked to ensure that it does not contains the
unmet dependency. This removes all the false-positive symbols which
already have the correct dependency. Finally, only the symbol doing the
"select" is printed, instead of the full dependency tree.

CC: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
---
 scripts/kconfig/expr.c      |   35 ++++++++++++++++++++++++++++++++++-
 scripts/kconfig/lkc_proto.h |    2 +-
 scripts/kconfig/symbol.c    |    6 +++++-
 3 files changed, 40 insertions(+), 3 deletions(-)

diff --git a/scripts/kconfig/expr.c b/scripts/kconfig/expr.c
index 330e7c0..0a56c54 100644
--- a/scripts/kconfig/expr.c
+++ b/scripts/kconfig/expr.c
@@ -1013,7 +1013,40 @@ int expr_compare_type(enum expr_type t1, enum expr_type t2)
 #endif
 }
 
-void expr_print(struct expr *e, void (*fn)(void *, struct symbol *, const char *), void *data, int prevtoken)
+static inline struct expr *
+expr_get_leftmost_symbol(const struct expr *e)
+{
+
+	if (e == NULL)
+		return NULL;
+
+	while (e->type != E_SYMBOL)
+		e = e->left.expr;
+
+	return expr_copy(e);
+}
+
+/*
+ * Given expression `e1' and `e2', returns the leaf of the longest
+ * sub-expression of `e1' not containing 'e2.
+ */
+struct expr *expr_simplify_unmet_dep(struct expr *e1, struct expr *e2)
+{
+	struct expr *e, *ret;
+
+	if (e1->type == E_OR)
+		return expr_alloc_and(
+		    expr_simplify_unmet_dep(e1->left.expr, e2),
+		    expr_simplify_unmet_dep(e1->right.expr, e2));
+
+	e = expr_alloc_and(expr_copy(e1), expr_copy(e2));
+	e = expr_eliminate_dups(e);
+	ret = (!expr_eq(e, e1)) ? e1 : NULL;
+	expr_free(e);
+	return expr_get_leftmost_symbol(ret);
+}
+
+void expr_print(const struct expr *e, void (*fn)(void *, struct symbol *, const char *), void *data, int prevtoken)
 {
 	if (!e) {
 		fn(data, NULL, "y");
diff --git a/scripts/kconfig/lkc_proto.h b/scripts/kconfig/lkc_proto.h
index 47fe9c3..466eb1a 100644
--- a/scripts/kconfig/lkc_proto.h
+++ b/scripts/kconfig/lkc_proto.h
@@ -51,4 +51,4 @@ P(prop_get_type_name,const char *,(enum prop_type type));
 
 /* expr.c */
 P(expr_compare_type,int,(enum expr_type t1, enum expr_type t2));
-P(expr_print,void,(struct expr *e, void (*fn)(void *, struct symbol *, const char *), void *data, int prevtoken));
+P(expr_print,void,(const struct expr *e, void (*fn)(void *, struct symbol *, const char *), void *data, int prevtoken));
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index 3acce4d..0c28a79 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -351,12 +351,16 @@ void sym_calc_value(struct symbol *sym)
 			}
 		calc_newval:
 			if (sym->dir_dep.tri == no && sym->rev_dep.tri != no) {
+				struct expr *e;
+				e = expr_simplify_unmet_dep(sym->rev_dep.expr,
+				    sym->dir_dep.expr);
 				fprintf(stderr, "warning: (");
-				expr_fprint(sym->rev_dep.expr, stderr);
+				expr_fprint(e, stderr);
 				fprintf(stderr, ") selects %s which has unmet direct dependencies (",
 					sym->name);
 				expr_fprint(sym->dir_dep.expr, stderr);
 				fprintf(stderr, ")\n");
+				expr_free(e);
 			}
 			newval.tri = EXPR_OR(newval.tri, sym->rev_dep.tri);
 		}
-- 
1.7.2.30.gc37d7.dirty


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCHv2] kconfig: simplify select-with-unmet-direct-dependency warning
  2010-12-06 19:27 [PATCHv2] kconfig: simplify select-with-unmet-direct-dependency warning Arnaud Lacombe
@ 2010-12-06 19:35 ` Arnaud Lacombe
  2010-12-20 15:10 ` Michal Marek
  1 sibling, 0 replies; 5+ messages in thread
From: Arnaud Lacombe @ 2010-12-06 19:35 UTC (permalink / raw)
  To: linux-kbuild; +Cc: Arnaud Lacombe, Catalin Marinas

Hi,

This is, associated with the diff to generate the, a list of the remaining
warning in the tree. The list has been sorted and duplicate have been removed. I
did not care about long line.

The tree these warning originate is v2.6.37-rc4 + the mess I sent this week-end
+ Michal rc-fixes + some local fixes.

 - Arnaud

ps: sorry in advance for the large mail.

CC: Catalin Marinas <catalin.marinas@arm.com>

diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index 5297dbf..ec7cd39 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -629,9 +629,20 @@ int main(int ac, char **av)
 	case alldefconfig:
 		conf_set_all_new_symbols(def_default);
 		break;
-	case randconfig:
-		conf_set_all_new_symbols(def_random);
+	case randconfig: {
+		struct symbol *sym;
+		int i, j;
+		for (i = 0; i < 1024; i++) {
+			conf_set_all_new_symbols(def_random);
+			for_all_symbols(j, sym) {
+				sym_calc_value(sym);
+			}
+			sym_clear_all_valid();
+			sym_clear_all_value();
+		}
+		exit(0);
 		break;
+	}
 	case defconfig:
 		conf_set_all_new_symbols(def_default);
 		break;
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index 0c28a79..1284444 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -433,6 +433,15 @@ void sym_clear_all_valid(void)
 		sym_calc_value(modules_sym);
 }
 
+void sym_clear_all_value(void)
+{
+	struct symbol *sym;
+	int i;
+
+	for_all_symbols(i, sym)
+		sym->flags &= ~SYMBOL_DEF_USER;
+}
+
 void sym_set_changed(struct symbol *sym)
 {
 	struct property *prop;

---


warning: (ARCH_LPC32XX && ARCH_S3C64XX && ARCH_TCC8K) selects USB_ARCH_HAS_OHCI which has unmet direct dependencies (USB_SUPPORT)
warning: (ARCH_OMAP2PLUS_TYPICAL) selects MENELAUS which has unmet direct dependencies (MFD_SUPPORT && I2C=y && ARCH_OMAP2)
warning: (ARCH_RPC && MACH_VPAC270 && MACH_REALVIEW_PB11MP && MACH_REALVIEW_PBA8 && MACH_REALVIEW_PBX && MACH_BAST_IDE && MACH_ANUBIS) selects HAVE_PATA_PLATFORM which has unmet direct dependencies (ATA && ATA_SFF)
warning: (ARCH_SHMOBILE) selects PM which has unmet direct dependencies (EXPERIMENTAL && !IA64_HP_SIM)
warning: (ARCH_SHMOBILE) selects PM_RUNTIME which has unmet direct dependencies (EXPERIMENTAL && PM)
warning: (ARCH_STMP3XXX && ARCH_OMAP3) selects USB_ARCH_HAS_EHCI which has unmet direct dependencies (USB_SUPPORT)
warning: (AX88796_93CX6 && RTL8180 && RTL8187 && ADM8211 && RT2400PCI && RT2500PCI && RT61PCI && RT2800PCI && R8187SE) selects EEPROM_93CX6 which has unmet direct dependencies (MISC_DEVICES)
warning: (BCM63XX_CPU_6338 && BCM63XX_CPU_6345) selects USB_OHCI_BIG_ENDIAN_DESC which has unmet direct dependencies (USB_SUPPORT && USB_OHCI_HCD)
warning: (BCM63XX_CPU_6338 && BCM63XX_CPU_6345) selects USB_OHCI_BIG_ENDIAN_MMIO which has unmet direct dependencies (USB_SUPPORT && USB_OHCI_HCD)
warning: (BFIN_MAC) selects BFIN_MAC_USE_L1 which has unmet direct dependencies (NETDEVICES && NET_ETHERNET && BFIN_MAC && (BF527 || BF537))
warning: (BOARD_HAMMERHEAD) selects USB_ARCH_HAS_HCD which has unmet direct dependencies (USB_SUPPORT)
warning: (CAVIUM_OCTEON_REFERENCE_BOARD && BCM63XX_CPU_6338) selects USB_ARCH_HAS_OHCI which has unmet direct dependencies (USB_SUPPORT)
warning: (CAVIUM_OCTEON_REFERENCE_BOARD) selects USB_ARCH_HAS_EHCI which has unmet direct dependencies (USB_SUPPORT)
warning: (COMPAT) selects COMPAT_BINFMT_ELF which has unmet direct dependencies (COMPAT && BINFMT_ELF)
warning: (CRASH_DUMP) selects RELOCATABLE which has unmet direct dependencies (PPC64)
warning: (CRYPTO_GHASH) selects CRYPTO_GF128MUL which has unmet direct dependencies (CRYPTO && EXPERIMENTAL)
warning: (E500 && PPC_FSL_BOOK3E) selects FSL_EMB_PERFMON which has unmet direct dependencies (E500 || PPC_83xx)
warning: (EP8248E && MPC85xx_MDS && MACB && IXP4XX_ETH && W90P910_ETH && MIPS_AU1X00_ENET && SH_ETH && BFIN_MAC && PXA168_ETH && TI_DAVINCI_EMAC && TI_DAVINCI_MDIO && ETHOC && GRETH && SMSC911X && DNET && TC35815 && R6040 && SMSC9420 && CPMAC && FEC && FEC_MPC52xx && XILINX_EMACLITE && BCM63XX_ENET && FS_ENET && OCTEON_MGMT_ETHERNET && SB1250_MAC && TIGON3 && FSL_PQ_MDIO && GIANFAR && UCC_GETH && MV643XX_ETH && XILINX_LL_TEMAC && S6GMAC && STMMAC_ETH && PASEMI_MAC && OCTEON_ETHERNET) selects PHYLIB which has unmet direct dependencies (!S390 && NETDEVICES)
warning: (ETRAX_AXISFLASHMAP && ETRAX_AXISFLASHMAP) selects MTD_BLOCK which has unmet direct dependencies (MTD && BLOCK)
warning: (ETRAX_ETHERNET && ETRAX_ETHERNET) selects MII which has unmet direct dependencies (NETDEVICES)
warning: (ETRAX_ETHERNET && ETRAX_ETHERNET) selects NET_ETHERNET which has unmet direct dependencies (NETDEVICES && !UML)
warning: (ETRAX_NANDFLASH && MTD_DOC2000 && MTD_DOC2001 && MTD_DOC2001PLUS) selects MTD_NAND_IDS which has unmet direct dependencies (MTD && MTD_NAND)
warning: (ETRAX_SPI_GPIO) selects SPI_ETRAX_GPIO which has unmet direct dependencies (SPI_MASTER && ETRAX_ARCH_V32 && EXPERIMENTAL)
warning: (ETRAX_SPI_SSER0 && ETRAX_SPI_SSER1) selects SPI_ETRAX_SSER which has unmet direct dependencies (SPI_MASTER && ETRAX_ARCH_V32 && EXPERIMENTAL)
warning: (ETRAX_USB_HOST && MOUSE_APPLETOUCH && MOUSE_BCM5974 && JOYSTICK_XPAD && TABLET_USB_ACECAD && TABLET_USB_AIPTEK && TABLET_USB_HANWANG && TABLET_USB_KBTAB && TABLET_USB_WACOM && TOUCHSCREEN_USB_COMPOSITE && INPUT_ATI_REMOTE && INPUT_ATI_REMOTE2 && INPUT_KEYSPAN_REMOTE && INPUT_POWERMATE && INPUT_YEALINK && INPUT_CM109) selects USB which has unmet direct dependencies (USB_SUPPORT && USB_ARCH_HAS_HCD)
warning: (G2_DMA) selects SH_DMA_API which has unmet direct dependencies (SH_DMA)
warning: (GENERIC_ACL && JFFS2_FS_POSIX_ACL && NFSD_V4 && NFS_ACL_SUPPORT && 9P_FS_POSIX_ACL) selects FS_POSIX_ACL which has unmet direct dependencies (BLOCK)
warning: (GPIO_RDC321X) selects MFD_RDC321X which has unmet direct dependencies (MFD_SUPPORT && PCI)
warning: (GPIO_VX855) selects MFD_VX855 which has unmet direct dependencies (MFD_SUPPORT && PCI)
warning: (I2C_ISCH && GPIO_SCH && GPIO_VX855 && GPIO_RDC321X) selects MFD_CORE which has unmet direct dependencies (MFD_SUPPORT)
warning: (I2C_ISCH && GPIO_SCH) selects LPC_SCH which has unmet direct dependencies (MFD_SUPPORT && PCI)
warning: (IA64) selects ARCH_SUPPORTS_MSI which has unmet direct dependencies (!IA64_HP_SIM)
warning: (IA64_GENERIC && IA64_DIG_VTD) selects DMAR which has unmet direct dependencies (!IA64_HP_SIM && IA64_GENERIC && ACPI && EXPERIMENTAL)
warning: (IA64_GENERIC && IA64_DIG_VTD) selects PCI_MSI which has unmet direct dependencies (!IA64_HP_SIM && PCI && ARCH_SUPPORTS_MSI)
warning: (IA64_GENERIC && IA64_SGI_SN2 && IA64_SGI_UV) selects NUMA which has unmet direct dependencies (!IA64_HP_SIM && !FLATMEM)
warning: (IMA) selects TCG_TPM which has unmet direct dependencies (HAS_IOMEM && EXPERIMENTAL)
warning: (ISDN_PPP) selects SLHC which has unmet direct dependencies (NETDEVICES)
warning: (IWM && WIMAX_IWMC3200_SDIO) selects IWMC3200TOP which has unmet direct dependencies (MISC_DEVICES && MMC && EXPERIMENTAL)
warning: (LOCKDEP && FAULT_INJECTION_STACKTRACE_FILTER && LATENCYTOP && FUNCTION_TRACER && KMEMCHECK) selects FRAME_POINTER which has unmet direct dependencies (DEBUG_KERNEL && (CRIS || M68K || M68KNOMMU || FRV || UML || AVR32 || SUPERH || BLACKFIN || MN10300) || ARCH_WANT_FRAME_POINTERS)
warning: (LOCKDEP && FAULT_INJECTION_STACKTRACE_FILTER && LATENCYTOP && FUNCTION_TRACER && KMEMCHECK) selects FRAME_POINTER which has unmet direct dependencies (MCOUNT)
warning: (MAC80211_LEDS && ADB_PMU_LED_IDE && INPUT_WINBOND_CIR) selects LEDS_TRIGGERS which has unmet direct dependencies (NEW_LEDS && LEDS_CLASS)
warning: (MACH_ANUBIS && SMDK6410_WM1190_EV1 && SMDK6410_WM1192_EV1) selects S3C24XX_GPIO_EXTRA64 which has unmet direct dependencies (PLAT_S3C24XX)
warning: (MACH_DAVINCI_DA830_EVM) selects GPIO_PCF857X which has unmet direct dependencies (GPIOLIB && I2C)
warning: (MACH_DOVE_DB && MACH_DB88F5281 && MACH_RD88F5182 && MACH_KUROBOX_PRO && MACH_DNS323 && MACH_LINKSTATION_PRO && MACH_LINKSTATION_MINI && MACH_LINKSTATION_LS_HGL && MACH_EDMINI_V2 && MACH_D2NET && MACH_BIGDISK && MACH_NET2BIG) selects I2C_BOARDINFO which has unmet direct dependencies (I2C)
warning: (MACH_MINI2440) selects LEDS_TRIGGER_BACKLIGHT which has unmet direct dependencies (NEW_LEDS && LEDS_CLASS && LEDS_TRIGGERS)
warning: (MEDIA_TUNER) selects MEDIA_TUNER_TEA5761 which has unmet direct dependencies (MEDIA_SUPPORT && VIDEO_MEDIA && I2C && EXPERIMENTAL)
warning: (MICROBLAZE) selects USB_ARCH_HAS_EHCI which has unmet direct dependencies (USB_SUPPORT)
warning: (MMC_TIFM_SD && MEMSTICK_TIFM_MS) selects TIFM_CORE which has unmet direct dependencies (MISC_DEVICES && EXPERIMENTAL && PCI)
warning: (MOUSE_APPLETOUCH && MOUSE_BCM5974 && JOYSTICK_XPAD && TABLET_USB_ACECAD && TABLET_USB_AIPTEK && TABLET_USB_HANWANG && TABLET_USB_KBTAB && TABLET_USB_WACOM && TOUCHSCREEN_USB_COMPOSITE && INPUT_ATI_REMOTE && INPUT_ATI_REMOTE2 && INPUT_KEYSPAN_REMOTE && INPUT_POWERMATE && INPUT_YEALINK && INPUT_CM109 && IR_IMON && IR_MCEUSB && IR_STREAMZAP) selects USB which has unmet direct dependencies (USB_SUPPORT && USB_ARCH_HAS_HCD)
warning: (MPC836x_RDK && MTD_NAND_FSL_ELBC && MTD_NAND_FSL_UPM) selects FSL_LBC which has unmet direct dependencies (FSL_SOC)
warning: (MTD_DOC2000 && MTD_DOC2001 && MTD_DOC2001PLUS) selects MTD_NAND_IDS which has unmet direct dependencies (MTD && MTD_NAND)
warning: (NETFILTER_XT_MATCH_REALM) selects NET_CLS_ROUTE which has unmet direct dependencies (NET && NET_SCHED)
warning: (NUMA && IA64_GENERIC && IA64_SGI_SN2 && IA64_SGI_UV) selects ACPI_NUMA which has unmet direct dependencies (ACPI && NUMA && (X86 || IA64))
warning: (OLPC) selects OLPC_OPENFIRMWARE which has unmet direct dependencies (X86_32 && !X86_64 && !X86_PAE)
warning: (PAGE_POISONING) selects DEBUG_PAGEALLOC which has unmet direct dependencies (DEBUG_KERNEL && ARCH_SUPPORTS_DEBUG_PAGEALLOC && (!HIBERNATION || !PPC && !SPARC) && !KMEMCHECK)
warning: (PARISC) selects GENERIC_HARDIRQS_NO__DO_IRQ which has unmet direct dependencies (HAVE_GENERIC_HARDIRQS)
warning: (PERF_EVENTS) selects IRQ_WORK which has unmet direct dependencies (HAVE_IRQ_WORK)
warning: (PLAT_S3C64XX) selects SAMSUNG_WAKEMASK which has unmet direct dependencies (PLAT_SAMSUNG && PM)
warning: (PM_SLEEP_SMP) selects HOTPLUG_CPU which has unmet direct dependencies (SMP && HOTPLUG && EXPERIMENTAL && (PPC_PSERIES || PPC_PMAC))
warning: (POWERTV) selects USB_OHCI_LITTLE_ENDIAN which has unmet direct dependencies (USB_SUPPORT && USB_OHCI_HCD)
warning: (PPC_CELL_NATIVE && 440EPX && 440GRX && 440GX && 440SPe && 460EX && 460SX && APM821xx && 405EX) selects IBM_NEW_EMAC_EMAC4 which has unmet direct dependencies (NETDEVICES && NET_ETHERNET)
warning: (PPC_CELL_NATIVE && 440GX && 460EX && 460SX && APM821xx) selects IBM_NEW_EMAC_TAH which has unmet direct dependencies (NETDEVICES && NET_ETHERNET)
warning: (PPC_CELL_NATIVE && BLUESTONE && CANYONLANDS && GLACIER && EIGER && 440EPX && 440GRX && 440GX && 460SX && 405EX) selects IBM_NEW_EMAC_RGMII which has unmet direct dependencies (NETDEVICES && NET_ETHERNET)
warning: (PPC_CELL_NATIVE && CANYONLANDS && GLACIER && 440EP && 440EPX && 440GRX && 440GP && 440GX && 460SX && 405GP) selects IBM_NEW_EMAC_ZMII which has unmet direct dependencies (NETDEVICES && NET_ETHERNET)
warning: (PPC_PS3 && 440EP) selects USB_ARCH_HAS_OHCI which has unmet direct dependencies (USB_SUPPORT)
warning: (PPC_PS3 && PPC_CELLEB && XPS_USB_HCD_XILINX && USB_OCTEON_EHCI) selects USB_EHCI_BIG_ENDIAN_MMIO which has unmet direct dependencies (USB_SUPPORT && USB_EHCI_HCD && (PPC_CELLEB || PPC_PS3 || 440EPX || ARCH_IXP4XX || XPS_USB_HCD_XILINX || PPC_MPC512x || CPU_CAVIUM_OCTEON))
warning: (PPC_PS3 && PPC_CELLEB) selects USB_OHCI_BIG_ENDIAN_MMIO which has unmet direct dependencies (USB_SUPPORT && USB_OHCI_HCD)
warning: (PPC_PS3 && SPU_FS) selects MEMORY_HOTPLUG which has unmet direct dependencies ((SPARSEMEM || X86_64_ACPI_NUMA) && HOTPLUG && ARCH_ENABLE_MEMORY_HOTPLUG && (IA64 || X86 || PPC_BOOK3S_64 || SUPERH || S390))
warning: (PPC_PS3) selects USB_OHCI_LITTLE_ENDIAN which has unmet direct dependencies (USB_SUPPORT && USB_OHCI_HCD)
warning: (RADIO_MIROPCM20) selects SND_ISA which has unmet direct dependencies (SOUND && !M68K && SND && ISA && ISA_DMA_API)
warning: (SA1100_H3100 && SA1100_H3600) selects HTC_EGPIO which has unmet direct dependencies (MFD_SUPPORT && GENERIC_HARDIRQS && GPIOLIB && ARM)
warning: (SB1XXX_CORELIS) selects DEBUG_INFO which has unmet direct dependencies (DEBUG_KERNEL)
warning: (SCSI_SNI_53C710) selects 53C700_LE_ON_BE which has unmet direct dependencies (SCSI_LOWLEVEL && SCSI && SCSI_LASI700)
warning: (SCSI_SRP) selects SCSI_TGT which has unmet direct dependencies (SCSI && EXPERIMENTAL)
warning: (SIBYTE_SWARM && SIBYTE_LITTLESUR) selects HAVE_PATA_PLATFORM which has unmet direct dependencies (ATA && ATA_SFF)
warning: (SINGLE_MEMORY_CHUNK) selects NEED_MULTIPLE_NODES which has unmet direct dependencies (DISCONTIGMEM || NUMA)
warning: (SMDK6410_WM1192_EV1) selects MFD_WM831X which has unmet direct dependencies (MFD_SUPPORT && GENERIC_HARDIRQS)
warning: (SMDK6410_WM1192_EV1) selects MFD_WM831X_I2C which has unmet direct dependencies (MFD_SUPPORT && I2C=y && GENERIC_HARDIRQS)
warning: (SMP) selects IRQ_PER_CPU which has unmet direct dependencies (HAVE_GENERIC_HARDIRQS)
warning: (SMP) selects TICKSOURCE_CORETMR which has unmet direct dependencies (GENERIC_CLOCKEVENTS)
warning: (SND_SOC_SH4_SIU) selects SH_DMAE which has unmet direct dependencies (DMADEVICES && (SUPERH && SH_DMA || ARM && ARCH_SHMOBILE) && !SH_DMA_API)
warning: (SOC_TX4927 && SOC_TX4938 && SOC_TX4939) selects HAS_TXX9_ACLC which has unmet direct dependencies (SOUND && !M68K && SND && SND_SOC)
warning: (STUB_POULSBO && DRM_I915 && DRM_NOUVEAU) selects ACPI_VIDEO which has unmet direct dependencies (ACPI && X86 && BACKLIGHT_CLASS_DEVICE && VIDEO_OUTPUT_CONTROL && INPUT)
warning: (STUB_POULSBO && FB_BACKLIGHT && DRM_I915 && PANEL_SHARP_LS037V7DW01 && PANEL_ACX565AKM && USB_APPLEDISPLAY && ASUS_LAPTOP && SONY_LAPTOP && THINKPAD_ACPI && EEEPC_LAPTOP && ACPI_ASUS && ACPI_CMPC) selects BACKLIGHT_CLASS_DEVICE which has unmet direct dependencies (HAS_IOMEM && BACKLIGHT_LCD_SUPPORT)
warning: (ST_BT) selects TI_ST which has unmet direct dependencies (MISC_DEVICES && RFKILL)
warning: (UBIFS_FS_DEBUG && LOCKDEP && LATENCYTOP) selects KALLSYMS_ALL which has unmet direct dependencies (DEBUG_KERNEL && KALLSYMS)
warning: (USB_MUSB_HDRC_HCD && USB_MUSB_OTG && USB_LANGWELL_OTG) selects USB_OTG which has unmet direct dependencies (USB_SUPPORT && USB && EXPERIMENTAL && USB_SUSPEND)
warning: (USB_WUSB) selects UWB which has unmet direct dependencies (EXPERIMENTAL && PCI)
warning: (VIDEO_AU0828) selects DVB_AU8522 which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && I2C && VIDEO_V4L2)
warning: (VIDEO_BT848_DVB) selects DVB_BT8XX which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && PCI && I2C && VIDEO_BT848)
warning: (VIDEO_CX23885 && DVB_USB_DIB0700 && DVB_USB_CXUSB) selects DVB_DIB7000P which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && I2C)
warning: (VIDEO_CX23885 && DVB_USB_DW2102) selects DVB_DS3000 which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && I2C)
warning: (VIDEO_CX23885 && DVB_USB_DW2102) selects DVB_STV6110 which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && I2C)
warning: (VIDEO_CX23885 && VIDEO_CX18 && VIDEO_PVRUSB2_DVB) selects DVB_S5H1409 which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && I2C)
warning: (VIDEO_CX88_DVB && DVB_USB_CXUSB) selects DVB_CX22702 which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && I2C)
warning: (VIDEO_CX88_DVB && DVB_USB_DW2102 && DVB_USB_AZ6027) selects DVB_STB6100 which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && I2C)
warning: (VIDEO_CX88_DVB && DVB_USB_DW2102 && DVB_USB_LME2510) selects DVB_STV0288 which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && I2C)
warning: (VIDEO_CX88_DVB && DVB_USB_DW2102) selects DVB_STB6000 which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && I2C)
warning: (VIDEO_CX88_DVB && DVB_USB_OPERA1 && DVB_USB_DW2102) selects DVB_STV0299 which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && I2C)
warning: (VIDEO_CX88_DVB && VIDEO_CX23885 && DVB_USB_DW2102) selects DVB_CX24116 which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && I2C)
warning: (VIDEO_CX88_DVB && VIDEO_CX23885 && DVB_USB_DW2102) selects DVB_STV0900 which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && I2C)
warning: (VIDEO_CX88_DVB && VIDEO_CX23885 && VIDEO_PVRUSB2_DVB && VIDEO_EM28XX_DVB && DVB_USB_CXUSB) selects DVB_LGDT330X which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && I2C)
warning: (VIDEO_CX88_DVB && VIDEO_CX23885 && VIDEO_SAA7164 && VIDEO_PVRUSB2_DVB && DVB_USB_DIB0700) selects DVB_S5H1411 which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && I2C)
warning: (VIDEO_CX88_DVB) selects DVB_CX24123 which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && I2C)
warning: (VIDEO_CX88_DVB) selects DVB_OR51132 which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && I2C)
warning: (VIDEO_EM28XX_DVB && DVB_USB_DW2102 && DVB_USB_ANYSEE) selects DVB_TDA10023 which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && I2C)
warning: (VIDEO_SAA7134_DVB && DVB_USB_DIB0700) selects DVB_LGDT3305 which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && I2C)
warning: (VIDEO_SAA7134_DVB && DVB_USB_DW2102) selects DVB_MT312 which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && I2C)
warning: (VIDEO_SAA7134_DVB && DVB_USB_DW2102) selects DVB_ZL10039 which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && I2C)
warning: (VIDEO_SAA7134_DVB && DVB_USB_M920X) selects DVB_TDA1004X which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && I2C)
warning: (VIDEO_SAA7134_DVB && DVB_USB_TTUSB2 && DVB_USB_LME2510) selects DVB_TDA10086 which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && I2C)
warning: (VIDEO_SAA7134_DVB && DVB_USB_TTUSB2 && DVB_USB_LME2510) selects DVB_TDA826X which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && I2C)
warning: (VIDEO_SAA7134_DVB && VIDEO_CX23885 && DVB_USB_TTUSB2) selects DVB_LNBP21 which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && I2C)
warning: (VIDEO_SAA7134_DVB && VIDEO_CX23885 && VIDEO_SAA7164 && VIDEO_PVRUSB2_DVB) selects DVB_TDA10048 which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && I2C)
warning: (VIDEO_SAA7134_DVB && VIDEO_CX88_DVB && DVB_USB_A800 && DVB_USB_DIBUSB_MB && DVB_USB_UMT_010 && DVB_USB_CXUSB && DVB_USB_DIGITV && DVB_USB_NOVA_T_USB2 && DVB_USB_OPERA1 && DVB_USB_DW2102 && DVB_USB_ANYSEE && DVB_USB_AF9015) selects DVB_PLL which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && I2C)
warning: (VIDEO_SAA7134_DVB && VIDEO_CX88_DVB && DVB_USB_UMT_010 && DVB_USB_CXUSB && DVB_USB_M920X && DVB_USB_DIGITV && DVB_USB_ANYSEE) selects DVB_MT352 which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && I2C)
warning: (VIDEO_SAA7134_DVB && VIDEO_CX88_DVB && VIDEO_CX23885 && VIDEO_EM28XX_DVB && DVB_USB_CXUSB && DVB_USB_GL861 && DVB_USB_AU6610 && DVB_USB_ANYSEE && DVB_USB_DTV5100 && DVB_USB_CE6230 && VIDEO_TM6000_DVB) selects DVB_ZL10353 which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && I2C)
warning: (VIDEO_SAA7134_DVB && VIDEO_CX88_DVB) selects DVB_ISL6421 which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && I2C)
warning: (VIDEO_SAA7134_DVB && VIDEO_CX88_DVB) selects DVB_NXT200X which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && I2C)
warning: (VIDEO_SAA7134_DVB) selects DVB_ISL6405 which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && I2C)
warning: (VIDEO_SAA7134_DVB) selects DVB_ZL10036 which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && I2C)

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCHv2] kconfig: simplify select-with-unmet-direct-dependency warning
  2010-12-06 19:27 [PATCHv2] kconfig: simplify select-with-unmet-direct-dependency warning Arnaud Lacombe
  2010-12-06 19:35 ` Arnaud Lacombe
@ 2010-12-20 15:10 ` Michal Marek
  2010-12-20 15:11   ` Michal Marek
  2010-12-20 16:48   ` Catalin Marinas
  1 sibling, 2 replies; 5+ messages in thread
From: Michal Marek @ 2010-12-20 15:10 UTC (permalink / raw)
  To: Arnaud Lacombe; +Cc: linux-kbuild, Catalin Marinas

On Mon, Dec 06, 2010 at 02:27:49PM -0500, Arnaud Lacombe wrote:
> Hi,
> 
> This is an updated version of the patch I sent in mid-September to simplify the
> unmet dependency warnings.
> 
>  - Arnaud
> 
> ---
> 
> This is an attempt to simplify the expressing printed by kconfig when a
> symbol is selected but still has direct unmet dependency.
> 
> First, the symbol reverse dependency is split in sub-expression. Then,
> each sub-expression is checked to ensure that it does not contains the
> unmet dependency. This removes all the false-positive symbols which
> already have the correct dependency. Finally, only the symbol doing the
> "select" is printed, instead of the full dependency tree.
> 
> CC: Catalin Marinas <catalin.marinas@arm.com>
> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
> ---
>  scripts/kconfig/expr.c      |   35 ++++++++++++++++++++++++++++++++++-
>  scripts/kconfig/lkc_proto.h |    2 +-
>  scripts/kconfig/symbol.c    |    6 +++++-
>  3 files changed, 40 insertions(+), 3 deletions(-)

I applied this to kbuild-2.6.git#kconfig now. If someone encounters a
warning that hides the actual culprit due to this patch, we will have to
solve it somehow, but otherwise these simplified expressions are wanted
IMO.

Michal

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCHv2] kconfig: simplify select-with-unmet-direct-dependency warning
  2010-12-20 15:10 ` Michal Marek
@ 2010-12-20 15:11   ` Michal Marek
  2010-12-20 16:48   ` Catalin Marinas
  1 sibling, 0 replies; 5+ messages in thread
From: Michal Marek @ 2010-12-20 15:11 UTC (permalink / raw)
  To: Arnaud Lacombe; +Cc: linux-kbuild, Catalin Marinas

On Mon, Dec 20, 2010 at 04:10:47PM +0100, Michal Marek wrote:
> On Mon, Dec 06, 2010 at 02:27:49PM -0500, Arnaud Lacombe wrote:
> > Hi,
> > 
> > This is an updated version of the patch I sent in mid-September to simplify the
> > unmet dependency warnings.
> > 
> >  - Arnaud
> > 
> > ---
> > 
> > This is an attempt to simplify the expressing printed by kconfig when a
> > symbol is selected but still has direct unmet dependency.
> > 
> > First, the symbol reverse dependency is split in sub-expression. Then,
> > each sub-expression is checked to ensure that it does not contains the
> > unmet dependency. This removes all the false-positive symbols which
> > already have the correct dependency. Finally, only the symbol doing the
> > "select" is printed, instead of the full dependency tree.
> > 
> > CC: Catalin Marinas <catalin.marinas@arm.com>
> > Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
> > ---
> >  scripts/kconfig/expr.c      |   35 ++++++++++++++++++++++++++++++++++-
> >  scripts/kconfig/lkc_proto.h |    2 +-
> >  scripts/kconfig/symbol.c    |    6 +++++-
> >  3 files changed, 40 insertions(+), 3 deletions(-)
> 
> I applied this to kbuild-2.6.git#kconfig now. If someone encounters a
> warning that hides the actual culprit due to this patch, we will have to
> solve it somehow, but otherwise these simplified expressions are wanted
> IMO.

BTW, this called for a minor warning fix:


From: Michal Marek <mmarek@suse.cz>
Subject: [PATCH] kconfig: Make expr_copy() take a const argument

Fixes
scripts/kconfig/expr.c: In function ‘expr_get_leftmost_symbol’:
scripts/kconfig/expr.c:1026:2: warning: passing argument 1 of ‘expr_copy’ discards qualifiers from pointer target type
scripts/kconfig/expr.c:67:14: note: expected ‘struct expr *’ but argument is of type ‘const struct expr *’

Signed-off-by: Michal Marek <mmarek@suse.cz>

diff --git a/scripts/kconfig/expr.c b/scripts/kconfig/expr.c
index 65531a7..0010034 100644
--- a/scripts/kconfig/expr.c
+++ b/scripts/kconfig/expr.c
@@ -64,7 +64,7 @@ struct expr *expr_alloc_or(struct expr *e1, struct expr *e2)
 	return e2 ? expr_alloc_two(E_OR, e1, e2) : e1;
 }
 
-struct expr *expr_copy(struct expr *org)
+struct expr *expr_copy(const struct expr *org)
 {
 	struct expr *e;
 
diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h
index b267933..76ee319 100644
--- a/scripts/kconfig/expr.h
+++ b/scripts/kconfig/expr.h
@@ -193,7 +193,7 @@ struct expr *expr_alloc_two(enum expr_type type, struct expr *e1, struct expr *e
 struct expr *expr_alloc_comp(enum expr_type type, struct symbol *s1, struct symbol *s2);
 struct expr *expr_alloc_and(struct expr *e1, struct expr *e2);
 struct expr *expr_alloc_or(struct expr *e1, struct expr *e2);
-struct expr *expr_copy(struct expr *org);
+struct expr *expr_copy(const struct expr *org);
 void expr_free(struct expr *e);
 int expr_eq(struct expr *e1, struct expr *e2);
 void expr_eliminate_eq(struct expr **ep1, struct expr **ep2);

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCHv2] kconfig: simplify select-with-unmet-direct-dependency warning
  2010-12-20 15:10 ` Michal Marek
  2010-12-20 15:11   ` Michal Marek
@ 2010-12-20 16:48   ` Catalin Marinas
  1 sibling, 0 replies; 5+ messages in thread
From: Catalin Marinas @ 2010-12-20 16:48 UTC (permalink / raw)
  To: Michal Marek; +Cc: Arnaud Lacombe, linux-kbuild

On Mon, 2010-12-20 at 15:10 +0000, Michal Marek wrote:
> On Mon, Dec 06, 2010 at 02:27:49PM -0500, Arnaud Lacombe wrote:
> > This is an attempt to simplify the expressing printed by kconfig when a
> > symbol is selected but still has direct unmet dependency.
> >
> > First, the symbol reverse dependency is split in sub-expression. Then,
> > each sub-expression is checked to ensure that it does not contains the
> > unmet dependency. This removes all the false-positive symbols which
> > already have the correct dependency. Finally, only the symbol doing the
> > "select" is printed, instead of the full dependency tree.
> >
> > CC: Catalin Marinas <catalin.marinas@arm.com>
> > Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
> > ---
> >  scripts/kconfig/expr.c      |   35 ++++++++++++++++++++++++++++++++++-
> >  scripts/kconfig/lkc_proto.h |    2 +-
> >  scripts/kconfig/symbol.c    |    6 +++++-
> >  3 files changed, 40 insertions(+), 3 deletions(-)
> 
> I applied this to kbuild-2.6.git#kconfig now. If someone encounters a
> warning that hides the actual culprit due to this patch, we will have to
> solve it somehow, but otherwise these simplified expressions are wanted
> IMO.

It indeed simplified some of the long expressions but the resulting
expression looks slightly different. The original warning (I temporarily
removed the ARM CPU_32v6K dependency on CPU_V7 to trigger it):

warning: (CPU_V7 && !ARCH_OMAP2 || CPU_MMP2 && ARCH_MMP) selects
CPU_32v6K which has unmet direct dependencies (CPU_V6)

With this patch, I get:

warning: (CPU_V7 && CPU_MMP2) selects CPU_32v6K which has unmet direct
dependencies (CPU_V6)

Shouldn't we have a '||' between CPU_V7 and CPU_MMP2 (or something else,
comma)?


BTW, unrelated to this patch, I noticed this warning from CPU_MMP2 which
in general shouldn't happen:

config CPU_32v6K
	bool
	depends on CPU_V6

config CPU_MMP2
	bool
	select CPU_V6
	select CPU_32v6K

CPU_MMP2 selects both CPU_V6 and CPU_32v6K but we still get the warning
form CPU_MMP2. Is there an easy way to solve this?

-- 
Catalin



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-12-20 16:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-06 19:27 [PATCHv2] kconfig: simplify select-with-unmet-direct-dependency warning Arnaud Lacombe
2010-12-06 19:35 ` Arnaud Lacombe
2010-12-20 15:10 ` Michal Marek
2010-12-20 15:11   ` Michal Marek
2010-12-20 16:48   ` Catalin Marinas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.