* [PATCH] net: drop unused rarp.h @ 2024-02-27 7:39 Antony Pavlov 2024-02-28 8:47 ` Antony Pavlov 2024-02-29 8:36 ` Sascha Hauer 0 siblings, 2 replies; 4+ messages in thread From: Antony Pavlov @ 2024-02-27 7:39 UTC (permalink / raw) To: barebox Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> --- net/rarp.h | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/net/rarp.h b/net/rarp.h deleted file mode 100644 index 0986b02513f..00000000000 --- a/net/rarp.h +++ /dev/null @@ -1,23 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ -/* SPDX-FileCopyrightText: 2000 Wolfgang Denk <wd@denx.de>, DENX Software Engineering */ - -#ifndef __RARP_H__ -#define __RARP_H__ - -#ifndef __NET_H__ -#include <net.h> -#endif /* __NET_H__ */ - - -/**********************************************************************/ -/* - * Global functions and variables. - */ - -extern int RarpTry; - -extern void RarpRequest (void); /* Send a RARP request */ - -/**********************************************************************/ - -#endif /* __RARP_H__ */ -- 2.39.0 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] net: drop unused rarp.h 2024-02-27 7:39 [PATCH] net: drop unused rarp.h Antony Pavlov @ 2024-02-28 8:47 ` Antony Pavlov 2024-02-28 8:56 ` Ahmad Fatoum 2024-02-29 8:36 ` Sascha Hauer 1 sibling, 1 reply; 4+ messages in thread From: Antony Pavlov @ 2024-02-28 8:47 UTC (permalink / raw) To: barebox, Sascha Hauer On Tue, 27 Feb 2024 10:39:23 +0300 Antony Pavlov <antonynpavlov@gmail.com> wrote: Hi All! Actually there are much more unused header files: $ git clone https://github.com/barebox/barebox $ cd barebox barebox$ for i in $(git grep -h "#.*include" | sed "s/ //g" | grep "^#include" | sed "s/^#include[\"<]//g" | sed "s/[>\"]$//g" | sort | uniq); do basename $i; done | sort | uniq > /tmp/list1 barebox$ for i in $(find -iname '*.h'); do basename $i; done | sort | uniq > /tmp/list2 Show unused header files: barebox$ for i in $(comm -13 /tmp/list1 /tmp/list2); do find -iname $i -type f ; done | grep -v ^./dts/ | sort ./arch/arm/boards/phytec-phycard-omap3/pca-a-l1.h ./arch/arm/include/asm/arch-check.h ./arch/powerpc/include/asm/pci_io.h ./arch/powerpc/include/asm/status_led.h ./arch/x86/include/asm/modes.h ./arch/x86/include/asm/segment.h ./drivers/mtd/nand/atmel/atmel_nand_ecc.h ./drivers/usb/host/ehci-core.h ./fs/fat/ffconf.h ./include/gpiod.h ./include/linux/mtd/ndfc.h ./include/linux/mtd/nftl.h ./include/linux/usb/usbroothubdes.h ./include/mach/imx/ccm.h ./include/mach/imx/devices-imx21.h ./include/mach/imx/devices-imx31.h ./include/mach/imx/devices-imx35.h ./include/mach/imx/devices-imx50.h ./include/mach/imx/habv3-imx25-gencsf.h ./include/mach/imx/iomux-mx21.h ./include/mach/imx/iomux-mx35.h ./include/mach/imx/iomux-mx50.h ./include/mach/omap/intc.h ./include/usb_dfu_trailer.h ./lib/bzlib_private.h ./lib/zstd/zstd_opt.h ./net/nfs.h ./net/rarp.h Check for false positives: barebox$ for i in $(comm -13 /tmp/list1 /tmp/list2); do git grep $i ; done | grep -v ^dts\/ | grep "#include" drivers/mtd/nand/atmel/legacy.c:#include "atmel_nand_ecc.h" /* Hardware ECC registers */ fs/fat/ff.h:#include "ffconf.h" /* FatFs configuration options */ arch/arm/boards/phytec-phycore-pxa270/lowlevel_init.S:#include <mach/pxa/regs-intc.h> > Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> > --- > net/rarp.h | 23 ----------------------- > 1 file changed, 23 deletions(-) > > diff --git a/net/rarp.h b/net/rarp.h > deleted file mode 100644 > index 0986b02513f..00000000000 > --- a/net/rarp.h > +++ /dev/null > @@ -1,23 +0,0 @@ > -/* SPDX-License-Identifier: GPL-2.0-or-later */ > -/* SPDX-FileCopyrightText: 2000 Wolfgang Denk <wd@denx.de>, DENX Software Engineering */ > - > -#ifndef __RARP_H__ > -#define __RARP_H__ > - > -#ifndef __NET_H__ > -#include <net.h> > -#endif /* __NET_H__ */ > - > - > -/**********************************************************************/ > -/* > - * Global functions and variables. > - */ > - > -extern int RarpTry; > - > -extern void RarpRequest (void); /* Send a RARP request */ > - > -/**********************************************************************/ > - > -#endif /* __RARP_H__ */ > -- > 2.39.0 > -- Best regards, Antony Pavlov ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] net: drop unused rarp.h 2024-02-28 8:47 ` Antony Pavlov @ 2024-02-28 8:56 ` Ahmad Fatoum 0 siblings, 0 replies; 4+ messages in thread From: Ahmad Fatoum @ 2024-02-28 8:56 UTC (permalink / raw) To: Antony Pavlov, barebox, Sascha Hauer Hello Antony, On 28.02.24 09:47, Antony Pavlov wrote: > On Tue, 27 Feb 2024 10:39:23 +0300 > Antony Pavlov <antonynpavlov@gmail.com> wrote: > > Hi All! > > Actually there are much more unused header files: > > $ git clone https://github.com/barebox/barebox > $ cd barebox > barebox$ for i in $(git grep -h "#.*include" | sed "s/ //g" | grep "^#include" | sed "s/^#include[\"<]//g" | sed "s/[>\"]$//g" | sort | uniq); do basename $i; done | sort | uniq > /tmp/list1 > barebox$ for i in $(find -iname '*.h'); do basename $i; done | sort | uniq > /tmp/list2 > > > Show unused header files: > > barebox$ for i in $(comm -13 /tmp/list1 /tmp/list2); do find -iname $i -type f ; done | grep -v ^./dts/ | sort > > ./arch/arm/boards/phytec-phycard-omap3/pca-a-l1.h Ok to drop, I think. > ./arch/arm/include/asm/arch-check.h This one is referenced from arch/arm/Makefile > ./arch/powerpc/include/asm/pci_io.h > ./arch/powerpc/include/asm/status_led.h > ./arch/x86/include/asm/modes.h > ./arch/x86/include/asm/segment.h Ok to drop, I think. > ./drivers/mtd/nand/atmel/atmel_nand_ecc.h This is included in drivers/mtd/nand/atmel/legacy.c. (I see now you mentioned that below) > ./drivers/usb/host/ehci-core.h Ok to drop, I think. > ./fs/fat/ffconf.h This likewise looks as if it is actually used. (I see now you mentioned that below) > ./include/gpiod.h This one here is an intentional compatibility header for out-of-tree board code. > ./include/linux/mtd/ndfc.h > ./include/linux/mtd/nftl.h > ./include/linux/usb/usbroothubdes.h Ok to drop, I think. > ./include/mach/imx/ccm.h I think this should be dropped. I am unsure this even applies to all CCM versions. It can always be brought back with a correct imxVER suffix. > ./include/mach/imx/devices-imx21.h > ./include/mach/imx/devices-imx31.h > ./include/mach/imx/devices-imx35.h > ./include/mach/imx/devices-imx50.h These are non-DT device creation helpers. Maybe Sascha has an opinion on whether they should be kept or removed? > ./include/mach/imx/habv3-imx25-gencsf.h There's i.MX25 support in drivers/hab, which I assume was added for a reason, so some out-of-tree board is likely including this. > ./include/mach/imx/iomux-mx21.h > ./include/mach/imx/iomux-mx35.h > ./include/mach/imx/iomux-mx50.h I think these definitions should remain. It's not unlikely that out-of-tree boards use them. > ./include/mach/omap/intc.h > ./include/usb_dfu_trailer.h > ./lib/bzlib_private.h > ./lib/zstd/zstd_opt.h > ./net/nfs.h > ./net/rarp.h I am ok with dropping the other headers if indeed unreferenced. > Check for false positives: > > barebox$ for i in $(comm -13 /tmp/list1 /tmp/list2); do git grep $i ; done | grep -v ^dts\/ | grep "#include" Maybe exclude #, so also # include and gcc -include is matched. Cheers, Ahmad > > drivers/mtd/nand/atmel/legacy.c:#include "atmel_nand_ecc.h" /* Hardware ECC registers */ > fs/fat/ff.h:#include "ffconf.h" /* FatFs configuration options */ > arch/arm/boards/phytec-phycore-pxa270/lowlevel_init.S:#include <mach/pxa/regs-intc.h> > > > >> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> >> --- >> net/rarp.h | 23 ----------------------- >> 1 file changed, 23 deletions(-) >> >> diff --git a/net/rarp.h b/net/rarp.h >> deleted file mode 100644 >> index 0986b02513f..00000000000 >> --- a/net/rarp.h >> +++ /dev/null >> @@ -1,23 +0,0 @@ >> -/* SPDX-License-Identifier: GPL-2.0-or-later */ >> -/* SPDX-FileCopyrightText: 2000 Wolfgang Denk <wd@denx.de>, DENX Software Engineering */ >> - >> -#ifndef __RARP_H__ >> -#define __RARP_H__ >> - >> -#ifndef __NET_H__ >> -#include <net.h> >> -#endif /* __NET_H__ */ >> - >> - >> -/**********************************************************************/ >> -/* >> - * Global functions and variables. >> - */ >> - >> -extern int RarpTry; >> - >> -extern void RarpRequest (void); /* Send a RARP request */ >> - >> -/**********************************************************************/ >> - >> -#endif /* __RARP_H__ */ >> -- >> 2.39.0 >> > > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] net: drop unused rarp.h 2024-02-27 7:39 [PATCH] net: drop unused rarp.h Antony Pavlov 2024-02-28 8:47 ` Antony Pavlov @ 2024-02-29 8:36 ` Sascha Hauer 1 sibling, 0 replies; 4+ messages in thread From: Sascha Hauer @ 2024-02-29 8:36 UTC (permalink / raw) To: barebox, Antony Pavlov On Tue, 27 Feb 2024 10:39:23 +0300, Antony Pavlov wrote: > Applied, thanks! [1/1] net: drop unused rarp.h https://git.pengutronix.de/cgit/barebox/commit/?id=3b38db4c3219 (link may not be stable) Best regards, -- Sascha Hauer <s.hauer@pengutronix.de> ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-02-29 8:37 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2024-02-27 7:39 [PATCH] net: drop unused rarp.h Antony Pavlov 2024-02-28 8:47 ` Antony Pavlov 2024-02-28 8:56 ` Ahmad Fatoum 2024-02-29 8:36 ` Sascha Hauer
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox