From: Stephen Hemminger <shemminger@vyatta.com>
To: Tejun Heo <htejun@gmail.com>
Cc: Jeff Garzik <jgarzik@pobox.com>, linux-ide@vger.kernel.org
Subject: Re: Sparse warning in AHCI
Date: Mon, 8 Sep 2008 14:21:15 -0700 [thread overview]
Message-ID: <20080908142115.773c4cb0@extreme> (raw)
In-Reply-To: <48C5790A.7030900@gmail.com>
On Mon, 08 Sep 2008 21:12:10 +0200
Tejun Heo <htejun@gmail.com> wrote:
> 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?
IANAL as Viro
prev parent reply other threads:[~2008-09-08 21:21 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
2008-09-08 21:21 ` Stephen Hemminger [this message]
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=20080908142115.773c4cb0@extreme \
--to=shemminger@vyatta.com \
--cc=htejun@gmail.com \
--cc=jgarzik@pobox.com \
--cc=linux-ide@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;
as well as URLs for NNTP newsgroup(s).