Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2599523rbb; Wed, 28 Feb 2024 07:00:01 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVHdwHIWgJU8J9u6gfPH2NtC05cp2Tly2zpVMSHCn+EB0mJlfxx2fAfO92UduzW9TUxds8gTNG3hiIubpQ+S6hpVs9Kue+jY6iFDAql1w== X-Google-Smtp-Source: AGHT+IHtkVq/edxwPJaRUzfBxoMiin3M/6ph0vHJroMcf7gyB4Fbu33a/dxOQEaCpqHhVwJ6iWMT X-Received: by 2002:a05:622a:19a0:b0:42e:5c0b:a9ca with SMTP id u32-20020a05622a19a000b0042e5c0ba9camr17521959qtc.49.1709132401764; Wed, 28 Feb 2024 07:00:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709132401; cv=pass; d=google.com; s=arc-20160816; b=j7Y1nk9xwchPVRvVexXg58MWjmaanFN8pO8F86A3htIFmlxeF1JdhbVNIweh2oAv00 xlVwC8T8RzYuSpzH8eMEwoha+fpjAFYW6TYX6rb+A8JglcAAiDmk6GAlxZXsO8XJQY/1 YYYlEb34TyPptvEFlGST1Ce0rDjes9cjpGlIkDYVeJU1mwvrc9xDyxMvgzPGONyQLOZE z4dKaLKZKhwvrwpPHQMfGxsXxGANY8U1yLSIicza1Ca23I0TdDdppwumOTIZPjeM+gh1 am+RgkmyJezJAR9vIC6LCg9jFRxUcNDAio0mRBmh+t5mBBPEMzz52vxykAtRFJeOWXFT gyfg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=rbrx7HVa2y5fUE9QU+x+EKnMvXEJQXBHESgYcH8oieA=; fh=mSrM3x9ax0Z+1GjLcBVEF7lIQ7Xn2UzxqBLUmWSP0jg=; b=w+j1Ak46BaPgYvIwLO1sWPiDaShxFrRco/PtICsg7y7A1cRFmxZXMDoErFy5HsHW5L acXG3gj65yZN8BuM5ticCxUuunlwGjb5F51cJ6sbubMUtvcyR0LdnlLVLI19owcROg6I 9wUeDH6YraurOYe1nIWthgWHElffY+PeC6by3BSeRfOnbvNCNlXX9xybw1CetCeOHqs0 s4bRxLXRXW5x3rP2JL/Xr8JouYxnDM7basS5fhtJxssDArXClQECwwEd/cvdSGAw1via 9ER10vQWjnLaRJs8GxMbcJBXFjHb6ZtGsY8bkJ5HDxrKZ6qPJ7cHixjT6OMwyeiX/mzE 2C2g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yHGCC82G; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-85230-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85230-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id j17-20020a05622a039100b0042e6dc1bff1si10211143qtx.233.2024.02.28.07.00.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 07:00:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85230-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yHGCC82G; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-85230-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85230-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 469011C2574F for ; Wed, 28 Feb 2024 15:00:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D070015B98E; Wed, 28 Feb 2024 14:59:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="yHGCC82G" Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (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 5FDE515B966 for ; Wed, 28 Feb 2024 14:59:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709132381; cv=none; b=opLAr5OxDQ6YT7dFPWjdAoq+L8sk+vrqmpXUnELsDiIwn2cyLsKlofC5gRRzEhkgrQ37KrLSUY0wXlMjS9O7XClge2krk5z1uS/0mT1uJRebEaeROm0fCrLO4i1Om0iUAAuaW44/MnyzbYMyHcjRBCny08s+IxvzvKcHIgT24Po= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709132381; c=relaxed/simple; bh=DGibxGXROfONoqQx0DYX48YEs23do8kEJg5PaBmKah8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Fg01V3xCK9fM+62NDzI+gg/7vvC6gDJaMYPUAeTrwo3GOZ4bTO8Re362fspFAjDoUgNNdCjaTgPVwGWl63OAarMZOqgVGdzO6ba4OMtsZxrlEh5oA9NNyJOakoIOiM9jUnPBB1tpiahl4euaiD7iEAGZQwOi+CRR16l/8iWG8dU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=yHGCC82G; arc=none smtp.client-ip=209.85.128.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-412949fd224so5936955e9.1 for ; Wed, 28 Feb 2024 06:59:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709132377; x=1709737177; darn=vger.kernel.org; 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=rbrx7HVa2y5fUE9QU+x+EKnMvXEJQXBHESgYcH8oieA=; b=yHGCC82GKurxUf1GMdZo7v8eQMvPo0SYB9A5P3+tWrRxZCGGp57JCZefy73yrc30Xm 06b6GUF60XNXLtiLpH515CyWM8edfDpEyHZ4QVrga07VV4V8Pp/tIN2RQIlaRKdFGwjH J5isN3+YK5/RMeMochXSUcV5NIQ4OeNndG/MXoitUA86Dllyes1pL4DAJmrHF4ffC2KT iU7kLbUbVCM2sUG39gcpoJxENypeA0Es6K0mh53HsqlYbkg4/9DxzelzjAY0CMBWhlaN zmfy3dVyb7Qb8ltOsn4EPaB8fncQuDqpeDxiZBRiINxudo69oAAb2FAgdOHvCvyOx0ar oTHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709132377; x=1709737177; 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=rbrx7HVa2y5fUE9QU+x+EKnMvXEJQXBHESgYcH8oieA=; b=wkq6DAk0t2fliuF3xHvVMdisn7Q5oT2IQqMIEgA62e1B4DEnzkzq2z4PN3AOTSSvL2 xaIUUtXfkL8B3TIBUoo3XuZ7l6XCVAZjlLHdXiQlT5mgrFCgMKK56GnvAapKMeq19ALg c2B2xTVweeS9fYZlFYD69gRErx9sp/3HqrvTbMZhg5v+g5p70SkNGVDVCBpIBEm/ns2u D+3mMmm0XpYNAKXPlg/rIXg1XUB4ARezG6u77wP0Di00f+8ZzYRXm3GvRUyij+jbUG1F FUWWWM7d1mTDPhT1LtKvyLQX4PZx8+LgK3xqj5BLg6lEtBUQdOiciyatk0kky/vsj47Q s9ig== X-Forwarded-Encrypted: i=1; AJvYcCUMASQ3wAw/jZECcNbukQHA836NLJas5gsvETzwbD/iUviV6lXXrgU7klbk962sJRuzVadL82MxbKC4iid0WR6S4X9mI94HetLUxKdQ X-Gm-Message-State: AOJu0Yz6UJirlJ+NLCt5KP/PKzYL7rldxgxNwWbikhlPwY3CaYR9BrAu vi9b3yhF6tKpIcVcj+8DKSppt4W199+qAg2f6iwygWDW5gNDD2W+0BJxLA82X9s= X-Received: by 2002:a05:600c:4f0c:b0:412:b431:eb31 with SMTP id l12-20020a05600c4f0c00b00412b431eb31mr1837067wmq.18.1709132376444; Wed, 28 Feb 2024 06:59:36 -0800 (PST) Received: from localhost ([102.222.70.76]) by smtp.gmail.com with ESMTPSA id k8-20020a7bc408000000b00412b011458fsm2304389wmi.30.2024.02.28.06.59.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 06:59:36 -0800 (PST) Date: Wed, 28 Feb 2024 17:59:31 +0300 From: Dan Carpenter To: Jiri Pirko Cc: Jakub Kicinski , Markus Elfring , netdev@vger.kernel.org, kernel-janitors@vger.kernel.org, "David S. Miller" , Eric Dumazet , Madalin Bucur , Paolo Abeni , Sean Anderson , LKML Subject: Re: [PATCH] net: fman: Use common error handling code in dtsec_init() Message-ID: <8e3b3338-d2f9-44ac-bcf6-e53ccc3c9cb2@moroto.mountain> References: <9b879c8d-4c28-4748-acf6-18dc69d8ebdf@web.de> <20240227184657.76ec4e82@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@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: On Wed, Feb 28, 2024 at 08:51:49AM +0100, Jiri Pirko wrote: > Wed, Feb 28, 2024 at 03:46:57AM CET, kuba@kernel.org wrote: > >On Tue, 27 Feb 2024 14:14:52 +0100 Markus Elfring wrote: > >> Adjust jump targets so that a bit of exception handling can be better > >> reused at the end of this function implementation. > > > >Okay, but.. > > > >> .../net/ethernet/freescale/fman/fman_dtsec.c | 19 +++++++++++-------- > >> 1 file changed, 11 insertions(+), 8 deletions(-) > > > >..you've added more lines than you've removed so what's the point. > > To have cleaner error path? Not always lines of code is the correct > indicator of patch quality :) > I really don't like those goto e_nomem type of things. When you're laddering gotos you should do that kind of thing before the gotos so that when people add new gotos it doesn't make a mess. It's the same for unlocks, do that before the goto unless it matches a lock at the very start of the function. Or if you're doing a goto from inside a loop then clean up the partial iteration through the loop before the goto. regards, dan carpenter