iio: make iio_device_get_drvdata take a const struct iio_dev *.
[email protected]
maintainerPATCH 1/1 iio: make iio_device_get_drvdata take a const struct iio_dev *.
From: Jonathan Cameron <[email protected]>
As this just calls dev_get_drvdata underneath which is happy with a const struct device * we should change and avoid potentially casting away a const in order to then put it back again.
--- include/linux/iio/iio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/iio/iio.h +1 -1
@@ -669,7 +669,7 @@ static inline void iio_device_set_drvdata(struct iio_dev *indio_dev, void *data)* * Returns the data previously set with iio_device_set_drvdata() */ -static inline void *iio_device_get_drvdata (struct iio_dev *indio_dev) +static inline void *iio_device_get_drvdata (const struct iio_dev *indio_dev) {return dev_get_drvdata (&indio_dev->dev); }
Signature · 1 line
2.26.2
A message that is not in the archive (sent off-list or not yet received): SA0PR12MB44290C81C03F7DAEE315DBFBC48B0@SA0PR12MB4429.namprd12.prod.outlook.com
Quoted 8 lines · On Tue, 2 Jun 2020 07:39:52 +0000 Jean-Baptiste Maneyrol…
Hi Jonathan,
simple and perfect.
Thanks,
JBReviewed-by Jean-Baptiste Maneyrol <[email protected]>
Applied.
Thanks,
Jonathan
Quoted 38 lines
________________________________
From: [email protected] <[email protected]>
Sent: Thursday, May 21, 2020 19:53
To: [email protected] <[email protected]>
Cc: Jonathan Cameron <[email protected]>; Jean-Baptiste Maneyrol <[email protected]>
Subject: [PATCH] iio: makeiio_device_get_drvdatatake a const structiio_dev*.CAUTION: This email originated from outside of the organization. Please make sure the sender is who they say they are and do not click links or open attachments unless you recognize the sender and know the content is safe.
From: Jonathan Cameron <[email protected]>
As this just calls
dev_get_drvdataunderneath which is happy with a const struct device * we should change and avoid potentially casting away a const in order to then put it back again.Signed-off-by Jonathan Cameron <[email protected]>Cc Jean-Baptiste Maneyrol <[email protected]>--- include/linux/iio/iio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/linux/iio/iio.h +1
-2@@ -669,7 +669,7 @@ static inline void iio_device_set_drvdata(struct iio_dev *indio_dev, void *data)* * Returns the data previously set with iio_device_set_drvdata() */ -static inline void *iio_device_get_drvdata (struct iio_dev *indio_dev) +static inline void *iio_device_get_drvdata (const struct iio_dev *indio_dev) {return dev_get_drvdata (&indio_dev->dev); } --2.26.2
Jean-Baptiste Maneyrol
AppliedHello Jonathan,
thanks a lot, but I'm currently not able to find this patch in iio git repository, neither in testing or fixes-togreg branches.
Is there something I am missing or I just have to wait more ?
Thanks,
JB
From: [email protected] <[email protected]> on behalf of Jonathan Cameron <[email protected]>
Sent: Saturday, June 6, 2020 16:24
To: Jean-Baptiste Maneyrol <[email protected]>
Cc: [email protected] <[email protected]>; Jonathan Cameron <[email protected]>
Subject: Re: [PATCH] iio: make iio_device_get_drvdata take a const struct iio_dev *.
CAUTION: This email originated from outside of the organization. Please make sure the sender is who they say they are and do not click links or open attachments unless you recognize the sender and know the content is safe.
Quoted 8 lines · On Tue, 2 Jun 2020 07:39:52 +0000 Jean-Baptiste Maneyrol…
Hi Jonathan,
simple and perfect.
Thanks,
JBReviewed-by Jean-Baptiste Maneyrol <[email protected]>
Applied.
Thanks,
Jonathan
Quoted 38 lines
________________________________
From: [email protected] <[email protected]>
Sent: Thursday, May 21, 2020 19:53
To: [email protected] <[email protected]>
Cc: Jonathan Cameron <[email protected]>; Jean-Baptiste Maneyrol <[email protected]>
Subject: [PATCH] iio: makeiio_device_get_drvdatatake a const structiio_dev*.CAUTION: This email originated from outside of the organization. Please make sure the sender is who they say they are and do not click links or open attachments unless you recognize the sender and know the content is safe.
From: Jonathan Cameron <[email protected]>
As this just calls
dev_get_drvdataunderneath which is happy with a const struct device * we should change and avoid potentially casting away a const in order to then put it back again.Signed-off-by Jonathan Cameron <[email protected]>Cc Jean-Baptiste Maneyrol <[email protected]>---
include/linux/iio/iio.h| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)include/linux/iio/iio.h +1
-2@@ -669,7 +669,7 @@ static inline void iio_device_set_drvdata(struct iio_dev *indio_dev, void *data)* * Returns the data previously set with iio_device_set_drvdata() */ -static inline void *iio_device_get_drvdata (struct iio_dev *indio_dev) +static inline void *iio_device_get_drvdata (const struct iio_dev *indio_dev) { return dev_get_drvdata(&indio_dev->dev); } --2.26.2
Jonathan Cameron
maintainerQuoted 5 lines · On Mon, 8 Jun 2020 09:43:26 +0000 Jean-Baptiste Maneyrol…
Hello Jonathan,
thanks a lot, but I'm currently not able to find this patch in iio git repository, neither in testing or fixes-togreg branches.
Is there something I am missing or I just have to wait more ?
I forgot to push out. Did so mid week after I saw another email saying things weren't there that should have been.
Given I've just rebased testing, I won't push out a togreg branch until at least mid week to let the build reports come in.
Thanks,
Jonathan
Quoted 70 lines
Thanks,
JBFrom: [email protected] <[email protected]> on behalf of Jonathan Cameron <[email protected]>
Sent: Saturday, June 6, 2020 16:24
To: Jean-Baptiste Maneyrol <[email protected]>
Cc: [email protected] <[email protected]>; Jonathan Cameron <[email protected]>
Subject: Re: [PATCH] iio: makeiio_device_get_drvdatatake a const structiio_dev*.
CAUTION: This email originated from outside of the organization. Please make sure the sender is who they say they are and do not click links or open attachments unless you recognize the sender and know the content is safe.Quoted 8 lines · On Tue, 2 Jun 2020 07:39:52 +0000 Jean-Baptiste Maneyrol…
Hi Jonathan,
simple and perfect.
Thanks,
JBReviewed-by Jean-Baptiste Maneyrol <[email protected]>Applied.
Thanks,
Jonathan
Quoted 38 lines
________________________________
From: [email protected] <[email protected]>
Sent: Thursday, May 21, 2020 19:53
To: [email protected] <[email protected]>
Cc: Jonathan Cameron <[email protected]>; Jean-Baptiste Maneyrol <[email protected]>
Subject: [PATCH] iio: makeiio_device_get_drvdatatake a const structiio_dev*.CAUTION: This email originated from outside of the organization. Please make sure the sender is who they say they are and do not click links or open attachments unless you recognize the sender and know the content is safe.
From: Jonathan Cameron <[email protected]>
As this just calls
dev_get_drvdataunderneath which is happy with a const struct device * we should change and avoid potentially casting away a const in order to then put it back again.Signed-off-by Jonathan Cameron <[email protected]>Cc Jean-Baptiste Maneyrol <[email protected]>---
include/linux/iio/iio.h| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)include/linux/iio/iio.h +1
-2@@ -669,7 +669,7 @@ static inline void iio_device_set_drvdata(struct iio_dev *indio_dev, void *data)* * Returns the data previously set with iio_device_set_drvdata() */ -static inline void *iio_device_get_drvdata (struct iio_dev *indio_dev) +static inline void *iio_device_get_drvdata (const struct iio_dev *indio_dev) { return dev_get_drvdata(&indio_dev->dev); } --2.26.2