Message ID | 20230711083055.1274409-1-fshao@chromium.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp332968vqm; Tue, 11 Jul 2023 01:50:37 -0700 (PDT) X-Google-Smtp-Source: APBJJlHfeSiLi6fvEMu/K5ZsheWVlpHFfcbZV63Jgza6z53946sc/anQcUODiazri1ZNZIDdA2S/ X-Received: by 2002:a2e:b045:0:b0:2b6:e618:b597 with SMTP id d5-20020a2eb045000000b002b6e618b597mr13949977ljl.28.1689065435126; Tue, 11 Jul 2023 01:50:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689065391; cv=none; d=google.com; s=arc-20160816; b=Eu0P+8QyqqMCiJNhNye0fKIJzEmpFPe/3YvkykgoJaVigJLU6hWHqhOAaYtTf/x7aH K/DgU7DVoyDbznh3knpF3P8QAUylZv/DfrBZWiEaTcIvvQAVKJi5HgS2X5R57hgLgznW cADvYqGEBpFhJDsxvTMEsgVIBXefyV7f59HFL0Ffk/fcmh3LA6jxt9oU0kV7BKYNrIum 6YtXU7+7li3/EH/lroWk47/2bsMx0ruoPBqQQgRIv+fh8r/SWsVHMrqkiGtmODQyanDu yX5vt99UiS4Jrthj4MSUnvenxvnaz3aoyvVKcCA9O6yFkE4K3k0dobh86RdrNxpa7xIV cn7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=rofOJD2PEXHX+UfeHTQCqCECMr9/lYMQMtv8+LwhAUQ=; fh=j5Sk8k2J1yITafgXkxDQ7NZDK9p7jlQ1WRR0APwQF0Y=; b=YBF77uZEg9YZ8GxB9wMjDWQix1lecZsbLXpw6TeTy+WvoEvRzawca/V9wh2L1K5xK4 ZtdLbok8vPBp80Iy8znsgHSftinQb6xCGlMBq2ScEky5bRYWG1t2OgfIAFtcyr3KafYK wQCWC1TUhB///kQQZ4uFNoFwKlfNBUe4M5GyUHE2RlYgQpDW90L6UERrJOAcwxtYl4xr JoYczLPcCpydmhIhYgDaS20bkcuDm2iwBnpNG5Gm4X7bSnjhFV99t0vVcO6Ma86ebfQ0 NuJRGWZWSIEI+jp3b9pjOaKexSwRkWXFaiQDoBq7++iAe2nOku90bAJcfi1/89ZoREDX Lnaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=P6A0pA9I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p27-20020a170906141b00b0098e370bdb01si1440307ejc.1052.2023.07.11.01.49.26; Tue, 11 Jul 2023 01:49:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=P6A0pA9I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230292AbjGKIb1 (ORCPT <rfc822;gnulinuxfreebsd@gmail.com> + 99 others); Tue, 11 Jul 2023 04:31:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229936AbjGKIb0 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 11 Jul 2023 04:31:26 -0400 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C336BC2 for <linux-kernel@vger.kernel.org>; Tue, 11 Jul 2023 01:31:25 -0700 (PDT) Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-666ecb21f86so4804972b3a.3 for <linux-kernel@vger.kernel.org>; Tue, 11 Jul 2023 01:31:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1689064285; x=1691656285; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=rofOJD2PEXHX+UfeHTQCqCECMr9/lYMQMtv8+LwhAUQ=; b=P6A0pA9ITf6al+15du8ek7nlPUlClDBxUH1hZIB1C9IlYHPFlUbaVUPv4aE8lRt+H9 9urxpsHuYPzrnVXITxB0swQsGpnoTyvhAgWnCjLNTc8k27WUvzQdiVQ5NT1beq+MN8is 1aXkZZsDeaP+/iP91u7UBNkcezZh5pG7bP188= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689064285; x=1691656285; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=rofOJD2PEXHX+UfeHTQCqCECMr9/lYMQMtv8+LwhAUQ=; b=BmniEa1uiWzLcvh531UAsWNcSVT/5e0LiB6kQQ51MdpOvcMh+eATD++prWk1BCZ+74 eLvtqohpzjIYkcgeM5Js5Pv4OrVduYYiN1bdvFKLZAIf9qlwA11AABWymEHgks9UrK6C IsiR+oYMhVMG3UDVsytb+Z3h5bTJ3CfBTvJX6qB2QSKb60q31FuEJwLoRI+Och0CRYDQ zTY+iTI4G8AyZRAZbIBb3eBI93JTxCf7v9PLoS2Gr6JI1F+SVff/FGSrlfo2ZWOIopeT baja8HIKyPuNzxYAtvNGKM6jgMq+fhAX9Kjk0yaqKusxQnXeRoFTiE4cRr2Oj3kxSSaq zyIA== X-Gm-Message-State: ABy/qLahoNwMwiPnQmcKBmY4bwfjtUt3loCjIvIF0n5zRuBS2O6/xHuq BJiOS1XZI2gXjrLl347LWD+p2g== X-Received: by 2002:a17:903:41c8:b0:1b8:a73e:aaac with SMTP id u8-20020a17090341c800b001b8a73eaaacmr21002030ple.62.1689064285198; Tue, 11 Jul 2023 01:31:25 -0700 (PDT) Received: from fshao-p620.tpe.corp.google.com ([2401:fa00:1:10:4de:ea8b:eb72:c51d]) by smtp.gmail.com with ESMTPSA id t8-20020a170902b20800b001b89466a5f4sm1273471plr.105.2023.07.11.01.31.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jul 2023 01:31:24 -0700 (PDT) From: Fei Shao <fshao@chromium.org> To: Lee Jones <lee@kernel.org>, Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Fei Shao <fshao@chromium.org>, Pavel Machek <pavel@ucw.cz>, linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org Subject: [PATCH] leds: pwm: Fix an error code Date: Tue, 11 Jul 2023 16:30:41 +0800 Message-ID: <20230711083055.1274409-1-fshao@chromium.org> X-Mailer: git-send-email 2.41.0.390.g38632f3daf-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771113432162886872 X-GMAIL-MSGID: 1771113432162886872 |
Series |
leds: pwm: Fix an error code
|
|
Commit Message
Fei Shao
July 11, 2023, 8:30 a.m. UTC
Use the negated -EINVAL as the error code.
Fixes: 95138e01275e ("leds: pwm: Make error handling more robust")
Signed-off-by: Fei Shao <fshao@chromium.org>
---
drivers/leds/leds-pwm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Tue, Jul 11, 2023 at 11:31 AM Fei Shao <fshao@chromium.org> wrote: > > Use the negated -EINVAL as the error code. Thank you, it seems Dan had been the first one. Message ID <a33b981a-b2c4-4dc2-b00a-626a090d2f11@moroto.mountain>
Hi Andy, On Tue, Jul 11, 2023 at 5:10 PM Andy Shevchenko <andy.shevchenko@gmail.com> wrote: > > On Tue, Jul 11, 2023 at 11:31 AM Fei Shao <fshao@chromium.org> wrote: > > > > Use the negated -EINVAL as the error code. > > Thank you, it seems Dan had been the first one. > > Message ID <a33b981a-b2c4-4dc2-b00a-626a090d2f11@moroto.mountain> Thanks for the pointer. Please disregard this patch. Regards, Fei > > -- > With Best Regards, > Andy Shevchenko
On Tue, 11 Jul 2023, Andy Shevchenko wrote: > On Tue, Jul 11, 2023 at 11:31 AM Fei Shao <fshao@chromium.org> wrote: > > > > Use the negated -EINVAL as the error code. > > Thank you, it seems Dan had been the first one. > > Message ID <a33b981a-b2c4-4dc2-b00a-626a090d2f11@moroto.mountain> I don't know much about how other people operate, but I have no way to trivially navigate to this. Would you be kind enough to use URLs please?
On Wed, Jul 12, 2023 at 3:00 PM Lee Jones <lee@kernel.org> wrote: > On Tue, 11 Jul 2023, Andy Shevchenko wrote: > > > On Tue, Jul 11, 2023 at 11:31 AM Fei Shao <fshao@chromium.org> wrote: > > > > > > Use the negated -EINVAL as the error code. > > > > Thank you, it seems Dan had been the first one. > > > > Message ID <a33b981a-b2c4-4dc2-b00a-626a090d2f11@moroto.mountain> > > I don't know much about how other people operate, but I have no way to > trivially navigate to this. Would you be kind enough to use URLs > please? Use this pattern: https://lore.kernel.org/r/$MSG_ID where $MSG_ID is a33b981a-b2c4-4dc2-b00a-626a090d2f11@moroto.mountain in this case. Hence, the URL: https://lore.kernel.org/r/a33b981a-b2c4-4dc2-b00a-626a090d2f11@moroto.mountain Easier way is simply run `b4 mbox $MSG_ID` and open the loaded mbox with your preferred MUA.
On Wed, 12 Jul 2023, Andy Shevchenko wrote: > On Wed, Jul 12, 2023 at 3:00 PM Lee Jones <lee@kernel.org> wrote: > > On Tue, 11 Jul 2023, Andy Shevchenko wrote: > > > > > On Tue, Jul 11, 2023 at 11:31 AM Fei Shao <fshao@chromium.org> wrote: > > > > > > > > Use the negated -EINVAL as the error code. > > > > > > Thank you, it seems Dan had been the first one. > > > > > > Message ID <a33b981a-b2c4-4dc2-b00a-626a090d2f11@moroto.mountain> > > > > I don't know much about how other people operate, but I have no way to > > trivially navigate to this. Would you be kind enough to use URLs > > please? > > Use this pattern: > https://lore.kernel.org/r/$MSG_ID > where $MSG_ID is a33b981a-b2c4-4dc2-b00a-626a090d2f11@moroto.mountain > in this case. > > Hence, the URL: > https://lore.kernel.org/r/a33b981a-b2c4-4dc2-b00a-626a090d2f11@moroto.mountain > > Easier way is simply run `b4 mbox $MSG_ID` and open the loaded mbox > with your preferred MUA. Right, I'm aware that I can manually manipulate the lore URL in this way. However I, like many, do not have a way to do this easily from my mailer. This is why directly navigatable / clickable URLs were invented. :) Please could you use full / clickable URLs to messages?
diff --git a/drivers/leds/leds-pwm.c b/drivers/leds/leds-pwm.c index 29194cc382af..87c199242f3c 100644 --- a/drivers/leds/leds-pwm.c +++ b/drivers/leds/leds-pwm.c @@ -146,7 +146,7 @@ static int led_pwm_create_fwnode(struct device *dev, struct led_pwm_priv *priv) led.name = to_of_node(fwnode)->name; if (!led.name) { - ret = EINVAL; + ret = -EINVAL; goto err_child_out; }