Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp243875lqt; Mon, 18 Mar 2024 06:52:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXi22iyr7IbnDkPS/meWkgMWZ12GnO1Dj6xtsSUMmlPxWa8v+jp2MFk/0aEPL7VQAKhJyjgScBhItFCUMihobk6vS9YjvU+o8+M4WEuvg== X-Google-Smtp-Source: AGHT+IFlO7+EPPK4HDSB5hoM4c5XMeH1P9iIv5hixbj2UEmBQLYQL6kjXaQuw8UVnTk/o/tciZ+i X-Received: by 2002:a05:6512:619:b0:513:dd23:7a02 with SMTP id b25-20020a056512061900b00513dd237a02mr5352464lfe.26.1710769944626; Mon, 18 Mar 2024 06:52:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710769944; cv=pass; d=google.com; s=arc-20160816; b=S25JqfUQ6S9w9QUcP/V4wqikky7UQbKj/HPenzs1/DfsomJhSJiAxvRpkhQTDZCY0L C2AZqQmPg1g7nwiAkSmKfiEGkiHBAPg9JU3/g41jOz1+5u4BX7wcnNcDbBV2ydxV+fJU U0E3Eyv2UvIUgXNF5Y+CXfTyCrdYLLXR8OPvchO2/qyGRI00BfQ0e9bwCI+61PybkGDW 8DyqxQ2k7Mj/JSqVghqo1WIWj/BDM2/FbdjN8agnfRMuqiQ/f2WpFCptu18N5t27rQMw 6hjBJvm2YlaRmO2R3eN3lHDA/QzrbUAyJ1gNWjO04VjVS7KwiQjwiukQwuUxbJJ4CQKI zqBw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence; bh=w7ebsFZDfZ8wRGX/ymUxLQCpYnUCXb5v3M/6qeGcR2k=; fh=ElIzII46fDH0PGSaJnmg8W3e0U8E9V3uuw4bkE/D7To=; b=pY514P7MNcW7pTIONlh/jJm77Q+PHrDJ3wb0i/8oJesMZKYyKT7V+POIcasP7xbKfR ehp0LxyC+TOSCN0beBP4JsOd/7GjFz672rXl3QMmV+h7c3m0cbEfbf3OwFz/soCWo+Au Sk1zHEldWMmFQD2TzjlqtCX3Y+jfwZCH0shpjqwuKwghIk+0E8kR47FqKLcUiHyU3lNM Ybx6oVIRN/2T7pp6ufrHQR+yeDK25VNLCclcLyZgpuhWERnvtucJK9vlZdJsY9+For0F WxrzpUfPa+SKPesaFOqGiQdTr6X1ngpDD8RpbZ+7nari24KkR6R7CmqEh4gWBgu213Ts tW9g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-106182-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106182-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id jr1-20020a170906a98100b00a46cefa2094si276235ejb.311.2024.03.18.06.52.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 06:52:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-106182-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-106182-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106182-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 58C341F226E8 for ; Mon, 18 Mar 2024 13:52:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E09884AEE8; Mon, 18 Mar 2024 13:52:15 +0000 (UTC) Received: from mail-oi1-f179.google.com (mail-oi1-f179.google.com [209.85.167.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 09A4C482F2; Mon, 18 Mar 2024 13:52:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710769935; cv=none; b=r166SRhPRAO7ZX61KlwKpeyXgqnz/AvPZ0Mu2+1ii7cLy5dwhb9Rnha+d09EcqMl4RxgeMghzRARj+a62vdIpYR8DipXjT1QReJHqXv/0B1XSaOrL+QMPm5qVytCq1N/lOqguqeiwJIgMlHTFS96EF2Httq9NFST0VfQPtti5dI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710769935; c=relaxed/simple; bh=PookXp4bPOX0npWy6gd5rk2aO3Vm9Zf52HsOGP+Nz4k=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=iFWbJtbKxjkoD3PeVECr/6ddTU6ms+v3cYaGFcpQPphv02HUNekgo22rOOv3kwW9j4r+6u+Kj9vmWlDXANNBm6v1sX7hRZ/zlTInm0DaIv/P8bkyl9JEbYn6LVddSQG2uEbiLyNuyijhK/giYgNYTtAZwPJSuBcjOV6mPEbUAnA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.167.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oi1-f179.google.com with SMTP id 5614622812f47-3c380e99582so583082b6e.1; Mon, 18 Mar 2024 06:52:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710769933; x=1711374733; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=w7ebsFZDfZ8wRGX/ymUxLQCpYnUCXb5v3M/6qeGcR2k=; b=hjfS2nO8SHKLtE/PoUkK8lSjYBwP/CENXlm/UFFmQ7Tom+pK1QMakkn4zD1SrWAI3G th6tHu/kjjMre5ZzW8Y7qw+zoGINfA4N/Dv8qSMCVPzaz/qt3r2t7aX/GWVbL783DYvT CrTWsteHGzyGiDZSw7FAte4PxrKo1M5j4dYWm5vRwbtDix7sSyYIwBYM6pxLDfsCwRc2 CgYS2ooHk+gJUyDjhpNGjiGvJQ2nYRTyIYH0z2GUmb5F9t58p7vSik6HEYCRIe8oNfNs yhw2YoKZLFW4cZfcLSKeRzHzV1llRPt2NlCvDM2cuYf3w1a5gVJg6HnIlZkG/wRyLcwT Z1Pg== X-Forwarded-Encrypted: i=1; AJvYcCWMATI41fj60/ceIxox66L1642dnYoWGPmP5sDwV4EJdGCdKIo0fgtTgGhl/pEEGtZpD/3yFbE15qgMwjJ7UZdiBv1HctRRUKfs/91ZnDD9MYmWJbJY38LXc51It1B9WrkJLpzf5A6/ZlOf17Kxte1x49WaM2rzOWQNnOfaIW2FobE= X-Gm-Message-State: AOJu0YzM5NqZ8U8xepE7ccV/Q3Xv8Hkd7w/J3BFNstG0cTQH3ehw80nh P3+A/JcFszTo7a+iGd6/y5xmyabtdaBhW8993uUmzHIynjEQjGliOFYXwtNNHEZ15PUVRCf9KEH jzPLnQ08dm/G5qJkUO+H8rLICAbE= X-Received: by 2002:a05:6820:d02:b0:5a4:5630:93d6 with SMTP id ej2-20020a0568200d0200b005a4563093d6mr9713906oob.1.1710769933182; Mon, 18 Mar 2024 06:52:13 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240318055054.1564696-1-d-gole@ti.com> <20240318055054.1564696-3-d-gole@ti.com> In-Reply-To: <20240318055054.1564696-3-d-gole@ti.com> From: "Rafael J. Wysocki" Date: Mon, 18 Mar 2024 14:52:02 +0100 Message-ID: Subject: Re: [PATCH 2/3] PM: wakeup: Remove unnecessary else from device_init_wakeup To: Dhruva Gole Cc: Ulf Hansson , "Rafael J. Wysocki" , Adrian Hunter , Tony Lindgren , Len Brown , Pavel Machek , Greg Kroah-Hartman , Viresh Kumar , theo.lebrun@bootlin.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Mar 18, 2024 at 6:55=E2=80=AFAM Dhruva Gole wrote: > > Checkpatch warns that else is generally not necessary after a return > condition which exists in the if part of this function. Hence, just to > abide by what checkpatch recommends, follow it's guidelines. > > Signed-off-by: Dhruva Gole > --- > include/linux/pm_wakeup.h | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/include/linux/pm_wakeup.h b/include/linux/pm_wakeup.h > index 428803eed798..76cd1f9f1365 100644 > --- a/include/linux/pm_wakeup.h > +++ b/include/linux/pm_wakeup.h > @@ -234,11 +234,10 @@ static inline int device_init_wakeup(struct device = *dev, bool enable) > if (enable) { > device_set_wakeup_capable(dev, true); > return device_wakeup_enable(dev); > - } else { > - device_wakeup_disable(dev); > - device_set_wakeup_capable(dev, false); > - return 0; > } > + device_wakeup_disable(dev); > + device_set_wakeup_capable(dev, false); > + return 0; > } > > #endif /* _LINUX_PM_WAKEUP_H */ > -- This one is fine with me, but not 6.9-rc material. Thanks!