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]
Message-ID: <8131326.8QGX41MW6c@vostro.rjw.lan>
Date:	Tue, 27 Aug 2013 23:17:38 +0200
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Eduardo Valentin <eduardo.valentin@...com>
Cc:	linux-pm@...r.kernel.org, rui.zhang@...el.com,
	linux-kernel@...r.kernel.org, Anton Vorontsov <anton@...msg.org>,
	David Woodhouse <dwmw2@...radead.org>,
	devicetree@...r.kernel.org, Grant Likely <grant.likely@...aro.org>,
	Kukjin Kim <kgene.kim@...sung.com>,
	Len Brown <lenb@...nel.org>, linux-acpi@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	linux-samsung-soc@...r.kernel.org,
	Matthew Garrett <matthew.garrett@...ula.com>,
	Peter Feuerer <peter@...e.net>,
	platform-driver-x86@...r.kernel.org,
	Rob Herring <rob.herring@...xeda.com>
Subject: Re: [PATCH 3/5] drivers: thermal: make usage of CONFIG_THERMAL_HWMON optional

On Tuesday, August 27, 2013 02:26:41 PM Eduardo Valentin wrote:
> On 23-08-2013 19:08, Rafael J. Wysocki wrote:
> > On Friday, August 23, 2013 06:03:14 PM Eduardo Valentin wrote:
> >> When registering a new thermal_device, the thermal framework
> >> will always add a hwmon sysfs interface.
> >>
> >> This patch adds a flag to make this behavior optional. Now
> >> when registering a new thermal device, the caller needs
> >> to say if the hwmon interface is required.
> >>
> >> In order to keep same behavior as of today, all current
> >> calls will by default create the hwmon interface.
> > 
> > Well, instead of modifying all of the callers this way, why don't
> > you add new versions taking the additional argument as, for example,
> > 
> > thermal_zone_device_register_full()
> > 
> > and redefine the old ones as static inline wrappers, for example
> > 
> > static inline struct thermal_zone_device *thermal_zone_device_register(args)
> > {
> > 	return thermal_zone_device_register_full(args, true);
> > }
> > 
> > ?
> 
> Yeah, that is another way to go and I thought of doing it like that. I
> just could not come out with a good API naming:
> 
> thermal_zone_device_register_full(all args)
> 
> thermal_zone_device_register(args) /* on hwmon == true */
> thermal_zone_device_register_no_hwmon(args) /* on hwmon == false */
> 
> Would this sound reasonable naming?

Yeah, sounds good to me.

Thanks,
Rafael

--
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