public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
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:16:32 +0200	[thread overview]
Message-ID: <48AAC7B0.9060107@s5r6.in-berlin.de> (raw)
In-Reply-To: <20080819122738.GC21854@parisc-linux.org>

Matthew Wilcox wrote:
> I think a more important question is ... this is coming from a Google
> address, but has a Copyright Dell on it.  Where's the sign-off chain for
> this?  Who's the author really?

Indeed, this needs to be clarified.

>> Gwendal Grignou wrote:
>>> +#define SETUP_TEMPLATE(attrb, field, perm, test)			\
>>> +	i->private_##attrb[count] = dev_attr_##field;		       	\
>>> +	i->private_##attrb[count].attr.mode = perm;			\
>>> +	i->attrb[count] = &i->private_##attrb[count];			\
>>> +	if (test)							\
>>> +		count++
...
>>> +#define SETUP_PORT_ATTRIBUTE(field)					\
>>> +	SETUP_TEMPLATE(port_attrs, field, S_IRUGO, 1)
...
>>> +	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.
-- 
Stefan Richter
-=====-==--- =--- =--==
http://arcgraph.de/sr/

  parent reply	other threads:[~2008-08-19 13:17 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 [this message]
2008-08-19 13:41       ` Stefan Richter
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=48AAC7B0.9060107@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