public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Muli Ben-Yehuda <mulix@mulix.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Andre Hedrick <andre@linux-ide.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: PATCH: fix "ide_scan_direction defined but not used" in ide.c
Date: Tue, 7 Jan 2003 18:01:30 +0200	[thread overview]
Message-ID: <20030107160130.GC27032@alhambra> (raw)
In-Reply-To: <1041957377.20658.28.camel@irongate.swansea.linux.org.uk>

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.


  reply	other threads:[~2003-01-07 15:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2003-01-07 17:20     ` Alan Cox

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=20030107160130.GC27032@alhambra \
    --to=mulix@mulix.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=andre@linux-ide.org \
    --cc=linux-kernel@vger.kernel.org \
    /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