lkml.org 
[lkml]   [2012]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 0/6] Add a per-dimm structure
On Wed, Mar 14, 2012 at 11:22:21PM -0300, Mauro Carvalho Chehab wrote:
> Em 14-03-2012 20:32, Greg KH escreveu:
> > On Wed, Mar 14, 2012 at 07:20:01PM -0300, Mauro Carvalho Chehab wrote:
> >>> Easy rule to remember, never mix "raw" kobjects and 'struct device',
> >>> which is what you would be doing here, right? We can handle many
> >>> hundreds of thousands of files and devices in a single directory, no
> >>> problem.
> >>
> >> No. They're all generated with raw kobjects, using kobject_init_and_add() or
> >> sysfs_create_file() calls.
> >
> > Ick, no.
> >
> > Please, never use "raw" kobjects. Why doesn't 'struct device' work for
> > you properly here? You just messed userspace all up in that it can not
> > properly account for the parts of sysfs here in the device tree.
> >
> > Anything below /sys/devices/ should be using 'struct device' unless
> > there is a _very_ good reason not to.
>
> The raw kobjects logic is there since the beginning of the edac. I've no
> idea why.

Probably because 'struct sysdev' was what /sys/devices/system/ used to
have, and it wasn't the easiest thing to work with.

I'd recommend converting the whole thing to struct device, if you are
going to be doing any work to this code. I had figured this code was
not really needed anymore, but you've proved that wrong :)

good luck,

greg k-h


\
 
 \ /
  Last update: 2012-03-15 16:03    [W:1.567 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site