Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp495498imm; Wed, 6 Jun 2018 00:53:04 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIgoDudf9LOLZ33QUKbTnCnV9pWXQEe0WfX/CHxrjHT3ntSDTlTmB582fd0aaIdzda+6V7u X-Received: by 2002:a17:902:b611:: with SMTP id b17-v6mr2144209pls.284.1528271584219; Wed, 06 Jun 2018 00:53:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528271584; cv=none; d=google.com; s=arc-20160816; b=WmE5prYSfZh8BEKnHL6QDvfgxDlM7EaMtBK/oC3zhW3n+Qo01KAM1QUtZl38iSCigW D88Jmmn+C7YwBjJPwUyta/WwnMqD/UHHIpRtQkxIjdS8K6vMpd54zlm+VjKBiH8xUVd4 DlCUGY3EWXmgYQCmA/ZwudAIWxm2AcTb1R0+gyoFON/4RVhKRu/K5bHWAULkfe+KzI9v +XPx6IRtFM2RogmWlO1CCqUMBfURnrEQmuBLD/ercRRMa3rPbMp+qKcDlDKiwCcB0PFw U4Sxh/xaF7XnSClqSO/LMiYtlXnpXIPSy0hABa7o0qrGcIfhkthgcEGow5itnZnXBEHD kuvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=fGb076rRDnWHmmVcX+f598kO9BAnoR7gk5LN3tIEvsc=; b=QCYyz3oPgvI5q/CUBk7pbp43sINXCebYproNbU9OXWgfty1N/xQXGMIQqt287P7k+2 LNgylY83rLqYN2YPLY7WUG40SMcWYmyf4paAKSdbzRw2DN1LoSZU0V09upaMCQqGG11i /t+9Vob0Ik8IxMx/yzoDuxWVowWp3SfDeT1Ijs5h5kot3OSJVr9JBzlTWlrmau+ZnSBo y0rNRFLbuzfd2OzWO+DxAz3T58yOgS7MzT9I2qU4h7E9M1lluB/P/V3SV+teT/cZUX7r bWjux/Y01LhNgPTOkSRTcOFb2yc54uOAR3CCeJZmLkq+k1/USpH/Gjt4UcIVPF2PqSTL NnZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Qb6EI9rr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f29-v6si5975007pgn.21.2018.06.06.00.52.50; Wed, 06 Jun 2018 00:53:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Qb6EI9rr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932480AbeFFHwG (ORCPT + 99 others); Wed, 6 Jun 2018 03:52:06 -0400 Received: from lelnx194.ext.ti.com ([198.47.27.80]:47201 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932309AbeFFHwE (ORCPT ); Wed, 6 Jun 2018 03:52:04 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id w567pmSh003993; Wed, 6 Jun 2018 02:51:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1528271508; bh=fGb076rRDnWHmmVcX+f598kO9BAnoR7gk5LN3tIEvsc=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=Qb6EI9rr5KxwU5NFCQUBS+Op8/YIY1tsTlrstunHB/qB0ZPfRnSwUS3YnAHX2/5tk hIlg4hLQAiMmU3HQ8xEq4Bvvb2TmtCidy+yUVdwZVdNUV+YKqFavPAOlDFKRod2gRu Pkw8nNN5hcqtwKcE5NQRGzaEa/UOu8KQ18L1Ldao= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w567pm9T017647; Wed, 6 Jun 2018 02:51:48 -0500 Received: from DFLE104.ent.ti.com (10.64.6.25) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Wed, 6 Jun 2018 02:51:48 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Wed, 6 Jun 2018 02:51:48 -0500 Received: from [172.24.190.215] (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w567pjoM012825; Wed, 6 Jun 2018 02:51:46 -0500 Subject: Re: [PATCH] can: m_can: Fix runtime resume call To: , , , CC: , References: <20180529132426.31216-1-faiz_abbas@ti.com> From: Faiz Abbas Message-ID: Date: Wed, 6 Jun 2018 13:23:13 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180529132426.31216-1-faiz_abbas@ti.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Tuesday 29 May 2018 06:54 PM, Faiz Abbas wrote: > pm_runtime_get_sync() returns a 1 if the state of the device is already > 'active'. This is not a failure case and should return a success. > > Therefore fix error handling for pm_runtime_get_sync() call such that > it returns success when the value is 1. > > Also cleanup the TODO for using runtime PM for sleep mode as that is > implemented. > > Signed-off-by: Faiz Abbas > --- > drivers/net/can/m_can/m_can.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c > index a9fbf81ac3d4..04c48371ab2a 100644 > --- a/drivers/net/can/m_can/m_can.c > +++ b/drivers/net/can/m_can/m_can.c > @@ -634,10 +634,12 @@ static int m_can_clk_start(struct m_can_priv *priv) > int err; > > err = pm_runtime_get_sync(priv->device); > - if (err) > + if (err < 0) { > pm_runtime_put_noidle(priv->device); > + return err; > + } > > - return err; > + return 0; > } > > static void m_can_clk_stop(struct m_can_priv *priv) > @@ -1687,8 +1689,6 @@ static int m_can_plat_probe(struct platform_device *pdev) > return ret; > } > > -/* TODO: runtime PM with power down or sleep mode */ > - > static __maybe_unused int m_can_suspend(struct device *dev) > { > struct net_device *ndev = dev_get_drvdata(dev); > Gentle ping. Thanks, Faiz