* PATCH: fix "ide_scan_direction defined but not used" in ide.c
@ 2003-01-07 13:10 Muli Ben-Yehuda
2003-01-07 16:36 ` Alan Cox
0 siblings, 1 reply; 4+ messages in thread
From: Muli Ben-Yehuda @ 2003-01-07 13:10 UTC (permalink / raw)
To: Andre Hedrick; +Cc: Linux-Kernel
ide_scan_drection is only used if CONFIG_BLK_DEV_IDEPCI is defined,
giving a compilation warning otherwise. Against 2.5.54-bk.
# 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.974 -> 1.975
# drivers/ide/ide.c 1.48 -> 1.49
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/01/07 mulix@alhambra.mulix.org 1.975
# fix "defined but not used" warning
# --------------------------------------------
#
diff -Nru a/drivers/ide/ide.c b/drivers/ide/ide.c
--- a/drivers/ide/ide.c Tue Jan 7 14:17:42 2003
+++ b/drivers/ide/ide.c Tue Jan 7 14:17:42 2003
@@ -179,7 +179,9 @@
spinlock_t ide_lock __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;
+#ifdef CONFIG_BLK_DEV_IDEPCI
static int ide_scan_direction; /* THIS was formerly 2.2.x pci=reverse */
+#endif /* CONFIG_BLK_DEV_IDEPCI */
#ifdef CONFIG_IDEDMA_AUTO
int noautodma = 0;
--
Muli Ben-Yehuda
my opinions may seem crazy. But they all make sense. Insane sense, but
sense nontheless. -- Shlomi Fish on #offtopic.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: PATCH: fix "ide_scan_direction defined but not used" in ide.c
2003-01-07 13:10 PATCH: fix "ide_scan_direction defined but not used" in ide.c Muli Ben-Yehuda
@ 2003-01-07 16:36 ` Alan Cox
2003-01-07 16:01 ` Muli Ben-Yehuda
0 siblings, 1 reply; 4+ messages in thread
From: Alan Cox @ 2003-01-07 16:36 UTC (permalink / raw)
To: Muli Ben-Yehuda; +Cc: Andre Hedrick, Linux Kernel Mailing List
On Tue, 2003-01-07 at 13:10, Muli Ben-Yehuda wrote:
> ide_scan_drection is only used if CONFIG_BLK_DEV_IDEPCI is defined,
> giving a compilation warning otherwise. Against 2.5.54-bk.
Please reject. This is uglier than the warning and not the right approach
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: PATCH: fix "ide_scan_direction defined but not used" in ide.c
2003-01-07 16:36 ` Alan Cox
@ 2003-01-07 16:01 ` Muli Ben-Yehuda
2003-01-07 17:20 ` Alan Cox
0 siblings, 1 reply; 4+ messages in thread
From: Muli Ben-Yehuda @ 2003-01-07 16:01 UTC (permalink / raw)
To: Alan Cox; +Cc: Andre Hedrick, Linux Kernel Mailing List
On Tue, Jan 07, 2003 at 04:36:17PM +0000, Alan Cox wrote:
> On Tue, 2003-01-07 at 13:10, Muli Ben-Yehuda wrote:
> > ide_scan_drection is only used if CONFIG_BLK_DEV_IDEPCI is defined,
> > giving a compilation warning otherwise. Against 2.5.54-bk.
>
> Please reject. This is uglier than the warning and not the right
> approach
Alan, I bow to your superior knowledge and judgement. However,
'ide_scan_direction' is only used in two places in ide.c, and both of
those are only compiled in if CONFIG_BLK_DEV_IDEPCI:
in ide_setup():
#ifdef CONFIG_BLK_DEV_IDEPCI
if (!strcmp(s, "ide=reverse")) {
ide_scan_direction = 1;
printk(" : Enabled support for IDE inverse scan order.\n");
return 1;
}
#endif /* CONFIG_BLK_DEV_IDEPCI */
in probe_for_hwifs():
#ifdef CONFIG_BLK_DEV_IDEPCI
if (pci_present())
{
ide_scan_pcibus(ide_scan_direction);
}
#endif /* CONFIG_BLK_DEV_IDEPCI */
So protecting the variable with #ifdef .. #endif seems the simplest
and least intrusive way to fix it. How would you prefer I do it?
--
Muli Ben-Yehuda
my opinions may seem crazy. But they all make sense. Insane sense, but
sense nontheless. -- Shlomi Fish on #offtopic.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-01-07 16:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-07 13:10 PATCH: fix "ide_scan_direction defined but not used" in ide.c Muli Ben-Yehuda
2003-01-07 16:36 ` Alan Cox
2003-01-07 16:01 ` Muli Ben-Yehuda
2003-01-07 17:20 ` Alan Cox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox