Re: [PATCH 6/9] RapidIO: Add switch-specific sysfs initializationcallback

From: Micha Nelissen
Date: Tue Aug 17 2010 - 03:18:18 EST


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/