[PATCH 6/9] RapidIO: Add switch-specific sysfs initialization callback

Micha Nelissen micha at neli.hopto.org
Tue Aug 17 17:18:11 EST 2010


Bounine, Alexandre wrote:
>> Why not make a sw_sysfs_create and sw_sysfs_remove? Is better for
>> readability. Now you call 'sw_sysfs(dev, 0)' or 'sw_sysfs(dev, 1)';
> 
> I just do not want to have an extra member here. Not every switch will
> require own sysfs attributes, but every switch will be presented by a
> data structure. Based on its intended use I do not see any problem here.

It's not problematic, but personally I find function calls that pass 0 
or 1 as an argument hard to read. Likewise for boolean parameters. An 
alternative would be to have defines SW_SYSFS_CREATE etc. It's a minor item.

Micha


More information about the Linuxppc-dev mailing list