On 11/07/2018 05:13 AM, Paul Bolle wrote: > Prarit, > > Prarit Bhargava schreef op di 06-11-2018 om 19:45 [-0500]: >> I found 227 using, find_dead_configs.sh: > > Looking into this I found a silly bug in check-configs.pl. Apparently I'm too > dumb to use perl's grep() properly, which made that script miss 45 Kconfig > symbols! Hope to send a patch shortly. > > Below I detail why I think that find_dead_configs.sh contains (5 + 14 =) 19 > false positives and omits 41 false negatives. > Cool. > So I think the proper score for either script should be 249. Shall I send an > updated patch? (Off list, because the first patch already turned out huge.) > Haha :) That's the problem with these patches -- they're huge! Looking at your explanation of the false positives and negatives below I think you should send out a new patch. After you do the new patch perhaps you could do git clone https://src.fedoraproject.org/git/rpms/kernel.git make prep mkdir /tmp/oldconfigs cp kernel/kernel-4.19.fc30/linux-4.20.0-0.rc1.git0.1.fc30.x86_64/configs/*.config /tmp/oldconfigs rm -rf kernel/kernel-4.19.fc30/ [git am your patch] make prep mkdir /tmp/newconfigs cp kernel/kernel-4.19.fc30/linux-4.20.0-0.rc1.git0.1.fc30.x86_64/configs/*.config /tmp/newconfigs and then do a diff -urNp /tmp/oldconfig /tmp/newconfigs If everything is done right there should be no net change. P. >> #!/bin/bash >> >> # git clone https://src.fedoraproject.org/git/rpms/kernel.git >> # copied this script into top dir, ie kernel >> # make prep >> # -- provides kernel/kernel-4.19.fc30/linux-4.20.0-0.rc1.git0.1.fc30.x86_64/configs >> # then run ./find_dead_configs.sh >> >> awk ' >> /is not set/ { >> split ($0, a, "#"); >> split(a[2], b); >> print b[1] ; >> } >> /=/ { >> split ($0, a, "="); >> print a[1]; >> } >> ' kernel-4.19.fc30/linux-4.20.0-0.rc1.git0.1.fc30.x86_64/configs/*.config | sort >> -u > .finalconfiglist >> >> find ./configs/fedora -name CONFIG_* | sed 's!.*/!!' | sort -u > .configlist > > The list of 227 CONFIGS was polluted by five CONFIG_ files that are > incorrectly named: > CONFIG_CONFIG_PINCTRL_LEWISBURG > CONFIG_DEBUG_KMEMLEAK_EARLY > CONFIG_DEFAULT_BOOTPARAM_HUNG_TASK_PANIC > CONFIG_EADC_AMD64 > CONFIG_KGDB_GDB > > I think these files should be called: > CONFIG_PINCTRL_LEWISBURG > CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE > CONFIG_BOOTPARAM_HUNG_TASK_PANIC > CONFIG_EDAC_AMD64 > CONFIG_KGDB_KDB > > Shall I draft a patch? > >> echo "These CONFIGS defined in redhat/configs but are not in the final .configs:" >> diff -u .finalconfiglist .configlist | grep "^+CONFIG" | sed 's/^+//g' | while >> read FILENAME >> do >> # configs sometimes are set to =n which is wrong. >> FILENAME=$(echo $FILENAME | awk -F "=" ' { print $1 } ') >> egrep -w $FILENAME kernel-4.19.fc30/linux-4.20.0-0.rc1.git0.1.fc30.x86_64/ >> --recursive >& /dev/null > > This finds these fourteen macros: > CONFIG_CMDLINE_FROM_BOOTLOADER > CONFIG_CONSISTENT_SIZE_BOOL > CONFIG_CRYPTO_DEV_NX_COMPRESS > CONFIG_DISCONTIGMEM_MANUAL > CONFIG_IMA_TRUSTED_KEYRING > CONFIG_OMAP_PACKAGE_CBB > CONFIG_OMAP_PACKAGE_CUS > CONFIG_PC104 > CONFIG_POWER5_CPU > CONFIG_POWER6_CPU > CONFIG_PPC_PMAC64 > CONFIG_SND_DAVINCI_SOC > CONFIG_SOC_ZTE > CONFIG_USB_OHCI_HCD_SSB > > Their Kconfig symbols (the macros without the CONFIG_ prefix) are valid, but > are only used internally in Kconfig files. So the corresponding files should > probably stay in Fedora's configuration generation directory. > > On the flipside this misses 41 zombies: uses of CONFIG_ macros in the tree > that should be dropped because there's no correspondig Kconfig symbol anymore. > These are: > CONFIG_AVERAGE > CONFIG_BLK_DEV_OSD > CONFIG_BLK_DEV_RAM_DAX > CONFIG_BT_HCIBTUART > CONFIG_CC_STACKPROTECTOR_REGULAR > CONFIG_CIFS_STATS > CONFIG_CROS_EC_CHARDEV > CONFIG_CROSS_COMPILE > CONFIG_DRM_IMX_IPUV3 > CONFIG_ENABLE_WARN_DEPRECATED > CONFIG_HOTPLUG > CONFIG_INPUT_GPIO > CONFIG_IP1000 > CONFIG_IRDA > CONFIG_LOGFS > CONFIG_MFD_CROS_EC_SPI > CONFIG_NET_CADENCE > CONFIG_NET_DCCPPROBE > CONFIG_NET_PACKET_ENGINE > CONFIG_NET_TCPPROBE > CONFIG_NET_VENDOR_EXAR > CONFIG_NF_CONNTRACK_IPV4 > CONFIG_NF_CONNTRACK_IPV6 > CONFIG_NF_CONNTRACK_PROC_COMPAT > CONFIG_NFT_EXTHDR > CONFIG_NFT_META > CONFIG_NO_HZ_FULL_SYSIDLE > CONFIG_PHONE > CONFIG_QCOM_ADSP_PIL > CONFIG_QCOM_Q6V5_PIL > CONFIG_RCU_NOCB_CPU_ALL > CONFIG_RTC_DRV_DS1307_HWMON > CONFIG_SND_HDA_POWER_SAVE > CONFIG_SSB_DEBUG > CONFIG_UIO_PDRV > CONFIG_USB_CHIPIDEA_ULPI > CONFIG_USB_DEBUG > CONFIG_USB_EZUSB > CONFIG_VIDEO_VIVI > CONFIG_W1_SLAVE_DS2760 > CONFIG_XEN_SCRUB_PAGES > >> if [ $? -ne 0 ]; then >> echo $FILENAME >> # uncomment next line to remove files >> #find ./configs/fedora -name $FILENAME | xargs rm -f >> fi >> done >> >> rm -f .configlist .finalconfiglist > > Thanks, > > > Paul Bolle > > _______________________________________________ kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx