Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1220807 > unrolled thread

[PATCH] thermal: Fix thermal_zone_of_sensor_register to match documentation

Started byPunit Agrawal <punit.agrawal@arm.com>
First post2015-09-08 16:00 +0200
Last post2015-09-10 10:50 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] thermal: Fix thermal_zone_of_sensor_register to match documentation Punit Agrawal <punit.agrawal@arm.com> - 2015-09-08 16:00 +0200
    Re: [PATCH] thermal: Fix thermal_zone_of_sensor_register to match  documentation Javi Merino <javi.merino@arm.com> - 2015-09-10 10:50 +0200
      RE: [PATCH] thermal: Fix thermal_zone_of_sensor_register to match  documentation "Zhang, Rui" <rui.zhang@intel.com> - 2015-09-10 10:50 +0200

#1220807 — [PATCH] thermal: Fix thermal_zone_of_sensor_register to match documentation

FromPunit Agrawal <punit.agrawal@arm.com>
Date2015-09-08 16:00 +0200
Subject[PATCH] thermal: Fix thermal_zone_of_sensor_register to match documentation
Message-ID<q6rBg-624-13@gated-at.bofh.it>
thermal_zone_of_sensor_register is documented as returning a pointer
to either a valid thermal_zone_device on success, or a corresponding
ERR_PTR() value.

In contrast, the function returns NULL when THERMAL_OF is configured
off. Fix this.

Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Cc: Eduardo Valentin <edubezval@gmail.com>
Cc: Zhang Rui <rui.zhang@intel.com>
---
Hi Eduardo, Rui,

This patch has been on the list without any objection for sometime [0]
 now. Could you pick this up for the next rc please?

Thanks,
Punit

[0] http://thread.gmane.org/gmane.linux.kernel/2011466/focus=2013175

 include/linux/thermal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index 037e9df..f344e51 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -364,7 +364,7 @@ static inline struct thermal_zone_device *
 thermal_zone_of_sensor_register(struct device *dev, int id, void *data,
 				const struct thermal_zone_of_device_ops *ops)
 {
-	return NULL;
+	return ERR_PTR(-ENODEV);
 }
 
 static inline
-- 
2.5.0

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

[toc] | [next] | [standalone]


#1222024 — Re: [PATCH] thermal: Fix thermal_zone_of_sensor_register to match documentation

FromJavi Merino <javi.merino@arm.com>
Date2015-09-10 10:50 +0200
SubjectRe: [PATCH] thermal: Fix thermal_zone_of_sensor_register to match documentation
Message-ID<q75Im-4L3-21@gated-at.bofh.it>
In reply to#1220807
On Tue, Sep 08, 2015 at 02:51:12PM +0100, Punit Agrawal wrote:
> thermal_zone_of_sensor_register is documented as returning a pointer
> to either a valid thermal_zone_device on success, or a corresponding
> ERR_PTR() value.
> 
> In contrast, the function returns NULL when THERMAL_OF is configured
> off. Fix this.
> 
> Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
> Acked-by: Guenter Roeck <linux@roeck-us.net>
> Cc: Eduardo Valentin <edubezval@gmail.com>
> Cc: Zhang Rui <rui.zhang@intel.com>
> ---
> Hi Eduardo, Rui,
> 
> This patch has been on the list without any objection for sometime [0]
>  now. Could you pick this up for the next rc please?
> 
> Thanks,
> Punit
> 
> [0] http://thread.gmane.org/gmane.linux.kernel/2011466/focus=2013175
> 
>  include/linux/thermal.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

FWIW,

Reviewed-by: Javi Merino <javi.merino@arm.com>

Cheers,
Javi

> diff --git a/include/linux/thermal.h b/include/linux/thermal.h
> index 037e9df..f344e51 100644
> --- a/include/linux/thermal.h
> +++ b/include/linux/thermal.h
> @@ -364,7 +364,7 @@ static inline struct thermal_zone_device *
>  thermal_zone_of_sensor_register(struct device *dev, int id, void *data,
>  				const struct thermal_zone_of_device_ops *ops)
>  {
> -	return NULL;
> +	return ERR_PTR(-ENODEV);
>  }
>  
>  static inline
> -- 
> 2.5.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1222039 — RE: [PATCH] thermal: Fix thermal_zone_of_sensor_register to match documentation

From"Zhang, Rui" <rui.zhang@intel.com>
Date2015-09-10 10:50 +0200
SubjectRE: [PATCH] thermal: Fix thermal_zone_of_sensor_register to match documentation
Message-ID<q75In-4L3-49@gated-at.bofh.it>
In reply to#1222024
DQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogSmF2aSBNZXJpbm8gW21h
aWx0bzpqYXZpLm1lcmlub0Bhcm0uY29tXQ0KPiBTZW50OiBUaHVyc2RheSwgU2VwdGVtYmVyIDEw
LCAyMDE1IDQ6MzkgUE0NCj4gVG86IFB1bml0IEFncmF3YWwNCj4gQ2M6IGVkdWJlenZhbEBnbWFp
bC5jb207IFpoYW5nLCBSdWk7IGxpbnV4LXBtQHZnZXIua2VybmVsLm9yZzsgbGludXgtDQo+IGtl
cm5lbEB2Z2VyLmtlcm5lbC5vcmc7IGxpbnV4QHJvZWNrLXVzLm5ldA0KPiBTdWJqZWN0OiBSZTog
W1BBVENIXSB0aGVybWFsOiBGaXggdGhlcm1hbF96b25lX29mX3NlbnNvcl9yZWdpc3RlciB0bw0K
PiBtYXRjaCBkb2N1bWVudGF0aW9uDQo+IEltcG9ydGFuY2U6IEhpZ2gNCj4gDQo+IE9uIFR1ZSwg
U2VwIDA4LCAyMDE1IGF0IDAyOjUxOjEyUE0gKzAxMDAsIFB1bml0IEFncmF3YWwgd3JvdGU6DQo+
ID4gdGhlcm1hbF96b25lX29mX3NlbnNvcl9yZWdpc3RlciBpcyBkb2N1bWVudGVkIGFzIHJldHVy
bmluZyBhIHBvaW50ZXINCj4gPiB0byBlaXRoZX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lZCwgMSBpbnNlcnRpb24oKyksIDEgZGVsZXRpb24oLSkNCj4gDQo+IEZX
SVcsDQo+IA0KPiBSZXZpZXdlZC1ieTogSmF2aSBNZXJpbm8gPGphdmkubWVyaW5vQGFybS5jb20+
DQo+IA0KPiBDaGVlcnMsDQo+IEphdmkNCj4gDQo+ID4gZGlmZiAtLWdpdCBhL2luY2x1ZGUvbGlu
dXgvdGhlcm1hbC5oIGIvaW5jbHVkZS9saW51eC90aGVybWFsLmggaW5kZXgNCj4gPiAwMzdlOWRm
Li5mMzQ0ZTUxIDEwMDY0NA0KPiA+IC0tLSBhL2luY2x1ZGUvbGludXgvdGhlcm1hbC5oDQo+ID4g
KysrIGIvaW5jbHVkZS9saW51eC90aGVybWFsLmgNCj4gPiBAQCAtMzY0LDcgKzM2NCw3IEBAIHN0
YXRpYyBpbmxpbmUgc3RydWN0IHRoZXJtYWxfem9uZV9kZXZpY2UgKg0KPiA+IHRoZXJtYWxfem9u
ZV9vZl9zZW5zb3JfcmVnaXN0ZXIoc3RydWN0IGRldmljZSAqZGV2LCBpbnQgaWQsIHZvaWQgKmRh
dGEsDQo+ID4gIAkJCQljb25zdCBzdHJ1Y3QgdGhlcm1hbF96b25lX29mX2RldmljZV9vcHMNCj4g
Km9wcykgIHsNCj4gPiAtCXJldHVybiBOVUxMOw0KPiA+ICsJcmV0dXJuIEVSUl9QVFIoLUVOT0RF
Vik7DQo+ID4gIH0NCj4gPg0KPiA+ICBzdGF0aWMgaW5saW5lDQo+ID4gLS0NCj4gPiAyLjUuMA0K
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web