From: Lee Duncan <lduncan@suse.com>
To: Matthew Wilcox <matthew@wil.cx>
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
kai.makisara@kolumbus.fi, jeffm@suse.com
Subject: Re: [PATCH 1/5] st: Use static class attributes
Date: Mon, 21 May 2012 16:04:52 -0700 [thread overview]
Message-ID: <4FBACA14.5090804@suse.com> (raw)
In-Reply-To: <20120518025146.GB19158@parisc-linux.org>
Jeff would normally reply to this, since it is his patch, but he is
otherwise occupied right now, so I will respond.
On 05/17/2012 07:51 PM, Matthew Wilcox wrote:
> On Wed, May 16, 2012 at 08:56:13PM -0700, Lee Duncan wrote:
>> @@ -84,7 +84,8 @@ static int try_wdio = 1;
>> static int st_dev_max;
>> static int st_nr_dev;
>>
>> -static struct class *st_sysfs_class;
>> +extern struct class st_sysfs_class;
>
> Umm ... 'extern' ...
>
>> @@ -4283,6 +4284,11 @@ static void scsi_tape_release(struct kref *kref)
>> return;
>> }
>>
>> +struct class st_sysfs_class = {
>> + .name = "scsi_tape",
>> + .dev_attrs = st_dev_attrs,
>> +};
>
> ... and then you define it?
>
> I think you meant to say "struct class st_sysfs_class;" at the top,
> and then later:
>
> static struct class st_sysfs_class = {
> ...
>
>> +struct device_attribute st_dev_attrs[] = {
>
> Should also be static
>
>
The compiler (gcc 4.6.2) does not accept a forward declaration that does
not match the data definition. When I tried your suggestion, the
compiler complained that the two declarations did not match, but it
accepted it if both the forward declaration and the data declaration are
"static".
I'll resubmit v3 of the patch set with this change.
--
Lee Duncan
SUSE Labs
prev parent reply other threads:[~2012-05-21 23:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-17 3:56 [PATCH 1/5] st: Use static class attributes Lee Duncan
2012-05-17 4:01 ` Lee Duncan
2012-05-17 7:32 ` James Bottomley
2012-05-14 23:27 ` Lee Duncan
2012-05-18 2:51 ` Matthew Wilcox
2012-05-21 23:04 ` Lee Duncan [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=4FBACA14.5090804@suse.com \
--to=lduncan@suse.com \
--cc=jeffm@suse.com \
--cc=kai.makisara@kolumbus.fi \
--cc=linux-kernel@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