Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp923615rdb; Wed, 1 Nov 2023 06:48:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFjEIU8n5VVn/LCjKE5E1IixBpEkdEJWPWnx4stYehahiXZoT1jMn7G70w5SsoeOURTXUup X-Received: by 2002:a05:6358:e48e:b0:169:81cc:d7ff with SMTP id by14-20020a056358e48e00b0016981ccd7ffmr7452122rwb.0.1698846486403; Wed, 01 Nov 2023 06:48:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698846486; cv=none; d=google.com; s=arc-20160816; b=qN9WkgM3tlmV4u2jcGYnzp6TqMLjxpR3l35wcNo++yPCCfIkRu32tBU705srDbNlIE MeFpuWq7fdZlt8+62Yv5l0dqG+wkwSCIKqcEWt823Z3T3kVDLox0PUYKUHhTZKXF/Nok euNndc5dwopmkrR+7h0p43l00QcYsdP8P5/qpqpm2xSU5lLsgVXfQ/WoFgTg/M2Xp6mD 24t/nPTb6UBcVDCb5Wv08uxLZoVhKLlH3eqqbximheNAW7xJrp7PH40JXZckGhy790F5 yFHMGLAIpBbjAYs/LQtHPxR9NF7HGghgw17Bdq2vrhqt+8F98ebfUBBskHdtEpuh8JXS ow2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=t7HEh7CBLgsiDjVrCPQ3oFHpQgUZ+TW8BfvTbAcJlR8=; fh=5C3CAkIfBsG8EK8jEaBmpiwV3a9azH+DT0pG9NOmIu4=; b=LLVDkWTUsmHCT8XFRrADhTthzz1UHcthpfg4NkNsMvuEVhBfGpQ8Lf8CC5J2VyEPXM dQXMIpemOKgmLd6twIS7L33r8ji2uqu60LHW9CwoQmJHrpeS+1lMxBJhqX0c5IFqUxZe 5LDXAxKE/qI8rraZnJhWf5uhZxlk/KZm2WnDz5hnaOOpxU7kw/AkKgpRWxXCtuNGCoal VUt6fu8VxUgyYRpL2R21i7lwZKT42JhN4BCCIjnc3gzpLOk3YWIBphjjQfUoRakD0MEB 1l2oNjL0hSjKUaNkFHEML/brapwU+6wae80u9OVqFafdQs/0UBuCMv9N+9aVC/0n8Ay0 Ha6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=qHwo8jD4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id n189-20020a6327c6000000b005b8edc44692si3097006pgn.721.2023.11.01.06.48.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 06:48:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=qHwo8jD4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 56F8E80657FE; Wed, 1 Nov 2023 06:48:05 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231501AbjKANr5 (ORCPT + 99 others); Wed, 1 Nov 2023 09:47:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230464AbjKANr4 (ORCPT ); Wed, 1 Nov 2023 09:47:56 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 642B210D for ; Wed, 1 Nov 2023 06:47:50 -0700 (PDT) Received: from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi [213.243.189.158]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id CDFAB8D; Wed, 1 Nov 2023 14:47:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1698846452; bh=FPN8Dc91C03T+nlDMgTX3rWA1Ek2ie9ZO4kTgNKhUfA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qHwo8jD4u/RRMajIOxn9tjjvAfC3zGRbcA/Jx/1Pir6wV6kdK9VRGtac26bQPQzfQ Jfvo99wSnrOMix8WqcBhSA8hplwx7+ByCDh6ofjVmTHi4ApeedRBVP7wXFXu/xZxOY qzFoIdIc8flKPOy7enbxCq7tq7PHc3wlb+PvARv4= Date: Wed, 1 Nov 2023 15:47:55 +0200 From: Laurent Pinchart To: Tomi Valkeinen Cc: Aradhya Bhatia , Devarsh Thakkar , Jyri Sarha , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 01/10] drm/tidss: Use pm_runtime_resume_and_get() Message-ID: <20231101134755.GQ12764@pendragon.ideasonboard.com> References: <20231101-tidss-probe-v1-0-45149e0f9415@ideasonboard.com> <20231101-tidss-probe-v1-1-45149e0f9415@ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20231101-tidss-probe-v1-1-45149e0f9415@ideasonboard.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Wed, 01 Nov 2023 06:48:05 -0700 (PDT) Hi Tomi, Thank you for the patch. On Wed, Nov 01, 2023 at 11:17:38AM +0200, Tomi Valkeinen wrote: > Use pm_runtime_resume_and_get() instead of pm_runtime_get_sync(), which > will handle error situations better. Also fix the return, as there > should be no reason for the current complex return. > > Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart But I think we would be better off dropping the two small wrappers. > --- > drivers/gpu/drm/tidss/tidss_drv.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/tidss/tidss_drv.c b/drivers/gpu/drm/tidss/tidss_drv.c > index 4d063eb9cd0b..f403db11b846 100644 > --- a/drivers/gpu/drm/tidss/tidss_drv.c > +++ b/drivers/gpu/drm/tidss/tidss_drv.c > @@ -32,9 +32,9 @@ int tidss_runtime_get(struct tidss_device *tidss) > > dev_dbg(tidss->dev, "%s\n", __func__); > > - r = pm_runtime_get_sync(tidss->dev); > + r = pm_runtime_resume_and_get(tidss->dev); > WARN_ON(r < 0); > - return r < 0 ? r : 0; > + return r; > } > > void tidss_runtime_put(struct tidss_device *tidss) > -- Regards, Laurent Pinchart