Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5979616pxb; Mon, 14 Feb 2022 12:13:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJwiDGs9F0646rg94dGWk/A8hkCoJ2Wj3X1RZKiKLjkJsFyAr8fFgsp0OwjQrC+vwDwlg++M X-Received: by 2002:a05:6a00:1c6e:: with SMTP id s46mr790562pfw.56.1644869609817; Mon, 14 Feb 2022 12:13:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644869609; cv=none; d=google.com; s=arc-20160816; b=MuVmuq4bA4+M1iOeCXhs1PAjMNtzT3ufXbWC0k8N+UxSlboglNpOLPnc/uvXbbXxGV FM0t87KpHVWWv/2Pw8qhJfPqYk0G/6olAnkyvZGRJ00jHDYrzaiygw2QKIGzGSkiE+bR EbvOck6BQdzAskxZJ6BVHvSbXw7ZDv1DHWZU415Sye4fNzlW6RcSCC+2GN1Jmh/ia8MZ eXmELKwlmEyfNt5n82tqsF0IWFrnrqekfEjhiyoyz9TF7pxmhZCOSnJ9QxHe9y4DGYX8 Dx8eidR9N93nzYKp9IIm5ExrwC0zrlTz35tZ/bW+J/+V2tNMzg/2rrJuUBd3HIVoZuil yzpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=n737DodTtyXB2MufVIKFfCu0v/vVRn61Z/qqj4GZOTg=; b=I1WWwhEEioAzpJWuX+MV2bbPGxtrGPCBW9aCExOLMoo6pOBTq9DnXVJVuiioR68X+D 7DLRvs30e2V2ndENbhGRba+HE5qOjTehul38Ddr+tAq69uJZ+aRMfoE7HPqMojjJUeeG DsyTGu19j/2VSMCGXuKIjcTNbvyRo6rLj3imiQRPZRxKeeNKqcBqbxXZBQDi4/1UywT3 kPZwcVY4aWGc8H0t2ElskMdXbEqitfqtcH7vvyZoJ28f8LmxwoGPWVIA3UvmzZhIFtTY 95OUzEvuPD16r7iLdNL0QgC27MyhjdqnoGSON9/slMamdgUZFp5JnqiIc8d5nkJWSzMd O2QQ== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id m9si11904985pll.287.2022.02.14.12.13.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 12:13:29 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 64D14125534; Mon, 14 Feb 2022 11:50:17 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353430AbiBNMly (ORCPT + 99 others); Mon, 14 Feb 2022 07:41:54 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:35936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353352AbiBNMlm (ORCPT ); Mon, 14 Feb 2022 07:41:42 -0500 X-Greylist: delayed 4462 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 14 Feb 2022 04:41:31 PST Received: from theia.8bytes.org (8bytes.org [81.169.241.247]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2CC74AE3A for ; Mon, 14 Feb 2022 04:41:31 -0800 (PST) Received: by theia.8bytes.org (Postfix, from userid 1000) id 287FF2FB; Mon, 14 Feb 2022 13:41:29 +0100 (CET) Date: Mon, 14 Feb 2022 13:41:27 +0100 From: Joerg Roedel To: Robin Murphy Cc: Jiasheng Jiang , will@kernel.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Nikita Yushchenko , Laurent Pinchart Subject: Re: [PATCH] iommu/ipmmu-vmsa: Check for error num after setting mask Message-ID: References: <20220106024302.2574180-1-jiasheng@iscas.ac.cn> 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, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 14, 2022 at 12:32:21PM +0000, Robin Murphy wrote: > In this particular case it cannot fail on any system the driver actually > runs on - it's a platform device so the dma_mask pointer is always > initialised, then dma_direct_supported() on arm64 will always return true > for any mask wider than 32 bits, while arm_dma_supported() will also always > pass since a 32-bit system cannot have memory above 40 bits either. > > There's no great harm in adding the check for the sake of consistency, I > guess, but it's purely cosmetic and not fixing anything. Okay, thanks Robin and Nikita for looking to quickly into this. I will apply it for 5.18 just to be on the safe side if the above assumptions change. Regards, Joerg