Received: by 2002:ab2:2994:0:b0:1ef:ca3e:3cd5 with SMTP id n20csp182210lqb; Thu, 14 Mar 2024 08:30:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXUn2Ga6683qatNQXZBVje+PEIqSWwdSl3MRv//u6+sFRuOn1TGrMCIjzOPt7U26B5hdGMjL+sO9DuWrSjbRFxDHLj17/lAdubxQr5OaA== X-Google-Smtp-Source: AGHT+IG5VpIC2hpAUJ52L6vy/CMpF+hC1xLJdMSRxAdUkzXff8cUXPoUq28AgaobULkwGMMuk913 X-Received: by 2002:a17:902:dac2:b0:1dc:fcd8:c2f8 with SMTP id q2-20020a170902dac200b001dcfcd8c2f8mr2697870plx.65.1710430208928; Thu, 14 Mar 2024 08:30:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710430208; cv=pass; d=google.com; s=arc-20160816; b=XCyQGZXKfpZXcjOB+w8WTGRWAZNZpOojoqqQS5AIOdbPy46WYlyIl8PKYmybRi0y4l ozK9mj5O92LtddlBKYELC3xfC0wuMEK9GzDfpJoFZeHhj/j+4NC0ZBDTPYZq/SzFSFLV yDMe9917d4mLdJiYIWxAYIkrxSluIW8wA6uQwS6j1n7LQDCUMb9ZjPzv0IL5OxyYxs0m lpaCgbtK6XRdYLlhcoADl1WzJCSBMA8eKJkF1sTmKimDhAxbBrniTV6GzcStbbe79exp pP3zMLlqBHFEanYUckXnKtvAv4mvoQYysagwhgfTtlzobDo9lTYm6Y2XjY15rtxuvIYL jF4w== 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=sz4vtJtgjtxGimNuodR5Dts8e41V2G0abFSVNiYfOig=; fh=GNxTZxmUVHCrBN4Ase9SCDTGD6l2w9wr5LF9F82VoJY=; b=Hz9rReqpd6qlVm/GFRYlQCCtW/OCbouFthhRmSVKwgLMRQmFDeps4oLr6yutUtEOUd rMWuxHeBw1Cr6cBbmepnVcvuo5zr1P4qJxs8wHD/G4p/6IgsAKRH4feocwwlmcXR8tE4 5PbOemEnkqDL9spuEUyU0236DkUFu5FnRGVd53uKfMoaQc5D4G+H7pw44UJnB8Vf8lJt XP+wbsUtBrn/c7Z/xbt/vxDZW4mvkGiYLg6XCH/aHRChWGrFVtZro9KTbJYLB07Nqsvv NTg0COJ24Ok+EYQNEoJtUwNZpWRmUadRMtbj0fFeA25lwzyuKZfk3+6xcreUq37yEPM5 C0YA==; 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-103492-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-103492-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id q8-20020a170902dac800b001dccb7f8f26si1702805plx.81.2024.03.14.08.30.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Mar 2024 08:30:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-103492-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-103492-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-103492-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 87284281667 for ; Thu, 14 Mar 2024 15:30:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C480971B5E; Thu, 14 Mar 2024 15:29:50 +0000 (UTC) Received: from mail-oa1-f42.google.com (mail-oa1-f42.google.com [209.85.160.42]) (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 E467571B4F; Thu, 14 Mar 2024 15:29:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710430190; cv=none; b=JU2SFbYCfHyiilh+tNQuv3/SIC72VcFAtMDzkgehtVaup6FYWEv2f4KQxcQO7JaBUlmL5nlAdl80bstB1MAFlhq4IXLmHDSQGF9j/6+kx1utNQzDrkrddi3QbdvUD1g6uAMa1N27CwgVLx8tziDZPkZSuMyIkdzJRsV8txS+0uY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710430190; c=relaxed/simple; bh=sz4vtJtgjtxGimNuodR5Dts8e41V2G0abFSVNiYfOig=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=YuTDITw3ZzUAGMIe78Qs0EUOgWrU7RDlNblxGdy766wXZKVn+k4I7g4q2cA0mk28a8XRr+HHwy8e56rQlzleqGIyOORRcnIkCCmsGymUuShZQOVgjQZgEKrPwa0YfRypRzTk4RO7igXI6Edx3gwhl8NVvfpZwudGJzF07S7Uk4c= 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.160.42 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-oa1-f42.google.com with SMTP id 586e51a60fabf-221d4c52759so92285fac.1; Thu, 14 Mar 2024 08:29:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710430188; x=1711034988; 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=sz4vtJtgjtxGimNuodR5Dts8e41V2G0abFSVNiYfOig=; b=iTh112JXa3u+Utr0j1CTf/n5InCwSNN8pfXbetQmyaqpS0OWZYZYeVknKZWmvFjNrT Zv77EqHFEvPrhTNy0AYfGOuVeOJIxyrBFEqTweeLAYetu8KDk/zBeWd08sf21MKcimPR oQorpqWVL4Bpn+jf42Jti62HngOoa/G7adg48aqjx//9YUbj3yaJl4oIUyv8/f8fhG/X IdkRvG+q3MGf7qugdGvgp6a1RQdp4kWQdD7K+odV7dHc4U0m7YtpTBMLsmE6AkqTmLho I04TTPiLedsVjgaq5r7hSp5OMCjp8EdnxOBvfuzR8FZHra3Vjuv5obqeiHFk1pIRqOsR CvYQ== X-Forwarded-Encrypted: i=1; AJvYcCVCveDBQRAALR1y7VK/YFlk0aWTibIDUOQgZTKjG1Hft7bB/4klXkV8a+YlXEoRC0fviFrzr8n2B8djluT2UqiBQVwumNXqXnqczk7Y0dccaksQj4Q4DfIuZV1BSNvsevNSpiaO2XI= X-Gm-Message-State: AOJu0YzmYisNGvYpzVegzejQRBOCi97dYj/A4GldUx/K4GOg0XYaMaUJ sNOyhKIfeGT7boi/tAdQoLWxzaKmaGoSKofZOB85+tEeF1hJw+pzoHEh4JF93PbdwDdePabAmUP 11rFiGB5Asi+OeOKu8Cq6ho+X+GQ= X-Received: by 2002:a05:6871:5b11:b0:221:a151:7f3d with SMTP id op17-20020a0568715b1100b00221a1517f3dmr2177153oac.2.1710430187943; Thu, 14 Mar 2024 08:29:47 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240314075429.1164810-1-d-gole@ti.com> <20240314151846.u3r3eaklrl3hf7pi@dhruva> In-Reply-To: <20240314151846.u3r3eaklrl3hf7pi@dhruva> From: "Rafael J. Wysocki" Date: Thu, 14 Mar 2024 16:29:36 +0100 Message-ID: Subject: Re: [PATCH] PM: wakeup: Add a missing return case in init_wakeup To: Dhruva Gole Cc: "Rafael J. Wysocki" , Tony Lindgren , theo.lebrun@bootlin.com, Sibi Sankar , Viresh Kumar , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Ulf Hansson Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Mar 14, 2024 at 4:18=E2=80=AFPM Dhruva Gole wrote: > > Hi, > > On Mar 14, 2024 at 15:01:36 +0100, Rafael J. Wysocki wrote: > > On Thu, Mar 14, 2024 at 8:55=E2=80=AFAM Dhruva Gole wro= te: > > > > > > The device_wakeup_disable call can return an error if no dev exists > > > however this was being ignored. Catch this return value and propagate= it > > > onward in device_init_wakeup. > > > > Why does this matter to the callers of device_init_wakeup()? > > If atall !dev->power.can_wakeup then the caller should know something is > funny right? What would the caller do with this information? They attempted to disable wakeup on a device that doesn't exist or is not wake-capable, and so what?