[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <24b3a1f5c1fa416ac5aed375afaa03c0c3ce2be1.camel@perches.com>
Date: Mon, 18 Apr 2022 12:22:36 -0700
From: Joe Perches <joe@...ches.com>
To: Aliya Rahmani <aliyarahmani786@...il.com>, mchehab@...nel.org
Cc: gregkh@...uxfoundation.org, linux-staging@...ts.linux.dev,
outreachy@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: media: av7110: remove redundant space after
cast
On Mon, 2022-04-18 at 22:39 +0530, Aliya Rahmani wrote:
> Remove the unnecessary space immediately after a cast. Identified by
> checkpatch: CHECK: No space is necessary after a cast.
[]
> diff --git a/drivers/staging/media/av7110/av7110_av.c b/drivers/staging/media/av7110/av7110_av.c
[]
> @@ -93,7 +93,7 @@ int av7110_record_cb(struct dvb_filter_pes2ts *p2t, u8 *buf, size_t len)
>
> static int dvb_filter_pes2ts_cb(void *priv, unsigned char *data)
> {
> - struct dvb_demux_feed *dvbdmxfeed = (struct dvb_demux_feed *) priv;
> + struct dvb_demux_feed *dvbdmxfeed = (struct dvb_demux_feed *)priv;
It's also unnecessary to cast void pointers so the cast could be removed.
struct dvb_demux_feed *dvbdmxfeed = priv;
And the code here uses dvbdmxfeed and feed rather interchangeably for
uses of a struct dvb_demux_feed *.
It might be better just to use feed and change the other uses too.
Do consider this just a coding exercise as the driver is for some
hardware that is effectively dead/unavailable/non-functional.
Look at:
commit 989cf18ed08f8b6efd1d1592d1d0108fa09b98f5
Author: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
Date: Mon May 31 17:27:09 2021 +0200
media: av7110: move driver to staging
This driver is really old, from devices that aren't
manufactured anymore for more than a decade.
Maybe instead consider adding a MAINTAINERS section
suggesting this is obsolete and/or a TODO entry in this
directory saying "Delete this" after some time.
Powered by blists - more mailing lists