From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Shyam Sunder Reddy Padira <shyamsunderreddypadira@gmail.com>
Cc: andy@kernel.org, hansg@kernel.org, mchehab@kernel.org,
gregkh@linuxfoundation.org, sakari.ailus@linux.intel.com,
linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
linux-staging@lists.linux.dev
Subject: Re: [PATCH] staging: media: atomisp: drop unnecessary else block after return/break
Date: Mon, 4 May 2026 12:23:03 +0300 [thread overview]
Message-ID: <afhldw80eBVTR8Fo@ashevche-desk.local> (raw)
In-Reply-To: <20260503172200.94712-1-shyamsunderreddypadira@gmail.com>
On Sun, May 03, 2026 at 10:52:00PM +0530, Shyam Sunder Reddy Padira wrote:
> Remove redundant else blocks following return or break
> statements.As control flow exits in these cases, the
There is a room for more words on the lines. Also respect English grammar and
punctuation, exempli gratia use space after a punctuation.
> else branch is unnecessary.Dropping it improves code
> readability.
>
> No functional change.
...
Code wise almost good, see below.
> + pci_read_config_dword(pdev, PCI_INTERRUPT_CTRL, &irq);
> + irq &= BIT(INTR_IIR);
> + pci_write_config_dword(pdev, PCI_INTERRUPT_CTRL, irq);
> +
> + pci_read_config_dword(pdev, PCI_INTERRUPT_CTRL, &irq);
> + if (!(irq & BIT(INTR_IIR))) {
> + atomisp_css2_hw_store_32(MRFLD_INTR_ENABLE_REG, 0x0);
> + goto done;
> + }
> + dev_err(isp->dev,
> + "%s: error in iunit interrupt. status reg=0x%x\n",
> + __func__, irq);
Now it may occupy two lines only.
dev_err(isp->dev, "%s: error in iunit interrupt. status reg=0x%x\n",
__func__, irq);
> + spin_unlock_irqrestore(&isp->lock, flags);
> + return -EAGAIN;
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2026-05-04 9:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-03 17:22 [PATCH] staging: media: atomisp: drop unnecessary else block after return/break Shyam Sunder Reddy Padira
2026-05-04 9:23 ` Andy Shevchenko [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=afhldw80eBVTR8Fo@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=hansg@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=shyamsunderreddypadira@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