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: <1379538054.1787.71.camel@joe-AO722>
Date:	Wed, 18 Sep 2013 14:00:54 -0700
From:	Joe Perches <joe@...ches.com>
To:	Eduardo Valentin <eduardo.valentin@...com>
Cc:	swarren@...dotorg.org, pawel.moll@....com, mark.rutland@....com,
	ian.campbell@...rix.com, rob.herring@...xeda.com,
	linux@...ck-us.net, rui.zhang@...el.com, wni@...dia.com,
	grant.likely@...aro.org, durgadoss.r@...el.com,
	lm-sensors@...sensors.org, linux-kernel@...r.kernel.org,
	linux-pm@...r.kernel.org
Subject: Re: [PATCHv4 02/16] drivers: thermal: introduce device tree parser

On Wed, 2013-09-18 at 16:52 -0400, Eduardo Valentin wrote:
> On 18-09-2013 16:44, Joe Perches wrote:
> > On Wed, 2013-09-18 at 16:31 -0400, Eduardo Valentin wrote:
> > 
> >> +/**
> >> + * of_parse_thermal_zones - parse device tree thermal data
> >> + *
> >> + * Initialization function that can be called by machine initialization
> >> + * code to parse thermal data and populate the thermal framework
> >> + * with hardware thermal zones info. This function only parses thermal zones.
> >> + * Cooling devices and sensor devices nodes are supposed to be parsed
> >> + * by their respective drivers.
> >> + *
> >> + * Return: 0 on success, proper error code otherwise
> >> + *
> >> + */
> >> +int __init of_parse_thermal_zones(void)
> >> +{
> >> +	struct device_node *np, *child;
> >> +	struct __thermal_zone *tz;
> >> +	struct thermal_zone_device_ops *ops;
> >> +
> >> +	np = of_find_node_by_name(NULL, "thermal-zones");
> >> +	if (!np) {
> >> +		pr_err("unable to find thermal zones\n");
> >> +		return 0;
> > 
> > return 0? This is success?
> 
> This case is success because there should be systems without thermal DT
> entries.

Then the pr_err should be pr_notice/info or not there at all.

[]

> >> +		/* No hwmon because there might be hwmon drivers registering */
> >> +		tzp->no_hwmon = true;
> >> +
> >> +		zone = thermal_zone_device_register(child->name, tz->ntrips,
> >> +						    0, tz,
> >> +						    ops, tzp,
> >> +						    tz->passive_delay,
> >> +						    tz->polling_delay);
> >> +		if (IS_ERR(zone))
> >> +			pr_err("Failed to build %s zone %ld\n", child->name,
> >> +			       PTR_ERR(zone));

Should there should be a return -ERR here?

> hmmm.. I am sending after reworking the return code of this function.

thanks.

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