mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@gmail.com>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>,
	linux-pwm@vger.kernel.org
Cc: linux-renesas-soc@vger.kernel.org,
	"Duc Nguyen" <duc.nguyen.ub@renesas.com>,
	"Thierry Reding" <thierry.reding@gmail.com>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Lee Jones" <lee.jones@linaro.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] pwm: renesas-tpu: better errno for impossible rates
Date: Wed, 15 Sep 2021 12:36:30 +0300	[thread overview]
Message-ID: <be4b0937-4f75-8d9f-90fb-95414c9d5a56@gmail.com> (raw)
In-Reply-To: <20210915065542.1897-2-wsa+renesas@sang-engineering.com>

On 15.09.2021 9:55, Wolfram Sang wrote:

> From: Duc Nguyen <duc.nguyen.ub@renesas.com>
> 
> ENOTSUP has confused users. EINVAL has been considered clearer. Change
> the errno, we were the only ones using ENOTSUP in this subsystem anyhow.

    It's ENOTSUPP in the code. :-)

> 
> Signed-off-by: Duc Nguyen <duc.nguyen.ub@renesas.com>
> [wsa: split and reworded commit message]
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
>   drivers/pwm/pwm-renesas-tpu.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pwm/pwm-renesas-tpu.c b/drivers/pwm/pwm-renesas-tpu.c
> index 4381df90a527..754440194650 100644
> --- a/drivers/pwm/pwm-renesas-tpu.c
> +++ b/drivers/pwm/pwm-renesas-tpu.c
> @@ -269,7 +269,7 @@ static int tpu_pwm_config(struct pwm_chip *chip, struct pwm_device *_pwm,
>   
>   	if (prescaler == ARRAY_SIZE(prescalers) || period == 0) {
>   		dev_err(&tpu->pdev->dev, "clock rate mismatch\n");
> -		return -ENOTSUPP;
> +		return -EINVAL;
>   	}
>   
>   	if (duty_ns) {

MBR, Sergei

  reply	other threads:[~2021-09-15  9:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-15  6:55 [PATCH 0/2] pwm: renesas-tpu: minor improvements Wolfram Sang
2021-09-15  6:55 ` [PATCH 1/2] pwm: renesas-tpu: better errno for impossible rates Wolfram Sang
2021-09-15  9:36   ` Sergei Shtylyov [this message]
2021-09-17  8:25   ` Uwe Kleine-König
2021-09-20  9:08     ` Wolfram Sang
2021-09-15  6:55 ` [PATCH 2/2] pwm: renesas-tpu: don't allow no duty if duty_ns is given Wolfram Sang
2021-09-16 16:47   ` Uwe Kleine-König

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=be4b0937-4f75-8d9f-90fb-95414c9d5a56@gmail.com \
    --to=sergei.shtylyov@gmail.com \
    --cc=duc.nguyen.ub@renesas.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=wsa+renesas@sang-engineering.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

Powered by JetHome