From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09B7FC433E0 for ; Tue, 2 Jun 2020 05:56:50 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 853562072F for ; Tue, 2 Jun 2020 05:56:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 853562072F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 4179385F9C; Tue, 2 Jun 2020 05:56:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Xkh1bD9f00qZ; Tue, 2 Jun 2020 05:56:48 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by fraxinus.osuosl.org (Postfix) with ESMTP id 37FCA85E27; Tue, 2 Jun 2020 05:56:48 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 226EBC088C; Tue, 2 Jun 2020 05:56:48 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 2FFA8C0176 for ; Tue, 2 Jun 2020 05:56:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 1620386937 for ; Tue, 2 Jun 2020 05:56:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uj2PV1zk4hyn for ; Tue, 2 Jun 2020 05:56:45 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from out30-132.freemail.mail.aliyun.com (out30-132.freemail.mail.aliyun.com [115.124.30.132]) by whitealder.osuosl.org (Postfix) with ESMTPS id 1CEB686914 for ; Tue, 2 Jun 2020 05:56:44 +0000 (UTC) X-Alimail-AntiSpam: AC=PASS; BC=-1|-1; BR=01201311R941e4; CH=green; DM=||false|; DS=||; FP=0|-1|-1|-1|0|-1|-1|-1; HT=e01e07425; MF=baolin.wang@linux.alibaba.com; NM=1; PH=DS; RN=5; SR=0; TI=SMTPD_---0U-LpR9d_1591077399; Received: from localhost(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0U-LpR9d_1591077399) by smtp.aliyun-inc.com(127.0.0.1); Tue, 02 Jun 2020 13:56:40 +0800 Date: Tue, 2 Jun 2020 13:56:39 +0800 From: Baolin Wang To: Markus Elfring Subject: Re: iommu: Improve exception handling in iommu_group_alloc() Message-ID: <20200602055639.GB89266@VM20190228-100.tbsite.net> References: <9f8d8308-2056-8e33-7b38-0b7d96e51c3c@web.de> <20200602015044.GA89266@VM20190228-100.tbsite.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: iommu@lists.linux-foundation.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Baolin Wang Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On Tue, Jun 02, 2020 at 07:01:02AM +0200, Markus Elfring wrote: > >> * I suggest to avoid the specification of duplicate function calls. > >> Will it be helpful to add a few jump targets? > >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?id=3d77e6a8804abcc0504c904bd6e5cdf3a5cf8162#n455 > > > > I don't think it is helpful or readable to add some jump targets here, > > since the exception handling is very simple here. > > Do you disagree to the application of the Linux coding style then > for the recommended exception handling? No, that's not what I mean. My point is the exception handling in this patch is simple and no need to add 'goto' statement which does not help to improve readability. And I agree it is helpful for the cases where a function exits from multiple locations and more same cleanup work need to do. _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu