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=-2.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no 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 3ACF7C43215 for ; Mon, 2 Dec 2019 16:59:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1113520881 for ; Mon, 2 Dec 2019 16:59:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="NrY935yL" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727671AbfLBQ7X (ORCPT ); Mon, 2 Dec 2019 11:59:23 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:39914 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727459AbfLBQ7W (ORCPT ); Mon, 2 Dec 2019 11:59:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=3ykgoWuVkN+wjrzc/eQPiBn6mq0Gz+cdTGiRXv4caZY=; b=NrY935yLJ8NkW4ZaE2IcJgBmo 6SR7tdZjZW4MHIKcNieD/doI4l7MARJLsJ+NuwPjj+RHUqRfDU8sH2e5nb19EG9mkmbmFgJrYEsCU MDFmhVAfj2ydBPVqNlADouYO2CUlBi4SyLOsShB0VRLwcX2iGQVSWdZhdVAC+LsHMysOsOpKCtaWU OV7pX/DMEST1e2cxzlb9Scjb4eXiG/FsU/IAl+dkuhW7Wee+/C0PmOv9aYE6Bo39VkhsaTV5JX87X 0WPeYCTBdyxgvd+PtEC2QQlfMNYO32QyPen4M2svV1gsrLpBPNsYrq4Kute69OejDiFP7evDuX4F/ H2PheOe+A==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1ibp2f-0007u9-Lh; Mon, 02 Dec 2019 16:59:21 +0000 Date: Mon, 2 Dec 2019 08:59:21 -0800 From: Christoph Hellwig To: Cong Wang Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [Patch v2 2/3] iommu: optimize iova_magazine_free_pfns() Message-ID: <20191202165921.GB30032@infradead.org> References: <20191129004855.18506-1-xiyou.wangcong@gmail.com> <20191129004855.18506-3-xiyou.wangcong@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191129004855.18506-3-xiyou.wangcong@gmail.com> User-Agent: Mutt/1.12.1 (2019-06-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > + return (mag && mag->size == IOVA_MAG_SIZE); > + return (!mag || mag->size == 0); No need for the braces in both cases. 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=-2.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no 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 2DC16C432C0 for ; Mon, 2 Dec 2019 16:59:24 +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 E87E420848 for ; Mon, 2 Dec 2019 16:59:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="NrY935yL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E87E420848 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org 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 BFECC84B1C; Mon, 2 Dec 2019 16:59:23 +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 kfH-haL2w24u; Mon, 2 Dec 2019 16:59:23 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by fraxinus.osuosl.org (Postfix) with ESMTP id 58E8784AD2; Mon, 2 Dec 2019 16:59:23 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 47405C1797; Mon, 2 Dec 2019 16:59:23 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 88D91C087F for ; Mon, 2 Dec 2019 16:59:22 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 780AF86786 for ; Mon, 2 Dec 2019 16:59:22 +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 euDLSlZ0By8r for ; Mon, 2 Dec 2019 16:59:22 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by whitealder.osuosl.org (Postfix) with ESMTPS id 1A6E1864F4 for ; Mon, 2 Dec 2019 16:59:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=3ykgoWuVkN+wjrzc/eQPiBn6mq0Gz+cdTGiRXv4caZY=; b=NrY935yLJ8NkW4ZaE2IcJgBmo 6SR7tdZjZW4MHIKcNieD/doI4l7MARJLsJ+NuwPjj+RHUqRfDU8sH2e5nb19EG9mkmbmFgJrYEsCU MDFmhVAfj2ydBPVqNlADouYO2CUlBi4SyLOsShB0VRLwcX2iGQVSWdZhdVAC+LsHMysOsOpKCtaWU OV7pX/DMEST1e2cxzlb9Scjb4eXiG/FsU/IAl+dkuhW7Wee+/C0PmOv9aYE6Bo39VkhsaTV5JX87X 0WPeYCTBdyxgvd+PtEC2QQlfMNYO32QyPen4M2svV1gsrLpBPNsYrq4Kute69OejDiFP7evDuX4F/ H2PheOe+A==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1ibp2f-0007u9-Lh; Mon, 02 Dec 2019 16:59:21 +0000 Date: Mon, 2 Dec 2019 08:59:21 -0800 From: Christoph Hellwig To: Cong Wang Subject: Re: [Patch v2 2/3] iommu: optimize iova_magazine_free_pfns() Message-ID: <20191202165921.GB30032@infradead.org> References: <20191129004855.18506-1-xiyou.wangcong@gmail.com> <20191129004855.18506-3-xiyou.wangcong@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20191129004855.18506-3-xiyou.wangcong@gmail.com> User-Agent: Mutt/1.12.1 (2019-06-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Cc: iommu@lists.linux-foundation.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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" > + return (mag && mag->size == IOVA_MAG_SIZE); > + return (!mag || mag->size == 0); No need for the braces in both cases. _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu