LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: Andrew Morton <akpm@osdl.org>, jgarzik@pobox.com
Cc: linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org
Subject: [-mm patch] fix CONFIG_SATA_SIS=y compile error
Date: Sun, 28 Jan 2007 20:04:26 +0100	[thread overview]
Message-ID: <20070128190426.GU6017@stusta.de> (raw)
In-Reply-To: <20070127234928.64d8e437.akpm@osdl.org>

On Sat, Jan 27, 2007 at 11:49:28PM -0800, Andrew Morton wrote:
>...
> Changes since 2.6.20-rc4-mm1:
>...
>  git-libata-all.patch
>...
>  git trees.
>...

Static code shouldn't be used from other modules.

This patch fixes the following compile error:

<--  snip  -->

...
  LD      .tmp_vmlinux1
drivers/built-in.o: In function `sis_init_one':
sata_sis.c:(.text+0x7634cd): undefined reference to `sis_info133'
sata_sis.c:(.text+0x7634d6): undefined reference to `sis_info133'
make[1]: *** [.tmp_vmlinux1] Error 1

<--  snip  -->

While I was at it, I also moved the prototype of this struct to a header
file.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

 drivers/ata/libata.h   |    3 +++
 drivers/ata/pata_sis.c |    3 ++-
 drivers/ata/sata_sis.c |    4 +---
 3 files changed, 6 insertions(+), 4 deletions(-)

--- linux-2.6.20-rc6-mm1/drivers/ata/libata.h.old	2007-01-28 16:01:41.000000000 +0100
+++ linux-2.6.20-rc6-mm1/drivers/ata/libata.h	2007-01-28 16:02:10.000000000 +0100
@@ -151,4 +151,7 @@
 /* libata-sff.c */
 extern u8 ata_irq_on(struct ata_port *ap);
 
+/* pata_sis.c */
+extern struct ata_port_info sis_info133;
+
 #endif /* __LIBATA_H__ */
--- linux-2.6.20-rc6-mm1/drivers/ata/pata_sis.c.old	2007-01-28 16:08:26.000000000 +0100
+++ linux-2.6.20-rc6-mm1/drivers/ata/pata_sis.c	2007-01-28 16:02:51.000000000 +0100
@@ -32,6 +32,7 @@
 #include <scsi/scsi_host.h>
 #include <linux/libata.h>
 #include <linux/ata.h>
+#include "libata.h"
 
 #define DRV_NAME	"pata_sis"
 #define DRV_VERSION	"0.4.5"
@@ -781,7 +782,7 @@
 	.pio_mask	= 0x1f,	/* pio0-4 */
 	.port_ops	= &sis_66_ops,
 };
-static struct ata_port_info sis_info133 = {
+struct ata_port_info sis_info133 = {
 	.sht		= &sis_sht,
 	.flags		= ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
 	.pio_mask	= 0x1f,	/* pio0-4 */
--- linux-2.6.20-rc6-mm1/drivers/ata/sata_sis.c.old	2007-01-28 16:05:31.000000000 +0100
+++ linux-2.6.20-rc6-mm1/drivers/ata/sata_sis.c	2007-01-28 16:05:49.000000000 +0100
@@ -40,6 +40,7 @@
 #include <linux/device.h>
 #include <scsi/scsi_host.h>
 #include <linux/libata.h>
+#include "libata.h"
 
 #define DRV_NAME	"sata_sis"
 #define DRV_VERSION	"0.7"
@@ -254,9 +255,6 @@
 
 static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
 {
-	/* Provided by the PATA driver */
-	extern struct ata_port_info sis_info133;
-
 	static int printed_version;
 	struct ata_probe_ent *probe_ent = NULL;
 	int rc;


  parent reply	other threads:[~2007-01-28 19:04 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-28  7:49 2.6.20-rc6-mm1 Andrew Morton
2007-01-28 10:08 ` Unable to select IPV6 [Was: 2.6.20-rc6-mm1] Jiri Slaby
2007-01-28 16:19   ` [-mm patch] fix GFS2 circular dependency Adrian Bunk
2007-01-29  1:55     ` Randy Dunlap
2007-01-29  9:12     ` Steven Whitehouse
2007-01-28 10:25 ` 2.6.20-rc6-mm1 Jiri Slaby
2007-01-30  7:27   ` 2.6.20-rc6-mm1 Andrew Morton
2007-01-30 19:30     ` 2.6.20-rc6-mm1 Andrew Morton
2007-01-30 20:10       ` 2.6.20-rc6-mm1 Jiri Slaby
2007-01-30 20:22       ` 2.6.20-rc6-mm1 Pierre Ossman
2007-01-30 20:50       ` 2.6.20-rc6-mm1 Anton Altaparmakov
2007-01-28 11:01 ` elevator oops [Was: 2.6.20-rc6-mm1] Jiri Slaby
2007-01-28 17:41   ` Jiri Slaby
2007-02-05 11:54   ` Jens Axboe
2007-01-28 14:59 ` 2.6.20-rc6-mm1: linker error with arch_setup_additional_pages thunder7
2007-01-28 16:56 ` 2.6.20-rc6-mm1 Martin J. Bligh
2007-01-28 23:01   ` 2.6.20-rc6-mm1 Andrew Morton
2007-01-28 23:23     ` 2.6.20-rc6-mm1 Martin J. Bligh
2007-01-28 23:38       ` 2.6.20-rc6-mm1 Andrew Morton
2007-01-30  2:42     ` 2.6.20-rc6-mm1 Suparna Bhattacharya
2007-01-30  2:42       ` 2.6.20-rc6-mm1 Andrew Morton
2007-01-30  3:26         ` 2.6.20-rc6-mm1 Martin Bligh
2007-01-28 17:02 ` 2.6.20-rc6-mm1 Martin J. Bligh
2007-01-28 17:04 ` 2.6.20-rc6-mm1 Martin J. Bligh
2007-01-28 19:04 ` Adrian Bunk [this message]
2007-01-28 19:41 ` 2.6.20-rc6-mm1 (build) Randy Dunlap
2007-01-28 22:21   ` [2.6 patch] NF_CONNTRACK_H323 must depend on (IPV6 || IPV6=n) Adrian Bunk
2007-01-28 23:53     ` David Miller
2007-01-29  0:00       ` Adrian Bunk
2007-01-29  0:04         ` David Miller
2007-01-29  0:21           ` Adrian Bunk
2007-01-29  1:22             ` Randy Dunlap
2007-01-30 17:13             ` Patrick McHardy
2007-01-28 22:31 ` 2.6.20-rc6-mm1 Michal Piotrowski
2007-01-28 23:10   ` 2.6.20-rc6-mm1 Andrew Morton
2007-01-29  5:17   ` 2.6.20-rc6-mm1 Herbert Xu
2007-01-29  5:29     ` 2.6.20-rc6-mm1 Herbert Xu
2007-01-29  6:43       ` 2.6.20-rc6-mm1 Andrew Morton
2007-01-29  7:21         ` 2.6.20-rc6-mm1 Herbert Xu
2007-01-29  8:35           ` 2.6.20-rc6-mm1 Ingo Molnar
2007-01-29  2:50 ` [PATCH -mm] fix DocBook build Don Mullis
2007-01-30  1:11 ` [-mm patch] vmi: cleanups Adrian Bunk
2007-01-30  4:56   ` Zachary Amsden
2007-01-30  1:11 ` [-mm patch] cx88-video.c: remove struct radionorms Adrian Bunk
2007-01-30  1:11 ` [RFC: -mm patch] CONFIG_INPUT_DEBUG improvements Adrian Bunk
2007-01-30 15:07   ` Jiri Kosina
2007-01-30 15:13     ` Adrian Bunk
2007-01-30  1:11 ` [-mm patch] drivers/char/pcmcia/ipwireless_cs_*: possible cleanups Adrian Bunk
2007-01-30  1:12 ` [RFC: -mm patch] #if 0 v4l_printk_ioctl_arg() Adrian Bunk
2007-02-06 22:12 ` [-mm patch] fs/proc/: make code static Adrian Bunk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070128190426.GU6017@stusta.de \
    --to=bunk@stusta.de \
    --cc=akpm@osdl.org \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [-mm patch] fix CONFIG_SATA_SIS=y compile error' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).