From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Wolfram Sang <w.sang@pengutronix.de>
Cc: platform-driver-x86@vger.kernel.org, Greg KH <gregkh@suse.de>,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
Mauro Carvalho Chehab <mchehab@infradead.org>,
linuxppc-dev@ozlabs.org,
"Eric W. Biederman" <ebiederm@xmission.com>,
Sujith Thomas <sujith.thomas@intel.com>,
linux-media@vger.kernel.org, Mike Isely <isely@pobox.com>,
Matthew Garrett <mjg@redhat.com>
Subject: Re: [PATCH] device_attributes: add sysfs_attr_init() for dynamic attributes
Date: Sun, 21 Mar 2010 23:40:28 -0700 [thread overview]
Message-ID: <20100322064027.GG31621@core.coreip.homeip.net> (raw)
In-Reply-To: <1269238878-991-1-git-send-email-w.sang@pengutronix.de>
Hi Wolfram,
On Mon, Mar 22, 2010 at 07:21:17AM +0100, Wolfram Sang wrote:
> Made necessary by 6992f5334995af474c2b58d010d08bc597f0f2fe.
>
> Found by this semantic patch:
>
> @ init @
> type T;
> identifier A;
> @@
>
> T {
> ...
> struct device_attribute A;
> ...
> };
>
> @ main extends init @
> expression E;
> statement S;
> identifier err;
> T *name;
> @@
>
> ... when != sysfs_attr_init(&name->A.attr);
> (
> + sysfs_attr_init(&name->A.attr);
> if (device_create_file(E, &name->A))
> S
> |
> + sysfs_attr_init(&name->A.attr);
> err = device_create_file(E, &name->A);
> )
>
> While reviewing, I put the initialization to apropriate places.
>
My standard question - are all of these need to be dynamically
allocated?
Thanks.
--
Dmitry
next prev parent reply other threads:[~2010-03-22 6:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-22 6:21 [PATCH] device_attributes: add sysfs_attr_init() for dynamic attributes Wolfram Sang
2010-03-22 6:40 ` Dmitry Torokhov [this message]
2010-03-22 8:54 ` Wolfram Sang
2010-04-10 16:55 ` Mike Isely
2010-04-10 17:12 ` Mauro Carvalho Chehab
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=20100322064027.GG31621@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=ebiederm@xmission.com \
--cc=gregkh@suse.de \
--cc=isely@pobox.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=mchehab@infradead.org \
--cc=mjg@redhat.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=sujith.thomas@intel.com \
--cc=w.sang@pengutronix.de \
/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).