lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 28 May 2015 17:01:28 +0200
From:	Takashi Iwai <tiwai@...e.de>
To:	Quentin Lambert <lambert.quentin@...il.com>
Cc:	Johannes Berg <johannes@...solutions.net>,
	Jaroslav Kysela <perex@...ex.cz>,
	linuxppc-dev@...ts.ozlabs.org, alsa-devel@...a-project.org,
	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] ALSA: aoa: convert bus code to use dev_groups

At Thu, 28 May 2015 16:43:12 +0200,
Quentin Lambert wrote:
> 
> On 28/05/2015 16:09, Takashi Iwai wrote:
> > At Thu, 28 May 2015 15:59:50 +0200,
> > Quentin Lambert wrote:
> >>
> >>
> >> On 28/05/2015 15:52, Takashi Iwai wrote:
> >>> At Thu, 28 May 2015 14:48:27 +0200,
> >>> Quentin Lambert wrote:
> >>>> You should use dev_groups instead of the dev_attrs field of struct
> >>>> bus_type. This converts the MDIO bus code to use the correct field.
> >>>>
> >>>> These modifications were made using Coccinelle.
> >>>>
> >>>> Signed-off-by: Quentin Lambert <lambert.quentin@...il.com>
> >>> What's wrong with dev_attrs?
> >>> (Not offending, I'm just curious where the preference for dev_groups
> >>>    is referred...)
> >> This patch is based on commit 4192c74940e23da727eb02b7b4ee779dde2f670,
> >> its message indicates that dev_attrs is going away.
> > OK, makes sense.  Then please keep such information in the changelog.
> > BTW, the code in question isn't MDIO at all.
> Sorry, about that!
> >
> > Also, it'd be better to move ATTRIBUTE_GROUPS(soundbus_dev) into
> > soundbus/sysfs.c, and make it this global instead of
> > soundbus_dev_attrs[].
> Ok, I need to find a nice way to do that because ATTRIBUTE_GROUPS 
> declares the
> structure as static.

Ah, right.  I fell to the same pintfall in the past, too :)

>I will send a second version with a better solution.

If it results in an ungly code, it's fine with the original code,
too.  But, maybe with a comment indicating that xxx_dev_attrs[] is
defined in xxx.c.


thanks,

Takashi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ