Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp807803lqg; Sat, 2 Mar 2024 02:41:07 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCViLXDR9sG5L20ld9bsohz2/eubKToMDaJHZfxOTeqloWIWtK7tZSn1Mfcqf8UY7ktwM5Cbc/rJvRjkRivpsLo4Q+ZER+6ez/oSWd/7kw== X-Google-Smtp-Source: AGHT+IGa/XZVgHeuCTX1IoIaxLMTRbqrgxCSwZUU0Oxwwq5xZFJxgdmyCwQ2A3SFFTAO9uP0wQ/8 X-Received: by 2002:a05:620a:618e:b0:788:1dba:c5dc with SMTP id or14-20020a05620a618e00b007881dbac5dcmr514362qkn.77.1709376067469; Sat, 02 Mar 2024 02:41:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709376067; cv=pass; d=google.com; s=arc-20160816; b=DzdLVj0o0mVeyJZyII+g9oqfHE//ZPiFegfzjbWNA0tYx5YW3dEleIa0NnzyKoM8sj G2K9kCNSNYbrhUwn0y2QSF9+7E0HYEfvWF3nTaE51geUIfzF0zZz1O3S2bCbHRRxR3PK Boc0M1N28FuYZWgLSSBL4+PYZEs4v7VMkmY4Cdp7zt6+BaH4kfSL2Kj+EkEsNAsq27QX hXNjaSJPVQLxlQ5Qh0nrC4jyYSoNIlU5WpWVfEHSktf7yhqHuk8uM3K2oBY9yIJ99eOW PAcoGHzzO/tSlz/1FalPB0d/U5r95yMmzt2bqFNv0+CZsNbHbQlwMAo3cZ/1ZCCddtRh kp3w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=PS+aZN0OArGuTZNiNql4boHngXJIuhg+RfTPVFlNJfM=; fh=jh04TVOIkosvEAWG2fIKv0BKDgNdP6KzAj8bqWAUYe4=; b=oRtw7VTVQiufrHaxfcl3ytPWHpkUHf/T7w0WYo2t+T2KOCUtsBkTMw6VK4+r6Qbv0C HtxFoQGTeN1kN4UzQXqfhXSvjCbPqvaYKrDixPXh+VvPy9PB0mdyiYFyVl9Jpx6jwMIH goAQCbRKntJOfBdQVZ/M6zqODG/iJOMb2T+wR/12C2xtGbu4xaofDbfxH8Lcnmqr2lER jpzfV0bzhgFFvcqPWq9rDY+yyjHF9TuWX2yL+I/wo5itfeXAJcTQEPZjqqbHXF0ge2QO e1JVEoiwjoQCaFPCT1OZYWi8ZQzzLo/xIEE5hBtgSvAlIYvz/432Lz2DitWakkVTSq3v lrsw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=w4QQ4ma1; arc=pass (i=1 spf=pass spfdomain=web.de dkim=pass dkdomain=web.de dmarc=pass fromdomain=web.de); spf=pass (google.com: domain of linux-kernel+bounces-89419-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89419-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id gy4-20020a056214242400b0068f533cd2e3si5468849qvb.242.2024.03.02.02.41.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Mar 2024 02:41:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-89419-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=w4QQ4ma1; arc=pass (i=1 spf=pass spfdomain=web.de dkim=pass dkdomain=web.de dmarc=pass fromdomain=web.de); spf=pass (google.com: domain of linux-kernel+bounces-89419-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89419-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de 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 2EE241C21853 for ; Sat, 2 Mar 2024 10:41:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7EDCC171BF; Sat, 2 Mar 2024 10:40:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=web.de header.i=markus.elfring@web.de header.b="w4QQ4ma1" Received: from mout.web.de (mout.web.de [212.227.15.3]) (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 1BA5F79F0; Sat, 2 Mar 2024 10:40:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.3 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709376052; cv=none; b=LX/W4fEKNzs7pMJLKBpQaI5QzlzrWuu0NwMfHdtw/N7qVWJknVefHNRVtTKZcuVZJ6SjrM2gFnecGnBtYkyP9g+UCT3H6phqkeU6RDV+sc/LaJ7QtIVMPDLPsjA7g/GTBAnbJYKo4+ay4RdJuhnOcF1cRZ94ucv0JAAc5UFEENQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709376052; c=relaxed/simple; bh=5KEwfwfpBtHKd/mMoh+MO4I0djnrDy1f2e5WKqE/N+Y=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=XXxFDl0+gNpS+uMw6iyKkfizHwKzXMdPRhF26+kaCJ4bdPe/izlCWEnrtap8Pxpckn0Djb8D6gXPOlEimhLAAyCgi40RJ5vX/T5toyN6aRUITyaOHDml5k181MmZR+AhdLW5XwmPMhIO+gXb/ogPbD4I6pqME9DGlGQEE6pmr0w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=web.de; spf=pass smtp.mailfrom=web.de; dkim=pass (2048-bit key) header.d=web.de header.i=markus.elfring@web.de header.b=w4QQ4ma1; arc=none smtp.client-ip=212.227.15.3 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=web.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1709376027; x=1709980827; i=markus.elfring@web.de; bh=5KEwfwfpBtHKd/mMoh+MO4I0djnrDy1f2e5WKqE/N+Y=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From: In-Reply-To; b=w4QQ4ma1DcUJNf1607MwmUiWq1VEwhfUtnHjOxpuJ57dgm104lqxEk3tuLs+ASHV 9yU5+PCLDPII4m3KlfLFhUy/NmlbbNat23dHJDPRsFBXm1KiXD64gugniF1qTqnXW p9bl0BVIVm1/xW7RvepilXKQ8GpEItCCbkUVhyvhEfUCbEKkjcHxrbNX7ugq6xtkK wEc+udSFuzhCUDa17vl1PU9EwT647Z9Aj2nMzL7sxo7vINMC7ExYm6lllP4UW3jUO i2GXQmCxBcNhcna/RIeF1GEl9G4H9wK5LJFrPVOqzKIKei0VrtS2PKD9ZVig8aCef oeJzFtzmJxhdT6OwGA== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from [192.168.178.21] ([94.31.86.95]) by smtp.web.de (mrweb006 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MgibY-1rF2Ji44NQ-00h3sN; Sat, 02 Mar 2024 11:40:27 +0100 Message-ID: Date: Sat, 2 Mar 2024 11:40:26 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: staging: media: tegra-video: Use common error handling code in tegra_vi_graph_parse_one() Content-Language: en-GB To: Dan Carpenter , Luca Ceresoli , linux-staging@lists.linux.dev, linux-tegra@vger.kernel.org, linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org Cc: Greg Kroah-Hartman , Jonathan Hunter , Mauro Carvalho Chehab , Sowjanya Komatineni , Thierry Reding , LKML References: <20240301183936.505fcc72@booty> <9f1b617f-06cb-4b22-a050-325424720c57@moroto.mountain> From: Markus Elfring In-Reply-To: <9f1b617f-06cb-4b22-a050-325424720c57@moroto.mountain> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:8EIFhDOXNVZRFR7rb6IKMJFkCMFDb06oUAxZG70fjR9PxT9vVDb ygwmriYITR6G3+mDegwySoLWOaFOrKIdvdfLLtx7Npk3lEV/2yhpzaPrHsOg54hr9fLjXQk AzjYhdKxoeGucPy0nUXqkKVuDA3LPFMYyENkuKlBs2M1tOv2hAqXwKOkUXsa7C1+5NUialp +CSqHePTqHSMCthsLr/LA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:KfSN83dN8vM=;ZZe12Cqx8Lnelg3dRbEv//XtPa+ Ov5CSeXzzv6A+QTt5mCYp1fCKAAagNqF5ynAnwrPI4m1jOoE2ypRSpp4/NG2d2XDKQQBiuBv2 eEc09zFfUiqqUAVJQkQD7Ft+7us/UUJXYYGbArKJFJ3z7nry/qPmgmLmLWbhAYHQbYwAoLE9L EKxS5/RONLgDwqzQNt1MFXDptC+PGHk8VMVGkSShxKAmKfuWupdMgKXR/Nk2EoJJ9Gwotc5EL aPP+Pe/YU0Sn79UFH2OjecwDHmILfSwP+DUQj+StufPEwPOwI7CcV5HZ1J941hs8uW6MoLDYR rZtwx/vPeWJLoQlLTv46aHJNZziFOCtx1EBP3zUNX59nHJ0MYh40KZFiiPqlHShjGoSM+JU7W qyltlenXBPC17tldyORFY+2FdWH0M4uobbLeL1JlrScsD8A3b+ph63jnju8CMdu9qedNzQkbk QmiKxOb7FJqTGwycqUC3EMnoMUBbiZXFlXLkfqDiUlKzSK2V9JFmsf+BFzXah6ADjVPdfJ7Ui MFy/Y80NR/NZMnop2mleoGV06F67SDirHovQC+LUMNSnt19WomGwHZJjm2mb24gcNp8edIXEA imvcusWfDabNucAvhU6MCv5cEo1SLoHzR0S9pGPt8rpsB6Bf4iEsAj5CBsGL/LQ8N0pZ4Hfj2 u/3kEbrMY6tZMQrL7ggvg8W0OO7QegEIt2fWcP77IcwIBXplzVBPrjxO8CFYzYygw0jWnWcKR 7qCkT181QQ2ZCz/4Mz/bdK44hJYyJVcJsW+L3MrHJ4+pKpfAZWo6tNyq3KSHQ4pd+N6Nk5HR/ piduLI8jjzlFyEsJW6Tdnzf608wMZhps3Qnp2fMTqo9QM= >>> Add a jump target so that a bit of exception handling can be better re= used >>> at the end of this function implementation. =E2=80=A6 >> Reviewed-by: Luca Ceresoli > > These patches make the code worse. If we're in the middle of a loop, > then we should clean up the partial loop before doing the goto. > Otherwise it creates a mess when we add a new allocation function after > the end of the loop. How does such a feedback fit to another known information source? Section =E2=80=9C7) Centralized exiting of functions=E2=80=9D https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Do= cumentation/process/coding-style.rst?h=3Dv6.8-rc6#n526 > Someone is going to add a _scoped() loop which uses cleanup.h magic to > call _put automatically. This is a good option. I became also curious how scope-based resource management will influence Linux coding styles further. Will various collateral evolution become more interesting? Regards, Markus