linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Finn Thain <fthain@linux-m68k.org>
To: Jens Axboe <axboe@kernel.dk>
Cc: "David S. Miller" <davem@davemloft.net>,
	"Michael Schmitz" <schmitzmic@gmail.com>,
	linux-m68k@lists.linux-m68k.org, linux-ide@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] ide/falconide: Avoid build failure when CONFIG_ATARI=n
Date: Thu, 10 Jun 2021 19:28:31 +1000	[thread overview]
Message-ID: <16c5ed1120bfb7dcd64899c08d9ff36ad75f434d.1623317311.git.fthain@linux-m68k.org> (raw)

When building the driver for a q40-only configuration, the atari-only code
has to be elided to avoid a linker error:

m68k-linux-ld: drivers/ide/falconide.o: in function `falconide_get_lock':
falconide.c:(.text+0x1c2): undefined reference to `stdma_lock'
m68k-linux-ld: drivers/ide/falconide.o: in function `falconide_release_lock':
falconide.c:(.text+0x20c): undefined reference to `stdma_release'

Cc: "David S. Miller" <davem@davemloft.net>
Cc: Michael Schmitz <schmitzmic@gmail.com>
Cc: linux-m68k@lists.linux-m68k.org
Reported-by: kernel test robot <lkp@intel.com>
Fixes: 9658506fbf8c ("m68k/q40: Replace q40ide driver with pata_falcon and falconide")
Signed-off-by: Finn Thain <fthain@linux-m68k.org>
---
This change relates to commit 9658506fbf8c ("m68k/q40: Replace q40ide driver
with pata_falcon and falconide") which is found on the for-5.14/libata branch
in Jens' repo. Therefore this 'fixes' tag is not yet relevant to mainline.
---
 drivers/ide/falconide.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/ide/falconide.c b/drivers/ide/falconide.c
index fce68412b3c9..a73a9dc17e4d 100644
--- a/drivers/ide/falconide.c
+++ b/drivers/ide/falconide.c
@@ -25,6 +25,7 @@
 
 #define DRV_NAME "falconide"
 
+#ifdef CONFIG_ATARI
     /*
      *  falconide_intr_lock is used to obtain access to the IDE interrupt,
      *  which is shared between several drivers.
@@ -49,6 +50,7 @@ static void falconide_get_lock(irq_handler_t handler, void *data)
 		falconide_intr_lock = 1;
 	}
 }
+#endif
 
 static void falconide_input_data(ide_drive_t *drive, struct ide_cmd *cmd,
 				 void *buf, unsigned int len)
@@ -92,8 +94,10 @@ static const struct ide_tp_ops falconide_tp_ops = {
 };
 
 static const struct ide_port_info falconide_port_info = {
+#ifdef CONFIG_ATARI
 	.get_lock		= falconide_get_lock,
 	.release_lock		= falconide_release_lock,
+#endif
 	.tp_ops			= &falconide_tp_ops,
 	.host_flags		= IDE_HFLAG_MMIO | IDE_HFLAG_SERIALIZE |
 				  IDE_HFLAG_NO_DMA,
-- 
2.26.3


                 reply	other threads:[~2021-06-10  9:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=16c5ed1120bfb7dcd64899c08d9ff36ad75f434d.1623317311.git.fthain@linux-m68k.org \
    --to=fthain@linux-m68k.org \
    --cc=axboe@kernel.dk \
    --cc=davem@davemloft.net \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=schmitzmic@gmail.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).