lkml.org 
[lkml]   [2010]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] device_attributes: add sysfs_attr_init() for dynamic attributes
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


\
 
 \ /
  Last update: 2010-03-22 07:43    [W:2.077 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site