* [PATCH] iio: light: apds9306: remove redundant explicit pointer cast
@ 2026-01-29 21:04 SAJJA EASWAR SAI
2026-01-29 22:44 ` Subhajit Ghosh
0 siblings, 1 reply; 3+ messages in thread
From: SAJJA EASWAR SAI @ 2026-01-29 21:04 UTC (permalink / raw)
To: Subhajit.Ghosh, jic23
Cc: dlechner, nuno.sa, andy, linux-iio, linux-kernel, iryuken,
SAJJA EASWAR SAI
C allows implicit conversion from void * to struct apds9306_data *, so the
explicit cast on 'ptr' is unnecessary. Removing it improves readability.
Signed-off-by: SAJJA EASWAR SAI <eshwarsajja20@gmail.com>
---
drivers/iio/light/apds9306.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/light/apds9306.c b/drivers/iio/light/apds9306.c
index 7e68cca0e..5d18eabd9 100644
--- a/drivers/iio/light/apds9306.c
+++ b/drivers/iio/light/apds9306.c
@@ -1176,7 +1176,7 @@ static int apds9306_init_iio_gts(struct apds9306_data *data)
static void apds9306_powerdown(void *ptr)
{
- struct apds9306_data *data = (struct apds9306_data *)ptr;
+ struct apds9306_data *data = ptr;
struct apds9306_regfields *rf = &data->rf;
int ret;
--
2.52.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] iio: light: apds9306: remove redundant explicit pointer cast
2026-01-29 21:04 [PATCH] iio: light: apds9306: remove redundant explicit pointer cast SAJJA EASWAR SAI
@ 2026-01-29 22:44 ` Subhajit Ghosh
2026-01-31 17:18 ` Jonathan Cameron
0 siblings, 1 reply; 3+ messages in thread
From: Subhajit Ghosh @ 2026-01-29 22:44 UTC (permalink / raw)
To: SAJJA EASWAR SAI, jic23
Cc: dlechner, nuno.sa, andy, linux-iio, linux-kernel, iryuken
On 30/1/26 07:34, SAJJA EASWAR SAI wrote:
> C allows implicit conversion from void * to struct apds9306_data *, so the
> explicit cast on 'ptr' is unnecessary. Removing it improves readability.
>
> Signed-off-by: SAJJA EASWAR SAI <eshwarsajja20@gmail.com>
> ---
> drivers/iio/light/apds9306.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/light/apds9306.c b/drivers/iio/light/apds9306.c
> index 7e68cca0e..5d18eabd9 100644
> --- a/drivers/iio/light/apds9306.c
> +++ b/drivers/iio/light/apds9306.c
> @@ -1176,7 +1176,7 @@ static int apds9306_init_iio_gts(struct apds9306_data *data)
>
> static void apds9306_powerdown(void *ptr)
> {
> - struct apds9306_data *data = (struct apds9306_data *)ptr;
> + struct apds9306_data *data = ptr;
> struct apds9306_regfields *rf = &data->rf;
> int ret;
>
Looks good. Thank you.
Acked-by: Subhajit Ghosh <subhajit.ghosh@tweaklogic.com>
Regards,
Subhajit Ghosh
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] iio: light: apds9306: remove redundant explicit pointer cast
2026-01-29 22:44 ` Subhajit Ghosh
@ 2026-01-31 17:18 ` Jonathan Cameron
0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2026-01-31 17:18 UTC (permalink / raw)
To: Subhajit Ghosh
Cc: SAJJA EASWAR SAI, dlechner, nuno.sa, andy, linux-iio,
linux-kernel, iryuken
On Fri, 30 Jan 2026 09:14:41 +1030
Subhajit Ghosh <subhajit.ghosh@tweaklogic.com> wrote:
> On 30/1/26 07:34, SAJJA EASWAR SAI wrote:
> > C allows implicit conversion from void * to struct apds9306_data *, so the
> > explicit cast on 'ptr' is unnecessary. Removing it improves readability.
> >
> > Signed-off-by: SAJJA EASWAR SAI <eshwarsajja20@gmail.com>
Applied to the testing branch of iio.git.
Thanks,
Jonathan
> > ---
> > drivers/iio/light/apds9306.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/iio/light/apds9306.c b/drivers/iio/light/apds9306.c
> > index 7e68cca0e..5d18eabd9 100644
> > --- a/drivers/iio/light/apds9306.c
> > +++ b/drivers/iio/light/apds9306.c
> > @@ -1176,7 +1176,7 @@ static int apds9306_init_iio_gts(struct apds9306_data *data)
> >
> > static void apds9306_powerdown(void *ptr)
> > {
> > - struct apds9306_data *data = (struct apds9306_data *)ptr;
> > + struct apds9306_data *data = ptr;
> > struct apds9306_regfields *rf = &data->rf;
> > int ret;
> >
> Looks good. Thank you.
>
> Acked-by: Subhajit Ghosh <subhajit.ghosh@tweaklogic.com>
>
> Regards,
> Subhajit Ghosh
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-01-31 17:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-29 21:04 [PATCH] iio: light: apds9306: remove redundant explicit pointer cast SAJJA EASWAR SAI
2026-01-29 22:44 ` Subhajit Ghosh
2026-01-31 17:18 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®