mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Remove needless and non-portable include in mtd
@ 2003-10-20  4:36 Noah J. Misch
  2003-10-20 14:58 ` Atsushi Nemoto
  0 siblings, 1 reply; 2+ messages in thread
From: Noah J. Misch @ 2003-10-20  4:36 UTC (permalink / raw)
  To: dwmw2; +Cc: mtd, linux-kernel

Hello David,

The #include <asm/setup.h> in drivers/mtd/cmdlinepart.c does not appear to
provide any definition this file uses, and it quickly breaks builds on
architectures that lack such a header, including ia64 and sparc.

This applies to your CVS and linux-2.5 BK as of 0700 UTC 10/20/2003 and passes
an allyesconfig on (with unrelated exceptions) i386, ia64, and sparc.  I do not
have the hardware to test it further, but I think the change is straightforward.
Please let me know if you need further information.

I will probably send you at least one more MTD compatibility patch.

Thanks,
Noah

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.1369  -> 1.1370
#	drivers/mtd/cmdlinepart.c	1.5     -> 1.6
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/10/16	noah@caltech.edu	1.1370
# Remove needless include of asm/setup.h in drivers/mtd/cmdlinepart.c.  This
# was breaking compilation on architectures that lack such a header.
# --------------------------------------------
#
diff -Nru a/drivers/mtd/cmdlinepart.c b/drivers/mtd/cmdlinepart.c
--- a/drivers/mtd/cmdlinepart.c	Fri Oct 17 13:40:56 2003
+++ b/drivers/mtd/cmdlinepart.c	Fri Oct 17 13:40:56 2003
@@ -28,7 +28,6 @@

 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
-#include <asm/setup.h>
 #include <linux/bootmem.h>

 /* error message prefix */


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

* Re: [PATCH] Remove needless and non-portable include in mtd
  2003-10-20  4:36 [PATCH] Remove needless and non-portable include in mtd Noah J. Misch
@ 2003-10-20 14:58 ` Atsushi Nemoto
  0 siblings, 0 replies; 2+ messages in thread
From: Atsushi Nemoto @ 2003-10-20 14:58 UTC (permalink / raw)
  To: noah; +Cc: dwmw2, linux-mtd, linux-kernel

>>>>> On Sun, 19 Oct 2003 21:36:15 -0700 (PDT), "Noah J. Misch" <noah@caltech.edu> said:

noah> The #include <asm/setup.h> in drivers/mtd/cmdlinepart.c does not
noah> appear to provide any definition this file uses, and it quickly
noah> breaks builds on architectures that lack such a header,
noah> including ia64 and sparc.

I have posted a patch including this fix to linux-mtd ML two times
(two month ago and a week ago).  My patch fixes another problem that
cmdlinepart.c can not handle zero offset value correctly
(ex. "mtdparts=id:2M@2M,2M@0").  Please consider applying this fix
also.  Thank you.

--- mtd-20030811/drivers/mtd/cmdlinepart.c	Fri May 30 07:00:05 2003
+++ mtd/drivers/mtd/cmdlinepart.c	Tue Aug 12 16:35:43 2003
@@ -29,7 +29,6 @@
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/compatmac.h>
-#include <asm/setup.h>
 #include <linux/bootmem.h>
 
 /* error message prefix */
@@ -45,6 +44,7 @@
 
 /* special size referring to all the remaining space in a partition */
 #define SIZE_REMAINING 0xffffffff
+#define OFFSET_CONTINUOUS 0xffffffff
 
 struct cmdline_mtd_partition {
 	struct cmdline_mtd_partition *next;
@@ -77,7 +77,7 @@
 {
 	struct mtd_partition *parts;
 	unsigned long size;
-	unsigned long offset = 0;
+	unsigned long offset = OFFSET_CONTINUOUS;
 	char *name;
 	int name_len;
 	unsigned char *extra_mem;
@@ -312,7 +312,7 @@
 		{
 			for(i = 0, offset = 0; i < part->num_parts; i++)
 			{
-				if (!part->parts[i].offset)
+				if (part->parts[i].offset == OFFSET_CONTINUOUS)
 				  part->parts[i].offset = offset;
 				else
 				  offset = part->parts[i].offset;
---
Atsushi Nemoto

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

end of thread, other threads:[~2003-10-20 14:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-20  4:36 [PATCH] Remove needless and non-portable include in mtd Noah J. Misch
2003-10-20 14:58 ` Atsushi Nemoto

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®