From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Raag Jadav <raag.jadav@intel.com>
Cc: jarkko.nikula@linux.intel.com, mika.westerberg@linux.intel.com,
andriy.shevchenko@linux.intel.com, lakshmi.sowjanya.d@intel.com,
linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/5] pwm: dwc: drop redundant error check
Date: Wed, 14 Feb 2024 18:48:00 +0100 [thread overview]
Message-ID: <en2sbqjmqvo5ka5l5wz4qgqmiv3ivjy7zsjtwc3cgi7nlcgkv7@kuammu3tbjez> (raw)
In-Reply-To: <20240212130247.9985-3-raag.jadav@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1351 bytes --]
Hello,
On Mon, Feb 12, 2024 at 06:32:44PM +0530, Raag Jadav wrote:
> pcim_iomap_table() fails only if pcim_iomap_regions() fails. No need to
> check for failure if the latter is already successful.
>
> Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Signed-off-by: Raag Jadav <raag.jadav@intel.com>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/pwm/pwm-dwc.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/pwm/pwm-dwc.c b/drivers/pwm/pwm-dwc.c
> index a4a057ae03ea..b9e18dbf7493 100644
> --- a/drivers/pwm/pwm-dwc.c
> +++ b/drivers/pwm/pwm-dwc.c
> @@ -50,10 +50,6 @@ static int dwc_pwm_probe(struct pci_dev *pci, const struct pci_device_id *id)
> }
>
> dwc->base = pcim_iomap_table(pci)[0];
> - if (!dwc->base) {
> - dev_err(dev, "Base address missing\n");
> - return -ENOMEM;
> - }
As just written in reply to v2, I'd like to have a comment here saying
that pcim_iomap_table() won't fail after pcim_iomap_table() to prevent
someone sending a patch that undoes this change with the reasoning that
pcim_iomap_table()'s return value should be checked.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2024-02-14 17:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-12 13:02 [PATCH v3 0/5] DesignWare PWM improvements Raag Jadav
2024-02-12 13:02 ` [PATCH v3 1/5] pwm: dwc: use pm_sleep_ptr() macro Raag Jadav
2024-02-12 13:02 ` [PATCH v3 2/5] pwm: dwc: drop redundant error check Raag Jadav
2024-02-14 17:48 ` Uwe Kleine-König [this message]
2024-02-12 13:02 ` [PATCH v3 3/5] pwm: dwc: Add 16 channel support for Intel Elkhart Lake Raag Jadav
2024-02-12 13:02 ` [PATCH v3 4/5] pwm: dwc: simplify error handling Raag Jadav
2024-02-12 13:02 ` [PATCH v3 5/5] pwm: dwc: access driver_data using dev_get_drvdata() Raag Jadav
2024-02-14 12:55 ` [PATCH v3 0/5] DesignWare PWM improvements Jarkko Nikula
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=en2sbqjmqvo5ka5l5wz4qgqmiv3ivjy7zsjtwc3cgi7nlcgkv7@kuammu3tbjez \
--to=u.kleine-koenig@pengutronix.de \
--cc=andriy.shevchenko@linux.intel.com \
--cc=jarkko.nikula@linux.intel.com \
--cc=lakshmi.sowjanya.d@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=raag.jadav@intel.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).