Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp26243lqt; Sun, 17 Mar 2024 23:07:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUAhZw+UPUgBv9C0/yVLGJ2Pf2w0O2+h9YVa8n3XssKyuG/C9We8OAmulEmGGJo4iw2u4D0Os3MrdzpK//cvWzm2mVdUaST76EvN5KS0w== X-Google-Smtp-Source: AGHT+IGKnxcYQpbxLx+gnlRqMk1KSPThxqMNyqe0IWW9g82ozEwINloSrAtssx9MNig2fYUKkT/B X-Received: by 2002:a05:6122:3659:b0:4d3:37d1:5a70 with SMTP id dv25-20020a056122365900b004d337d15a70mr6221558vkb.7.1710742035196; Sun, 17 Mar 2024 23:07:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710742035; cv=pass; d=google.com; s=arc-20160816; b=mm5mwcwMjxUYd0+H8FXWqbJiJswYNKAsMTPdB+pRoCtSgFKig4cWn1RtqbVtam6oJs I5BrkNZ3Bl3DQTgz36WJTSW4V3GKC6PxI05fq9xRS5NbqubRnFf0s4G8q1b+VZr3uipA Z3YdK5Pw4ugSUUGt/tJoBiQhhxdWEg3WkS9h5LaOx/5e7boHAh49gV7MGWJaV3kIDNJ1 vyfReQXoPDxPywt+vTk+Gri2drBneYEyuvxzwSLNdCRyBsYKbe0XZKPcXB4uNCMgO6x8 pEH6c7RTIr13YwaWRh4sltGKJBVWZ6+Eljt5aaVsDORUBfXJxGehOrKqzFYJ8sjSZNwi CFqA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=dBZehhRkwqiGdVM7akbnBQ3ei6Ss2qkowGyOhsxBVUY=; fh=CN1lw5Tpnz/2ukaLG3t0Y+t771kwhtVB6zI6Fpz3ohA=; b=inV4SHu471Y8r1pAj20mL/EFpqY/me7kegCat5EB41efivOo2QRe5jP7q02B503E+i Gc+INFESy7E3tH1ii1HhQV1wYOriTSGSkQ38yi9O89ZTyz/+aYyZ4er5daSYWdVpXEpf XRLMW9/m/EwlNS4m9A4FFV1rXBKJNetmUfJDqEYxwKQLG1Y73aUjUj+iaxo+QmNaXq8L eo0JwJHaS7WZCv/l646YcnpGmzeDOg36Q9XfQUUyYCSs6Z9ZthCMxNezCbtC3rOGIjG4 D55+eZCkqA15FXbBYy9J8Pdv05DBcl/HI4XRHxhEsZMn6Au8h7GanBVoih4CsFaCq6DO e6MQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ZC4ig9+P; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-105730-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-105730-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id gs4-20020a056214226400b006915edf8591si7530359qvb.308.2024.03.17.23.07.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Mar 2024 23:07:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-105730-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ZC4ig9+P; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-105730-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-105730-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id E372D1C20D56 for ; Mon, 18 Mar 2024 06:07:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A6634224EF; Mon, 18 Mar 2024 06:06:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="ZC4ig9+P" Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1B0CD2206B; Mon, 18 Mar 2024 06:06:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.248 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710742010; cv=none; b=RDCHiXgiaPUZdXleXz8PSNz/1NwDcKctz358rAB91BgfPdGSN7X3nUS7sNXZz1KXiNsk6YjLQb5QlTxcQr5lJUyYKq4fRK6uokDWJCSMGXmQZM4QUdbuxnzId+TOvyqRP3Yek5PqTBaflAFjw5d2Ld/BblXsiNxMo02X7iOh8ro= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710742010; c=relaxed/simple; bh=3m20nb+0fwc41U7YJQ9XAzJmFBzXIOodTQ3VpSG1EFc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=jnqlmDGITTCjyA01NcfGOUD740529/R0Y23wWRz97Lz2TZJ6qI9tx4thWDC4J4ts/RGw8Z5Y6C188+wufhSaEQjwKnaeVHlKXTsDl4YodwkW8HkzXBbbhhkhhf6yW7rMqOrc5NE8gqd+xskOlVuIUoccJukK64zPY1Vq6gEerT4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=ZC4ig9+P; arc=none smtp.client-ip=198.47.23.248 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 42I5te7v053540; Mon, 18 Mar 2024 00:55:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1710741340; bh=dBZehhRkwqiGdVM7akbnBQ3ei6Ss2qkowGyOhsxBVUY=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ZC4ig9+PieoM6nGPOI5B8WHPapayBcSHh6QUEua2Pb8luGMyec0EQsWN1ns0Om5LM sZn5gD3Ryj5TWg5HJ0wAIsyd55/QdnWN7DbE4AjAv5xHLP1nOqGI9m6CX48cfWoA5o OR8CUXCWN7/0iCNzsF1TbQeFe6gDNsqZOC0RZxAA= Received: from DLEE104.ent.ti.com (dlee104.ent.ti.com [157.170.170.34]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 42I5ter6027858 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 18 Mar 2024 00:55:40 -0500 Received: from DLEE109.ent.ti.com (157.170.170.41) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Mon, 18 Mar 2024 00:55:39 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Mon, 18 Mar 2024 00:55:39 -0500 Received: from dhruva.dhcp.ti.com (dhruva.dhcp.ti.com [172.24.227.68]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 42I5tKiG082113; Mon, 18 Mar 2024 00:55:36 -0500 From: Dhruva Gole To: Ulf Hansson , "Rafael J. Wysocki" , Adrian Hunter CC: Tony Lindgren , Len Brown , Pavel Machek , Greg Kroah-Hartman , Viresh Kumar , , Dhruva Gole , , , Subject: [PATCH 2/3] PM: wakeup: Remove unnecessary else from device_init_wakeup Date: Mon, 18 Mar 2024 11:20:53 +0530 Message-ID: <20240318055054.1564696-3-d-gole@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240318055054.1564696-1-d-gole@ti.com> References: <20240318055054.1564696-1-d-gole@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 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 */ -- 2.34.1