Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2462799rdb; Mon, 20 Nov 2023 11:24:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IEymOd/HgSMKyXp4GHS3iM3v1Dh0T8eCk3a4DfKwbj4uVjs6UdTz+aLInzqwstEO/VIS6JQ X-Received: by 2002:a05:6a20:748d:b0:187:2e65:9cc9 with SMTP id p13-20020a056a20748d00b001872e659cc9mr6730358pzd.56.1700508298773; Mon, 20 Nov 2023 11:24:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700508298; cv=none; d=google.com; s=arc-20160816; b=uahzd0QmiU14X3Hyay++SSXnqW6Pm7SQw5Ufw5ugLpKWw9glWdAL+F2dCWRAIdBEee hudDpw4wyD038jf83yyz8gN1DsM/2XyPevuGaNs6bXBo1vIxRderULM3AJAAu7uIITrb 1CzK4y9JAfJAy0HdapyR7PlxIJL0ynjBvbvgD+xUP3m16P5z4pj6p17KOla1CJnuc0I2 ZiMNO2/mvhKMclSRZxrhm9jclgG3nXeT0P4J1cfp+bOoUTWaH3djOuoCJR45t9L9gFiH gapSGNSnv69NJIpN5/qgp8loSkNa/fr6uyGUJ+52M0I4csrWsrGy2sqw91sb41q8/Qqj i0oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject; bh=hsvINitvjUsRajMl2QYqVHH7jb+riv8Nhi9+FEcfD2M=; fh=XVxuzW261ObcFKt6+FXoPD8Q+uGTo0jlfTIqmioiBQk=; b=dYqP6y7GtRT8WA29ZGLYLVqHBhtWRIZ8q9YTBqlJYpy9SH/XGzFEDb+fzX5lHZGekq Ou2Sx1vqV1LELVVBMJJmGucaVLT2KO8+EiZ28ascN/mxS2t96WsKACR3TbbrgJVraOvU oZKFKXeVVyw7mKvmZWf8T9WXKMG1kyqX5gAtrwbVysxmjzOPOpYP+fWs9ZXClxMPZyv3 CPgkKJSL09gYB/zkAnZUcW36eu80Ah4On4vITn4xxbIEi5iHIEmJJ8I80fo7PDateMff LBhPSDWs0xGkWObEYulgIYUqA+ng7B7DKDhH06p29PdnESNN5y3HlgTUcuA+lr2lCvQI Kacw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id a37-20020a634d25000000b005c242135071si2683866pgb.393.2023.11.20.11.24.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 11:24:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id AA56380A97E2; Mon, 20 Nov 2023 11:24:32 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229553AbjKTTYL (ORCPT + 99 others); Mon, 20 Nov 2023 14:24:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229492AbjKTTYK (ORCPT ); Mon, 20 Nov 2023 14:24:10 -0500 Received: from mx01.omp.ru (mx01.omp.ru [90.154.21.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32062BB; Mon, 20 Nov 2023 11:24:06 -0800 (PST) Received: from [192.168.1.103] (178.176.77.202) by msexch01.omp.ru (10.188.4.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.1258.12; Mon, 20 Nov 2023 22:23:57 +0300 Subject: Re: [PATCH 02/13] net: ravb: Use pm_runtime_resume_and_get() To: Claudiu , , , , , , , , , , , , , CC: , , , Claudiu Beznea References: <20231120084606.4083194-1-claudiu.beznea.uj@bp.renesas.com> <20231120084606.4083194-3-claudiu.beznea.uj@bp.renesas.com> From: Sergey Shtylyov Organization: Open Mobile Platform Message-ID: Date: Mon, 20 Nov 2023 22:23:57 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20231120084606.4083194-3-claudiu.beznea.uj@bp.renesas.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [178.176.77.202] X-ClientProxiedBy: msexch01.omp.ru (10.188.4.12) To msexch01.omp.ru (10.188.4.12) X-KSE-ServerInfo: msexch01.omp.ru, 9 X-KSE-AntiSpam-Interceptor-Info: scan successful X-KSE-AntiSpam-Version: 6.0.0, Database issued on: 11/20/2023 19:12:43 X-KSE-AntiSpam-Status: KAS_STATUS_NOT_DETECTED X-KSE-AntiSpam-Method: none X-KSE-AntiSpam-Rate: 59 X-KSE-AntiSpam-Info: Lua profiles 181488 [Nov 20 2023] X-KSE-AntiSpam-Info: Version: 6.0.0.2 X-KSE-AntiSpam-Info: Envelope from: s.shtylyov@omp.ru X-KSE-AntiSpam-Info: LuaCore: 543 543 1e3516af5cdd92079dfeb0e292c8747a62cb1ee4 X-KSE-AntiSpam-Info: {rep_avail} X-KSE-AntiSpam-Info: {Tracking_from_domain_doesnt_match_to} X-KSE-AntiSpam-Info: {relay has no DNS name} X-KSE-AntiSpam-Info: {SMTP from is not routable} X-KSE-AntiSpam-Info: {Found in DNSBL: 178.176.77.202 in (user) b.barracudacentral.org} X-KSE-AntiSpam-Info: {Found in DNSBL: 178.176.77.202 in (user) dbl.spamhaus.org} X-KSE-AntiSpam-Info: 127.0.0.199:7.1.2;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;omp.ru:7.1.1 X-KSE-AntiSpam-Info: ApMailHostAddress: 178.176.77.202 X-KSE-AntiSpam-Info: {DNS response errors} X-KSE-AntiSpam-Info: Rate: 59 X-KSE-AntiSpam-Info: Status: not_detected X-KSE-AntiSpam-Info: Method: none X-KSE-AntiSpam-Info: Auth:dmarc=temperror header.from=omp.ru;spf=temperror smtp.mailfrom=omp.ru;dkim=none X-KSE-Antiphishing-Info: Clean X-KSE-Antiphishing-ScanningType: Heuristic X-KSE-Antiphishing-Method: None X-KSE-Antiphishing-Bases: 11/20/2023 19:16:00 X-KSE-Antivirus-Interceptor-Info: scan successful X-KSE-Antivirus-Info: Clean, bases: 11/20/2023 4:24:00 PM X-KSE-Attachment-Filter-Triggered-Rules: Clean X-KSE-Attachment-Filter-Triggered-Filters: Clean X-KSE-BulkMessagesFiltering-Scan-Result: InTheLimit X-Spam-Status: No, score=-4.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email 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 (groat.vger.email [0.0.0.0]); Mon, 20 Nov 2023 11:24:32 -0800 (PST) On 11/20/23 11:45 AM, Claudiu wrote: > From: Claudiu Beznea > > pm_runtime_get_sync() may return with error. In case it returns with error > dev->power.usage_count needs to be decremented. pm_runtime_resume_and_get() > takes care of this. Thus use it. > > Along with this pm_runtime_resume_and_get() and reset_control_deassert() > were moved before alloc_etherdev_mqs() to simplify the error path. I don't see how it simplifies the error path... Re-ordering the statements at the end of the error path seems cheaper than what you do. > Also, in case pm_runtime_resume_and_get() returns error the reset signal > is deasserted and runtime PM is disabled (by jumping to the proper > error handling label). > > Fixes: c156633f1353 ("Renesas Ethernet AVB driver proper") > Signed-off-by: Claudiu Beznea [...] MBR, Sergey