From patchwork Fri Jun 21 14:37:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13707692 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 07B7BC27C4F for ; Fri, 21 Jun 2024 14:38:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Ysq3uDxdRX+lWPBKjGMKWeUw8FNy+OKaKwytbRkcytM=; b=X1oIohykoS2TF1ciDCZm9N0VOy fTwbFHdC3iPpNgxQ0QPqdUbqi3G5uImnlOC86JXHqD/gB8vykvRAp42LveMhIHuAmJcw5nHF89T1Y hUpPjISF4q7+Z6FYApnSG2PJKxAZwkN2wzmF9QoTnAUAaWKye3cp9VZcDoE20aQsl/BOoM09s+kp5 wLYCiyHXwJUnEoirfZzi922ZbL+S/k/rMsP/aoU04e4xhAmWL1fZPRCe8NBLDf3b9xccrAO1fUCBq 73hWLvLcu2DD65valTXo8GQ7DGpB58j2/rpCQZ0N0skLTwQfT4mBd5ibZ4jRD5g2FZPmR7rmsJWKt JNLPeUxw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sKfOr-00000009XBZ-2e8d; Fri, 21 Jun 2024 14:38:01 +0000 Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sKfOb-00000009X3q-0cpK for linux-arm-kernel@lists.infradead.org; Fri, 21 Jun 2024 14:37:46 +0000 Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2eaea28868dso27765261fa.3 for ; Fri, 21 Jun 2024 07:37:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1718980663; x=1719585463; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Ysq3uDxdRX+lWPBKjGMKWeUw8FNy+OKaKwytbRkcytM=; b=uQ1AqqIDQodTzlKsZeJkeHBEzBwbyaVNLGazQCwxMsE1+TMzitom9Lc/ZhUG97E9up YN5loLZmI2qLALQ8jq+N0MqUkUwu3Gg+lz3khifjWEgIRzC/hvWkhGYpHlPaR0yGJboh QK/fc5BoZP83tDcWJ/eJFmky5SpHdEa8AtQQvMvrpqDXQctmwPnTJ9ntbhgM2ZEBySjv hTs4ONIGb6FuQ/YIl5Eqgfmc5ygTgcOqig4Tc3PUPzJXh03/WBqNOFYz3Iax6BeGVwrA +cza5FlJs0jyP6ERb7u5edlYgiy8Wq/zcmBrzoTLXJt/h25+StmX90XzqJiRwJ86og92 q6og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718980663; x=1719585463; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ysq3uDxdRX+lWPBKjGMKWeUw8FNy+OKaKwytbRkcytM=; b=wL3vVSo1auJj5dQghjxnictoXYIQaj7j4jGjrnY3Iuj9Y6I5eyOudo9TqkMtPFB1ir kh6Cb3NuBDVF1KEnOQDTmNs3jgrHmMZ1IXyqYg+Au9OvbGEnE3UFg9iiUZszwapoZR5I ZhyekuPafRA+mOGgn8zG6whCXDBbsD0ehDgW0ry87JY6C9j6vEzLkYDTJieiV6VFuYLm DnEx+fqlQ3wChRitqYEaBZpKkqKKQhLbfc1G/10c2HcKdfby+6hf1Muzzihvq644eqTT dY5D4SBMGp/0LXN8HvsPU+NBgQb4NtLOv0iwzSILF29gPtoXnK2CbI/+WOaZV9rGKg8w qH8w== X-Forwarded-Encrypted: i=1; AJvYcCWXe103QN5LdtehRFU2zMzVN0wEVoCmAQaC9S04wSm90kUpl66bvH1WEld4IRes5pjgaYfwK4kgF4pTcz+MDAz/YkC6sX6ZyGIWNRJqqjPn9ycXcAU= X-Gm-Message-State: AOJu0Yzww6WiSTjVDbUlHzg/a0jTbdqIVq24q/T8OfaFO5TU9bz09KjD nnSW1d5uoPD0UB+oCxGnk/sdkv6Ow++ApZPN0DyN+EKa5cj5G2IGYLEitkoBNVU= X-Google-Smtp-Source: AGHT+IFLJYSC6FgjmimkqI552OEyvALn0atKDFSRu4RIfBpKfbrvs9j00kDHZDdQpT6hofjonr2dCw== X-Received: by 2002:a2e:860e:0:b0:2eb:d963:d8cc with SMTP id 38308e7fff4ca-2ec3cffc54dmr66022471fa.49.1718980663095; Fri, 21 Jun 2024 07:37:43 -0700 (PDT) Received: from localhost (p5091583d.dip0.t-ipconnect.de. [80.145.88.61]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6fcf560632sm89872266b.160.2024.06.21.07.37.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jun 2024 07:37:42 -0700 (PDT) From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Fabrice Gasnier , Maxime Coquelin , Alexandre Torgue , Benjamin Gaignard , Lee Jones , Thierry Reding Cc: linux-pwm@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Trevor Gamblin Subject: [PATCH v2 3/3] pwm: stm32: Fix error message to not describe the previous error path Date: Fri, 21 Jun 2024 16:37:14 +0200 Message-ID: <285182163211203fc823a65b180761f46e828dcb.1718979150.git.u.kleine-koenig@baylibre.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=997; i=u.kleine-koenig@baylibre.com; h=from:subject:message-id; bh=SfN1/kmbTsUXBRgADyC88RwGMUteJe+oranzSQBC5Fk=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBmdZAfb+L0dKnD/968LLQzw7aJDYzoGaDBtRJAB NS3vUyhQRCJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZnWQHwAKCRCPgPtYfRL+ TpYoCACUHHNFQz4vsijVkCs9ya+JpnFPamzXqQOcAYtZspgBby/vtiTojF3PA+ZxfJwj7G430Jx 9ifJDujnDwnuPMbRfJFgXPJomcN5p3Ijc7iSJ2ToVfDkY4T9MUjYbl5Kzff22KmeOj0IfCOEpl4 4uoU9zsubXjvbpq5G/MnS7CnM7DJP3j8wE7icIh2aOMHqkCsDT36QAKpUAzhlyJdmJW2Lvhm51+ wn+O4Q4fa8z6CtH8UuaWMugsrFsJ6AXsA5PqGjVq0v0dFeE4Ava0FCLo1QwXh6zxhnXYXWawKlt 4MHbZtWkTvogh8CUvJ77vCWrdOkRqtuYrmTkH5dsC7khnrSK X-Developer-Key: i=u.kleine-koenig@baylibre.com; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240621_073745_242928_5D2E9C9F X-CRM114-Status: GOOD ( 13.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org "Failed to lock the clock" is an appropriate error message for clk_rate_exclusive_get() failing, but not for the clock running too fast for the driver's calculations. Adapt the error message accordingly. Fixes: d44d635635a7 ("pwm: stm32: Fix for settings using period > UINT32_MAX") Signed-off-by: Uwe Kleine-König --- drivers/pwm/pwm-stm32.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/pwm/pwm-stm32.c b/drivers/pwm/pwm-stm32.c index a7ff39e9fc28..bc32e9abf2b1 100644 --- a/drivers/pwm/pwm-stm32.c +++ b/drivers/pwm/pwm-stm32.c @@ -681,7 +681,8 @@ static int stm32_pwm_probe(struct platform_device *pdev) * .apply() won't overflow. */ if (clk_get_rate(priv->clk) > 1000000000) - return dev_err_probe(dev, -EINVAL, "Failed to lock clock\n"); + return dev_err_probe(dev, -EINVAL, "Clock freq too high (%lu)\n", + clk_get_rate(priv->clk)); chip->ops = &stm32pwm_ops;