Re: [PATCH] staging: media: av7110: remove redundant space after cast

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
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.







[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux