Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp307571rdb; Thu, 19 Oct 2023 05:21:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEOYx3JIkYM9vtRn3LoSuYXZtkJOV39NOoEdRoW9wzvvIRlRmAmwH0l/FMvvct2/MUwUznw X-Received: by 2002:a17:903:32d0:b0:1ca:8847:66a6 with SMTP id i16-20020a17090332d000b001ca884766a6mr1873630plr.54.1697718089167; Thu, 19 Oct 2023 05:21:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697718089; cv=none; d=google.com; s=arc-20160816; b=cfzHAn5Lk5b+okfdAnWYkCjkwB11Z+x55cYsrVSyVwad2FmFXYe1XHwozr3tTFl+T+ KW++bJ9IJCKAQkw7xrV1IeX8gZ3jtvtYrhpLjdKHQxJy2qfOuEW7hedqgWlkj51yWsGg k0z7nqZ88v0jx6afAspt5AKzILY+8uK566A1BNuzmp+dlOBqaQwWBoOltKoafDZ3Yq71 93x3+OV7zs2VT0vny4wQAF/vNraj3szFkSBAgr//QPra96sPctwwtG/aMtu/nXTOxvmt 54DK6gylC/bQQMua3mUAkP2X1kOb6vzI01VQsWVbBNvuCXRqas1Bi9lf7DAjn3t74pbw rAKw== 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:date :message-id:subject:references:in-reply-to:cc:to:from:dkim-signature; bh=b3Ip6CfxpTkO+JDMEEDZW5ZDMNDnvZTIMn298lbh3TA=; fh=z+8KJRtRptBcum7PSJI4P1LU8AYDlCMqQ0VKEzjFsYI=; b=kByqjb9PZWtJZesXq8xXnghy2NFNRn2Bc7sA2lyCp3zXxINg/82ca/DCeTFutvtiuD C5fnjmuzdLmzRZAbjumH/HoZx9sT5byc5o6ifz9Oy45baBb1EiIJKz//i+J+VUpf/Aj1 +Adv4fK8NkIC+0O99EXe1GDFak39BdWoJx2j5+UYzG3e01/tUYgIuuobW7Nnz+v0VSxy 4ZEWkI0UJnhowUDy//vHZNHURyzLtxK2xAOFMd4K5i0sT61PqBr9hZKPV0iywTMV8nZv A5F1VhuZWCqb+ui7mtYTS3z9ClcxODz415IXV5OGzB1PHAKi+HHCrivlsKNVA38p06nj NHnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lL4GTEtH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id n2-20020a170902968200b001c9faef574csi1958423plp.417.2023.10.19.05.21.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 05:21:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lL4GTEtH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id CDE7B80DF9A5; Thu, 19 Oct 2023 05:21:07 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235294AbjJSMVA (ORCPT + 99 others); Thu, 19 Oct 2023 08:21:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233294AbjJSMU6 (ORCPT ); Thu, 19 Oct 2023 08:20:58 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 627CBB6; Thu, 19 Oct 2023 05:20:57 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A8027C433C8; Thu, 19 Oct 2023 12:20:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697718057; bh=XFuvtHIa7r/OH39BIUY2Rg3BlL4Ej+ED/kG0o9vR93Y=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=lL4GTEtH8PL5mUD4nerM8N3hrP2HgEf9TtWzriEIHLO3yBdd2r2F6bAKPz/5sMJYF 3WCw0BOPLH2CCqD3VYNPsuqDm+lSI7p8C6TYvJSFsqk+d8AOyi57JqO+DVSTxWjcwK Bns62ClLB7ar2dsTvBWRtA7IfsyO1AtDSCt8A+lKIp9v7DL7Fw5czjPK5OFr5SGwkP bIMQ1n/g6TqdfFWApd/I2YaJ76vJUVdGHdNSpRFf8ai+XXZNa5BptaBF33Qa+VfSB3 FUOua3sHRCbCgHj9B+LySXq82BuMiVqaPAO9pFSXJ21HHNye1BOL0dYB1Df77mJFjH nc9b67gWxzvtg== From: Lee Jones To: Hans de Goede , linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org, Andy Shevchenko Cc: Pavel Machek , Lee Jones , Denis Osterland-Heim In-Reply-To: <20231016153051.1409074-1-andriy.shevchenko@linux.intel.com> References: <20231016153051.1409074-1-andriy.shevchenko@linux.intel.com> Subject: Re: (subset) [PATCH v2 1/1] leds: core: Refactor led_update_brightness() to use standard pattern Message-Id: <169771805542.2469471.17417276812343058652.b4-ty@kernel.org> Date: Thu, 19 Oct 2023 13:20:55 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailer: b4 0.12.2 X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 19 Oct 2023 05:21:08 -0700 (PDT) On Mon, 16 Oct 2023 18:30:51 +0300, Andy Shevchenko wrote: > The standard conditional pattern is to check for errors first and > bail out if any. Refactor led_update_brightness() accordingly. > > While at it, drop unneeded assignment and return 0 unconditionally > on success. > > > [...] Applied, thanks! [1/1] leds: core: Refactor led_update_brightness() to use standard pattern commit: 0e5bb700df6a6fe36d9487a4e0a82a4c7b1f7b4e -- Lee Jones [李琼斯]