Re: [PATCH] staging: media: av7110: coding style fixes: too many tabs
From: Dan Carpenter
Date: Thu Mar 19 2026 - 05:08:36 EST
On Thu, Mar 19, 2026 at 12:41:47AM +0530, Sudarshan Srinivasan wrote:
> This patch fixes below warning reported by checkpatch.pl
> WARNING: Too many leading tabs - consider code refactoring
>
> Signed-off-by: Sudarshan Srinivasan <ss22.kern.dev@xxxxxxxxx>
> ---
> drivers/staging/media/av7110/av7110.c | 32 ++++++++++++++++++---------
> 1 file changed, 22 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/staging/media/av7110/av7110.c b/drivers/staging/media/av7110/av7110.c
> index 607992100baf..970343c4ec51 100644
> --- a/drivers/staging/media/av7110/av7110.c
> +++ b/drivers/staging/media/av7110/av7110.c
> @@ -932,6 +932,27 @@ static int dvb_feed_stop_pid(struct dvb_demux_feed *dvbdmxfeed)
> return ret;
> }
>
> +static int handle_ts_memory_fe(struct dvb_demux_feed *feed,
> + struct dvb_demux *demux,
> + struct av7110 *av7110)
> +{
> + int ret = 0;
> +
> + if (feed->pes_type >= 2)
> + return 0;
> +
> + if ((demux->pids[0] & 0x8000) || (demux->pids[1] & 0x8000))
> + return 0;
> +
> + dvb_ringbuffer_flush_spinlock_wakeup(&av7110->avout);
> + dvb_ringbuffer_flush_spinlock_wakeup(&av7110->aout);
> +
> + ret = av7110_av_start_play(av7110, RP_AV);
> + demux->playing = (ret) ? true : false;
Keep this as:
if (!ret)
demux->playing = true;
1: It matches the original code. Don't make unnecessary style changes.
2: The original better style. The old code said, if there were no
errors set playing to true. The new code is ambiguous. You might
think ret is a bool or something.
3: How do we know that the playing wasn't true at the start? This
could potentially introduce a behavior change. That wasn't
mentioned in the commit message.
> +
> + return ret;
> +}
regards,
dan carpenter