Skip to content

Removing dead code

Christian Dietrich linux-arm-kernel linux-fbdev linux-parisc linux-s390 linux-scsi linuxppc-dev lkml netdev 1 version Applied

Status from this message: Applied.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest14 patches 11 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/14arch/arm: Removing undead ifdef __ASSEMBLY__arch/arm/mach-ixp23xx/include/mach/platform.h+0 -30 replies
2/14arch/h8300: Removing dead ifdef __H8300_TLB_H__arch/h8300/include/asm/tlb.h+0 -131 reply
3/14arch/parisc: Removing undead ifdef CONFIG_PA20arch/parisc/kernel/unaligned.c+0 -31 reply
4/14arch/{s390,powerpc}: Removing undead ifdef __KERNEL__arch/powerpc/include/asm/processor.h arch/powerpc/include/asm/vdso_datapage.h arch/s390/include/asm/processor.h+0 -80 replies
5/14arch/x86: Removing undead ifdef ACPI/X86_IO_ACPIarch/x86/kernel/early-quirks.c+0 -22 replies
6/14drivers/net: Removing undead ifdef CHELSIO_T1_1Gdrivers/net/chelsio/subr.c+0 -21 reply
7/14drivers/scsi: Removing undead ifdef __ISAPNP__drivers/scsi/aha152x.c+0 -20 replies
8/14drivers/scsi: Removing undead ifdef CONFIG_PCIdrivers/scsi/aic7xxx_old.c+0 -20 replies
9/14drivers/scsi: Removing undead ifdef REAL_DMAdrivers/scsi/atari_NCR5380.c+0 -60 replies
10/14drivers/video: Removing undead ifdef ATAFB_FALCONdrivers/video/atafb.c+0 -22 replies
11/14drivers/video: Removing undead ifdef CONFIG_FB_MATROX_Gdrivers/video/matrox/matroxfb_DAC1064.c+1 -41 reply
12/14include/linux: Removing undead ifdef __KERNEL__include/linux/socket.h+1 -51 reply
13/14kernel/: Removing undead ifdef CONFIG_SMPkernel/sched.c+1 -31 reply
14/14kernel/: Removing undead ifdef CONFIG_DEBUG_LOCK_ALLOCkernel/srcu.c+0 -21 reply

Reviews trailers per patch

4 of 14 patches have a Reviewed-by or Acked-by.

PatchBorislav PetkovCyrill GorcunovJean DelvareKrzysztof Helt
1/14
2/14
3/14
4/14
5/14A-b A-b
6/14
7/14
8/14
9/14
10/14A-b
11/14A-b
12/14R-b
13/14
14/14

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v1 thread

Cover letter [PATCH 00/14] Removing dead code

Hi all!

As part of the VAMOS[0] research project at the University of Erlangen we are looking at multiple integrity errors in linux' configuration system.

I've been running a check on the whole sourcetree for code block which are undead. This means they can't be deselected and are always in the kernel if the enviroment of the block is selected. They have often the form of

#ifdef ABC
....
#ifdef ABC
fooooo
#endif
#endif

Here the ifdefs of the inner block can be removed without any harm. At this point we just checked the source code (for the undead), but we want to do a crosscheck with the Kconfig for undead code blocks in the future.

I build the patches against a vanilla kernel (v2.6.36-rc3) in order to try if the kernel compiles with this patches.

Please keep me informed of this patch getting confirmed / merged so we can keep track of it.

Regards

Christian Dietrich

[0] http://vamos1.informatik.uni-erlangen.de/

Christian Dietrich (14):
arch/arm: Removing undead ifdef __ASSEMBLY__ arch/h8300: Removing dead ifdef __H8300_TLB_H__ arch/parisc: Removing undead ifdef CONFIG_PA20 arch/{s390,powerpc}: Removing undead ifdef __KERNEL__ arch/x86: Removing undead ifdef ACPI/X86_IO_ACPI drivers/net: Removing undead ifdef CHELSIO_T1_1G drivers/scsi: Removing undead ifdef __ISAPNP__ drivers/scsi: Removing undead ifdef CONFIG_PCI drivers/scsi: Removing undead ifdef REAL_DMA drivers/video: Removing undead ifdef ATAFB_FALCON drivers/video: Removing undead ifdef CONFIG_FB_MATROX_G include/linux: Removing undead ifdef __KERNEL__ kernel/: Removing undead ifdef CONFIG_SMP kernel/: Removing undead ifdef CONFIG_DEBUG_LOCK_ALLOC

 arch/arm/mach-ixp23xx/include/mach/platform.h |    3 ---
 arch/h8300/include/asm/tlb.h                  |   13 -------------
 arch/parisc/kernel/unaligned.c                |    3 ---
 arch/powerpc/include/asm/processor.h          |    2 --
 arch/powerpc/include/asm/vdso_datapage.h      |    2 --
 arch/s390/include/asm/processor.h             |    4 ----
 arch/x86/kernel/early-quirks.c                |    2 --
 drivers/net/chelsio/subr.c                    |    2 --
 drivers/scsi/aha152x.c                        |    2 --
 drivers/scsi/aic7xxx_old.c                    |    2 --
 drivers/scsi/atari_NCR5380.c                  |    6 ------
 drivers/video/atafb.c                         |    2 --
 drivers/video/matrox/matroxfb_DAC1064.c       |    5 +----
 include/linux/socket.h                        |    6 +-----
 kernel/sched.c                                |    4 +---
 kernel/srcu.c                                 |    2 --
 16 files changed, 3 insertions(+), 57 deletions(-)