From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: Matthew Wilcox <matthew@wil.cx>
Cc: Gwendal Grignou <gwendal@google.com>,
IDE/ATA development list <linux-ide@vger.kernel.org>,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH #upstream-fixes] libata: Add transport class for libata
Date: Tue, 19 Aug 2008 15:41:01 +0200 [thread overview]
Message-ID: <48AACD6D.20001@s5r6.in-berlin.de> (raw)
In-Reply-To: <48AAC7B0.9060107@s5r6.in-berlin.de>
I wrote:
>>> Gwendal Grignou wrote:
>>>> + count = 0;
>>>> + SETUP_PORT_ATTRIBUTE(nr_pmp_links);
>>>> + SETUP_PORT_ATTRIBUTE(idle_irq);
>>>> + BUG_ON(count > ATA_PORT_ATTRS);
>>>> + i->port_attrs[count] = NULL;
>
> I understand that such preprocessor games are hard to avoid in code like
> sysfs attribute setup. I have nothing better to suggest, but they are
> ugly nevertheless, and may amount to bloat.
>
> Anyway; the BUG_ON there should probably be a BUILD_BUG_ON.
...but alas gcc isn't clever enough: It won't report if ATA_PORT_ATTRS
was too small.
--
Stefan Richter
-=====-==--- =--- =--==
http://arcgraph.de/sr/
next prev parent reply other threads:[~2008-08-19 13:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-19 4:31 [PATCH #upstream-fixes] libata: Add transport class for libata Gwendal Grignou
2008-08-19 11:34 ` Stefan Richter
2008-08-19 12:27 ` Matthew Wilcox
2008-08-19 13:04 ` Stefan Richter
2008-08-19 13:16 ` Stefan Richter
2008-08-19 13:41 ` Stefan Richter [this message]
2008-08-19 18:14 ` Gwendal Grignou
2008-08-20 8:17 ` Tejun Heo
2008-08-20 18:55 ` Gwendal Grignou
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=48AACD6D.20001@s5r6.in-berlin.de \
--to=stefanr@s5r6.in-berlin.de \
--cc=gwendal@google.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=matthew@wil.cx \
/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).