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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 4 Oct 2013 09:51:20 -0700
From:	Greg KH <gregkh@...uxfoundation.org>
To:	Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
Cc:	linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
	len.brown@...el.com, rjw@...k.pl, arjan@...ux.intel.com,
	jacob.jun.pan@...ux.intel.com
Subject: Re: [PATCH v2 2/6] PowerCap: Add class driver

On Fri, Oct 04, 2013 at 09:36:52AM -0700, Srinivas Pandruvada wrote:
> +/* Power zone ro attributes define */
> +#define powercap_attr_ro(_name)		\
> +	static DEVICE_ATTR(_name, 0444, show_##_name, NULL)
> +
> +/* Power zone rw attributes define */
> +#define powercap_attr_rw(_name)		\
> +	static DEVICE_ATTR(_name, 0644, show_##_name, store_##_name)
> +
> +/* constraint attributes define rw */
> +#define powercap_const_attr_rw(_name)		\
> +	static DEVICE_ATTR(_name, 0644, show_constraint_##_name, \
> +				store_constraint_##_name)
> +/* constraint attributes define ro */
> +#define powercap_const_attr_ro(_name)		\
> +	static DEVICE_ATTR(_name, 0644, show_constraint_##_name, NULL)

Minor nit:

Why are you using your own defines, why not just use the
DEVICE_ATTR_RO() and DEVICE_ATTR_RW() macros?  That way it makes it
easier to grep for attributes, and ensure they have set the mode bits
properly.

thanks,

greg k-h
--
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