From: Dan Carpenter <error27@gmail.com>
To: Sudarshan Srinivasan <ss22.kern.dev@gmail.com>
Cc: mchehab@kernel.org, gregkh@linuxfoundation.org,
dan.carpenter@linaro.org, linux-media@vger.kernel.org,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] staging: media: av7110: coding style fixes: too many tabs
Date: Wed, 1 Apr 2026 11:29:14 +0300 [thread overview]
Message-ID: <aczXWu23wEVVO4fJ@stanley.mountain> (raw)
In-Reply-To: <20260330204035.22074-1-ss22.kern.dev@gmail.com>
On Tue, Mar 31, 2026 at 02:10:24AM +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@gmail.com>
> ---
> PATCH v3 consolidates and addresses review comments from earlier versions.
>
> v3:
> - Removed the additional tabs in handle_ts_memory_fe() as indicated by Greg KH
> - Retained the original code style as suggested by Dan Carpenter
> v2:
> - Refactored change by adding function handle_ts_memory_fe
>
> v2: https://lore.kernel.org/linux-staging/20260318191149.109616-1-ss22.kern.dev@gmail.com/
> v1: https://lore.kernel.org/linux-staging/20260316152340.238100-1-ss22.kern.dev@gmail.com/
>
>
> drivers/staging/media/av7110/av7110.c | 33 +++++++++++++++++++--------
> 1 file changed, 23 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/staging/media/av7110/av7110.c b/drivers/staging/media/av7110/av7110.c
> index 607992100baf..35f7d6bb8c74 100644
> --- a/drivers/staging/media/av7110/av7110.c
> +++ b/drivers/staging/media/av7110/av7110.c
> @@ -932,6 +932,28 @@ 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;
Don't do this unnnecessary initialization. It just disables static
analysis for no reason.
> +
What happened to the if (feed->ts_type & TS_DECODER) check?
regards,
dan carpenter
> + 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);
> + if (!ret)
> + demux->playing = true;
> +
> + return ret;
> +}
> +
> static int av7110_start_feed(struct dvb_demux_feed *feed)
> {
> struct dvb_demux *demux = feed->demux;
> @@ -951,16 +973,7 @@ static int av7110_start_feed(struct dvb_demux_feed *feed)
> (feed->pes_type <= DMX_PES_PCR)) {
> switch (demux->dmx.frontend->source) {
> case DMX_MEMORY_FE:
> - if (feed->ts_type & TS_DECODER)
> - if (feed->pes_type < 2 &&
> - !(demux->pids[0] & 0x8000) &&
> - !(demux->pids[1] & 0x8000)) {
> - dvb_ringbuffer_flush_spinlock_wakeup(&av7110->avout);
> - dvb_ringbuffer_flush_spinlock_wakeup(&av7110->aout);
> - ret = av7110_av_start_play(av7110, RP_AV);
> - if (!ret)
> - demux->playing = 1;
> - }
> + ret = handle_ts_memory_fe(feed, demux, av7110);
> break;
> default:
> ret = dvb_feed_start_pid(feed);
> --
> 2.43.0
>
prev parent reply other threads:[~2026-04-01 8:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-30 20:40 [PATCH v3] staging: media: av7110: coding style fixes: too many tabs Sudarshan Srinivasan
2026-04-01 8:29 ` Dan Carpenter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aczXWu23wEVVO4fJ@stanley.mountain \
--to=error27@gmail.com \
--cc=dan.carpenter@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=mchehab@kernel.org \
--cc=ss22.kern.dev@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox