From: John Anthony Kazos Jr. <[EMAIL PROTECTED]>

Adds conditional-compilation directives to fs/partitions/acorn.c to 
prevent compilation of the functions adfs_partition and linux_partition 
which are used only within ACORN_PARTITION_CUMANA and ACORN_PARTITION_ADFS 
sections, thereby preventing unused-function compiler warnings if 
ACORN_PARTITION is defined and neither of the other two are.

Signed-off-by: John Anthony Kazos Jr. <[EMAIL PROTECTED]>

---

Nothing using these two functions is defined except inside CUMANA and 
ADFS, so without either of those, nothing using these functions is 
compiled, hence the unused-function warning. Both CUMANA and ADFS code use 
both functions so they must be included if either symbol is defined.

--- linux-2.6.20.6-orig/fs/partitions/acorn.c   2007-04-06 16:02:48.000000000 
-0400
+++ linux-2.6.20.6-mod/fs/partitions/acorn.c    2007-04-07 21:40:39.000000000 
-0400
@@ -25,6 +25,8 @@
 #define PARTITION_RISCIX_SCSI  2
 #define PARTITION_LINUX                9
 
+#if defined(CONFIG_ACORN_PARTITION_CUMANA) || 
defined(CONFIG_ACORN_PARTITION_ADFS)
+
 static struct adfs_discrecord *
 adfs_partition(struct parsed_partitions *state, char *name, char *data,
               unsigned long first_sector, int slot)
@@ -49,6 +51,8 @@ adfs_partition(struct parsed_partitions 
        return dr;
 }
 
+#endif
+
 #ifdef CONFIG_ACORN_PARTITION_RISCIX
 
 struct riscix_part {
@@ -106,6 +110,8 @@ riscix_partition(struct parsed_partition
 }
 #endif
 
+#if defined(CONFIG_ACORN_PARTITION_CUMANA) || 
defined(CONFIG_ACORN_PARTITION_ADFS)
+
 #define LINUX_NATIVE_MAGIC 0xdeafa1de
 #define LINUX_SWAP_MAGIC   0xdeafab1e
 
@@ -147,6 +153,8 @@ linux_partition(struct parsed_partitions
        return slot;
 }
 
+#endif
+
 #ifdef CONFIG_ACORN_PARTITION_CUMANA
 int
 adfspart_check_CUMANA(struct parsed_partitions *state, struct block_device 
*bdev)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to