From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 4DE787C for ; Fri, 19 May 2023 06:15:33 +0000 (UTC) Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 611181A6 for ; Thu, 18 May 2023 23:15:22 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-307d20548adso1871226f8f.0 for ; Thu, 18 May 2023 23:15:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20221208.gappssmtp.com; s=20221208; t=1684476921; x=1687068921; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=yCYh8uS1PtNXF3LwY9umV8pnonHc4qG+wyV47LgNPyE=; b=luy86l3Q6tr9NE36/PaWY/NMcy3vQDicAQDuobaG/T7kxch7KuZ8BVQ+wVi/vL9S6f kY3dQObPjIhNNCCUF+fzApWI0G6ehTqeAzN3LngL2hwTlbsP8Xj4RkODjGjD4FE84HBk CmhrMa40U75tpP4FC10rrbW8OBQK0xBmQgDhR7bDcO+mBlysOh5+1kZx0YHH3J1vqnvo zyQZaRe12+IkmBfektwQgUAerZJs84gM12s/JYFwVYiK8pjU/AByk0NcrVXzBivUThJD PDjMLFdLsf99KtU/w/gFGj+2a78jv7oCqpsn+31Z4z9OB228QG76QUCn6KD+bhBVKF0Y nbtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684476921; x=1687068921; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=yCYh8uS1PtNXF3LwY9umV8pnonHc4qG+wyV47LgNPyE=; b=UmjycmpV6M6jADR7UkCEcfigtL5017oe7VqXkkd06Woe2hSDJ+0mUgEIxLIW3C3SV5 4GEW7xDJVBGdRAhDBRkgOJd48UU2Gu2VZxf0Q4NkpoGBOtopX+DXX3dpNOUc8BLWicCu eJkLvgvowjhxPZT6+/0LTZ9a5JkXXTGtwotWY0zGLa9WDfxQTkhc8icNeld9USMW5Ifl UfZhQM0X1XD6bjY9ROUhJ1cLjLfCOxv+/WgyEfueo/n3jaaIQqdO7ApxxMpOWGfaEN40 PpnFAkwaNQRutKuvTQFR9p+R+WXrfMdJ/JPe37/taCzlgwYsyIW+apsQK8QrKw8n+vCQ 3zsQ== X-Gm-Message-State: AC+VfDwF26rjDFgHOGk4auwuubd9bH7byadSNig880QzB4UV05rkbLFa 2xKTCnKpryw4DhPOEKh6Y/e8HawJYqjzH8uKeUQ= X-Google-Smtp-Source: ACHHUZ4ZwhFo+c6dqH/926xcq+W9gpeBGHfa3x8yDrWM5NcnK/XK6011FVVufCnnN9UCun2EEVMjNw== X-Received: by 2002:adf:e4c5:0:b0:305:e8db:37df with SMTP id v5-20020adfe4c5000000b00305e8db37dfmr762233wrm.22.1684476920736; Thu, 18 May 2023 23:15:20 -0700 (PDT) Received: from localhost (host-213-179-129-39.customer.m-online.net. [213.179.129.39]) by smtp.gmail.com with ESMTPSA id d18-20020adff852000000b002ca864b807csm4334055wrq.0.2023.05.18.23.15.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 23:15:19 -0700 (PDT) Date: Fri, 19 May 2023 08:15:18 +0200 From: Jiri Pirko To: "Kubalewski, Arkadiusz" Cc: Vadim Fedorenko , Jakub Kicinski , Jonathan Lemon , Paolo Abeni , "Olech, Milena" , "Michalik, Michal" , "linux-arm-kernel@lists.infradead.org" , poros , mschmidt , "netdev@vger.kernel.org" , "linux-clk@vger.kernel.org" Subject: Re: [RFC PATCH v7 5/8] ice: implement dpll interface to control cgu Message-ID: References: <20230428002009.2948020-1-vadfed@meta.com> <20230428002009.2948020-6-vadfed@meta.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, T_SPF_TEMPERROR autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Thu, May 18, 2023 at 06:06:03PM CEST, arkadiusz.kubalewski@intel.com wrote: >>From: Jiri Pirko >>Sent: Tuesday, May 16, 2023 8:26 AM >> >>Tue, May 16, 2023 at 12:07:57AM CEST, arkadiusz.kubalewski@intel.com wrote: >>>>From: Jiri Pirko >>>>Sent: Wednesday, May 3, 2023 2:19 PM >>>> >>>>Fri, Apr 28, 2023 at 02:20:06AM CEST, vadfed@meta.com wrote: >>>>>From: Arkadiusz Kubalewski [...] >>>>>+ pins[i].pin = NULL; >>>>>+ return -ENOMEM; >>>>>+ } >>>>>+ if (cgu) { >>>>>+ ret = dpll_pin_register(pf->dplls.eec.dpll, >>>>>+ pins[i].pin, >>>>>+ ops, pf, NULL); >>>>>+ if (ret) >>>>>+ return ret; >>>>>+ ret = dpll_pin_register(pf->dplls.pps.dpll, >>>>>+ pins[i].pin, >>>>>+ ops, pf, NULL); >>>>>+ if (ret) >>>>>+ return ret; >>>> >>>>You have to call dpll_pin_unregister(pf->dplls.eec.dpll, pins[i].pin, ..) >>>>here. >>>> >>> >>>No, in case of error, the caller releases everything >>ice_dpll_release_all(..). >> >> >>How does ice_dpll_release_all() where you failed? If you need to >>unregister one or both or none? I know that in ice you have odd ways to >>handle error paths in general, but this one clearly seems to be broken. >> > >It doesn't have to, as release all would release all anyway. >Leaving it for now. So you call dpll_pin_unregister() even for the pin that was not registered before? How is that even remotely correct? Fix your error paths, please. I don't understand the resistance here :) [...]