mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] Removing dead code
@ 2010-08-23  9:59 Christian Dietrich
  2010-08-23  9:59 ` [PATCH 1/2] drivers/video: Removing dead FB_VIA_CAMERA config option Christian Dietrich
  2010-08-23  9:59 ` [PATCH 2/2] drivers/video: Removing dead FB_68328_INVERT " Christian Dietrich
  0 siblings, 2 replies; 6+ messages in thread
From: Christian Dietrich @ 2010-08-23  9:59 UTC (permalink / raw)
  To: Tejun Heo, Jiri Kosina, Daniel Mack, Joseph Chan,
	Florian Tobias Schandinat, Andrew Morton, Jonathan Corbet,
	Erik-Jan Post, linux-kernel, linux-fbdev
  Cc: vamos-dev

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 drivers/video sourcetree for
config Items not defined in Kconfig and found 2 such cases. Sourcecode
blocks depending on these Items are not reachable from a vanilla
kernel -- dead code. I've seen such dead blocks made on purpose
e.g. while integrating new features into the kernel but generally
they're just useless.

        Each of the patches in this patchset removes on such dead
config Item, I'd be glad if you consider applying them. I've been
doing deeper analysis of such issues before and can do so again but
I'm not so sure they were fastly usefull.

        I build the patches against a vanilla kernel 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 (2):
  drivers/video: Removing dead FB_VIA_CAMERA config option
  drivers/video: Removing dead FB_68328_INVERT config option

 drivers/video/68328fb.c   |    4 ----
 drivers/video/via/accel.c |   16 ----------------
 include/linux/via-core.h  |    5 +----
 3 files changed, 1 insertions(+), 24 deletions(-)


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

* [PATCH 1/2] drivers/video: Removing dead FB_VIA_CAMERA config option
  2010-08-23  9:59 [PATCH 0/2] Removing dead code Christian Dietrich
@ 2010-08-23  9:59 ` Christian Dietrich
  2010-08-23 12:42   ` Jonathan Corbet
  2010-08-23  9:59 ` [PATCH 2/2] drivers/video: Removing dead FB_68328_INVERT " Christian Dietrich
  1 sibling, 1 reply; 6+ messages in thread
From: Christian Dietrich @ 2010-08-23  9:59 UTC (permalink / raw)
  To: Joseph Chan, Florian Tobias Schandinat, Andrew Morton,
	Jonathan Corbet, Erik-Jan Post, linux-fbdev, linux-kernel
  Cc: vamos-dev

CONFIG_FB_VIA_CAMERA doesn't exist in Kconfig, therefore removing
all references to it from the source.

Signed-off-by: Christian Dietrich <qy03fugy@stud.informatik.uni-erlangen.de>
---
 drivers/video/via/accel.c |   16 ----------------
 include/linux/via-core.h  |    5 +----
 2 files changed, 1 insertions(+), 20 deletions(-)

diff --git a/drivers/video/via/accel.c b/drivers/video/via/accel.c
index e44893e..43d4f30 100644
--- a/drivers/video/via/accel.c
+++ b/drivers/video/via/accel.c
@@ -370,22 +370,6 @@ int viafb_init_engine(struct fb_info *info)
 	viapar->shared->vq_vram_addr = viapar->fbmem_free;
 	viapar->fbmem_used += VQ_SIZE;
 
-#if defined(CONFIG_FB_VIA_CAMERA) || defined(CONFIG_FB_VIA_CAMERA_MODULE)
-	/*
-	 * Set aside a chunk of framebuffer memory for the camera
-	 * driver.  Someday this driver probably needs a proper allocator
-	 * for fbmem; for now, we just have to do this before the
-	 * framebuffer initializes itself.
-	 *
-	 * As for the size: the engine can handle three frames,
-	 * 16 bits deep, up to VGA resolution.
-	 */
-	viapar->shared->vdev->camera_fbmem_size = 3*VGA_HEIGHT*VGA_WIDTH*2;
-	viapar->fbmem_free -= viapar->shared->vdev->camera_fbmem_size;
-	viapar->fbmem_used += viapar->shared->vdev->camera_fbmem_size;
-	viapar->shared->vdev->camera_fbmem_offset = viapar->fbmem_free;
-#endif
-
 	/* Init AGP and VQ regs */
 	switch (chip_name) {
 	case UNICHROME_K8M890:
diff --git a/include/linux/via-core.h b/include/linux/via-core.h
index 7ffb521..7fc611e 100644
--- a/include/linux/via-core.h
+++ b/include/linux/via-core.h
@@ -81,10 +81,7 @@ struct viafb_dev {
 	unsigned long fbmem_start;
 	long fbmem_len;
 	void __iomem *fbmem;
-#if defined(CONFIG_FB_VIA_CAMERA) || defined(CONFIG_FB_VIA_CAMERA_MODULE)
-	long camera_fbmem_offset;
-	long camera_fbmem_size;
-#endif
+
 	/*
 	 * The MMIO region for device registers.
 	 */
-- 
1.7.0.4


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

* [PATCH 2/2] drivers/video: Removing dead FB_68328_INVERT config option
  2010-08-23  9:59 [PATCH 0/2] Removing dead code Christian Dietrich
  2010-08-23  9:59 ` [PATCH 1/2] drivers/video: Removing dead FB_VIA_CAMERA config option Christian Dietrich
@ 2010-08-23  9:59 ` Christian Dietrich
  1 sibling, 0 replies; 6+ messages in thread
From: Christian Dietrich @ 2010-08-23  9:59 UTC (permalink / raw)
  To: Tejun Heo, Jiri Kosina, Daniel Mack, linux-kernel; +Cc: vamos-dev

CONFIG_FB_68328_INVERT doesn't exist in Kconfig, therefore removing
all references to it from the source.

Signed-off-by: Christian Dietrich <qy03fugy@stud.informatik.uni-erlangen.de>
---
 drivers/video/68328fb.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/drivers/video/68328fb.c b/drivers/video/68328fb.c
index 75a39ea..bec3fd2 100644
--- a/drivers/video/68328fb.c
+++ b/drivers/video/68328fb.c
@@ -49,11 +49,7 @@
 #error wrong architecture for the MC68x328 frame buffer device
 #endif
 
-#if defined(CONFIG_FB_68328_INVERT)
-#define MC68X328FB_MONO_VISUAL FB_VISUAL_MONO01
-#else
 #define MC68X328FB_MONO_VISUAL FB_VISUAL_MONO10
-#endif
 
 static u_long videomemory;
 static u_long videomemorysize;
-- 
1.7.0.4


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

* Re: [PATCH 1/2] drivers/video: Removing dead FB_VIA_CAMERA config option
  2010-08-23  9:59 ` [PATCH 1/2] drivers/video: Removing dead FB_VIA_CAMERA config option Christian Dietrich
@ 2010-08-23 12:42   ` Jonathan Corbet
  0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Corbet @ 2010-08-23 12:42 UTC (permalink / raw)
  To: Christian Dietrich
  Cc: Joseph Chan, Florian Tobias Schandinat, Andrew Morton,
	Erik-Jan Post, linux-fbdev, linux-kernel, vamos-dev

On Mon, 23 Aug 2010 11:59:41 +0200
Christian Dietrich <qy03fugy@stud.informatik.uni-erlangen.de> wrote:

> CONFIG_FB_VIA_CAMERA doesn't exist in Kconfig, therefore removing
> all references to it from the source.

The driver using this option has been posted to the lists a few times.
I have been unforgivably slow in dealing with some review comments, and
so missed the 2.6.36 merge window.  I don't plan to let that happen
again, though.  So my preference would be to leave this code in place;
if it goes away, I'll just have to put it back.

Thanks,

jon

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

* [PATCH 0/2] Removing dead code
  2010-07-15  7:42 ` [5/5] " Milton Miller
@ 2010-07-16 12:28   ` Christian Dietrich
  0 siblings, 0 replies; 6+ messages in thread
From: Christian Dietrich @ 2010-07-16 12:28 UTC (permalink / raw)
  To: Milton Miller, Josh Boyer, Matt Porter, Benjamin Herrenschmidt,
	Paul Mackerras, Solomon Peachy, David Woodhouse, Mike Frysinger,
	Jiri Kosina, Artem Bityutskiy, Alexander Kurz, Russell King,
	Ralf Baechle, Manuel Lauss, David S. Miller, Randy Dunlap,
	John Linn, Florian Fainelli, Nicolas Pitre, Joe Perches,
	Ladislav Michl, David Brown, linuxppc-dev, linux-kernel,
	linux-mtd, netdev
  Cc: vamos-dev

Hi all!

I merged the two patches from Christoph Egger[1] to remove the
REDWOOD_[456] config depends. And wrote a second patch, which removes
the redwood/mtd mapping module. I hope this is now acceptable to bring
it into the kernel, if this options are really dead.       

Regards

        Christian Dietrich

[0] http://vamos1.informatik.uni-erlangen.de/
[1] Message-Id: <adba61f63f4439ac17f2e428429f01ae5e65ab15.1279110895.git.siccegge@cs.fau.de>

Christian Dietrich (2):
  Remove REDWOOD_[456] config options and conditional code
  Removed redwood/mtd mapping

 arch/powerpc/platforms/40x/Kconfig |   16 ----
 drivers/mtd/maps/Kconfig           |    8 --
 drivers/mtd/maps/Makefile          |    1 -
 drivers/mtd/maps/redwood.c         |  174 ------------------------------------
 drivers/net/Kconfig                |    2 +-
 drivers/net/smc91x.h               |   37 --------
 6 files changed, 1 insertions(+), 237 deletions(-)
 delete mode 100644 drivers/mtd/maps/redwood.c


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

* [PATCH 0/2] Removing dead code
@ 2010-06-28 13:40 Christoph Egger
  0 siblings, 0 replies; 6+ messages in thread
From: Christoph Egger @ 2010-06-28 13:40 UTC (permalink / raw)
  To: Tony Luck, Fenghua Yu, linux-ia64, linux-kernel

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 arch/ia64 sourcetree for
config Items not defined in Kconfig and found 2 such cases. Sourcecode
blocks depending on these Items are not reachable from a vanilla
kernel -- dead code. I've seen such dead blocks made on purpose
e.g. while integrating new features into the kernel but generally
they're just useless.

	Each of the patches in this patchset removes on such dead
config Item, I'd be glad if you consider applying them. I've been
doing deeper analysis of such issues before and can do so again but
I'm not so sure they were fastly usefull.

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

Regards

        Christoph Egger

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

Christoph Egger (2):
  Removing dead CONFIG_PARAVIRT_GUEST_ASM_CLOBBER_CHECK
  Removing dead CONFIG_IOMMU_DEBUG

 arch/ia64/include/asm/native/inst.h |   96 ++++++++--------------------------
 arch/ia64/kernel/pci-dma.c          |    4 --
 2 files changed, 23 insertions(+), 77 deletions(-)


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

end of thread, other threads:[~2010-08-23 12:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-23  9:59 [PATCH 0/2] Removing dead code Christian Dietrich
2010-08-23  9:59 ` [PATCH 1/2] drivers/video: Removing dead FB_VIA_CAMERA config option Christian Dietrich
2010-08-23 12:42   ` Jonathan Corbet
2010-08-23  9:59 ` [PATCH 2/2] drivers/video: Removing dead FB_68328_INVERT " Christian Dietrich
  -- strict thread matches above, loose matches on Subject: below --
2010-07-14 14:05 [PATCH 5/5] Remove REDWOOD_5 and REDWOOD_6 config options and conditional code Christian Dietrich
2010-07-15  7:42 ` [5/5] " Milton Miller
2010-07-16 12:28   ` [PATCH 0/2] Removing dead code Christian Dietrich
2010-06-28 13:40 Christoph Egger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®