linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Stephen Hemminger <shemminger@vyatta.com>
Cc: Jeff Garzik <jgarzik@pobox.com>, linux-ide@vger.kernel.org
Subject: Re: Sparse warning in AHCI
Date: Mon, 08 Sep 2008 21:12:10 +0200	[thread overview]
Message-ID: <48C5790A.7030900@gmail.com> (raw)
In-Reply-To: <20080908092801.474aa23c@extreme>

Stephen Hemminger wrote:
> Not sure how you want to fix this:
> 
>   CHECK   drivers/acpi/pci_irq.c
> drivers/ata/ahci.c:323:2: warning: Initializer entry defined twice
> drivers/ata/ahci.c:324:3:   also defined here
> 
> This happens because macro ATA_BASE_SHT(drv_name) defines .can_queue
> then then later in the initializer for ahci_sht, it gets redefined.
> 
> Granted it probably works now, but sparse is correct to complain that
> this is bad usage.
> 

Hmm... That use is pretty much intentional to provide generic default
initial value and allow specific drivers to override if necessary and I
believe it's a valid C usage, no?

Thanks.

-- 
tejun

  reply	other threads:[~2008-09-08 19:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-08 16:28 Sparse warning in AHCI Stephen Hemminger
2008-09-08 19:12 ` Tejun Heo [this message]
2008-09-08 21:21   ` Stephen Hemminger

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=48C5790A.7030900@gmail.com \
    --to=htejun@gmail.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=shemminger@vyatta.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).