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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E9CDDC636CC for ; Fri, 3 Feb 2023 10:13:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=yaViXYzSwpap/05Ia/6twpY1WPODNG8tnu/fM5rnyY0=; b=wA6UOn2I0mALuX ZLrfKGHuWf69+07MGfATM7kdai9sIl3TdDfSrT+RHm1AS4kD1fJiCPdCntZhumuXphk+uWL3vwct8 ybyF47/lziINOhNfFn254FyPsulLbsOYo9/hGPBNdnuyIfqv/CCyLHDJC2i4Mxc5q6Gpzbczvr10o /Z8dEYmey2FLgmo9GoE6jOlrAVrj5k8gy3tycPvGzlMhuJw81fvel50obM8Ngdr1lWH26ixSgiyyP uReNqzM0X7UaiSN3jH0Vnf6xtqocRQE/59qw8TL1VQ8wfAWuQ3S/sXec7xNJ6cvqtd/Y4Xc3XCYxV Nwcs96CqUgmPQNEckJvg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNt3O-001KLC-U4; Fri, 03 Feb 2023 10:12:23 +0000 Received: from mail.8bytes.org ([85.214.250.239]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNt3L-001KJE-I2 for linux-arm-kernel@lists.infradead.org; Fri, 03 Feb 2023 10:12:21 +0000 Received: from 8bytes.org (p200300c27714bc0086ad4f9d2505dd0d.dip0.t-ipconnect.de [IPv6:2003:c2:7714:bc00:86ad:4f9d:2505:dd0d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.8bytes.org (Postfix) with ESMTPSA id 498EF224229; Fri, 3 Feb 2023 11:12:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=8bytes.org; s=default; t=1675419138; bh=QMmuw2TYTstg0Ew3C4zJSplYxXGVT80mryy7euMSp0o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=w4cq1lkZgRFifOOeXfW8K5obZ76VwO0UsPEkRsh1Cl5XxmYyP0atYxPZKKMO1QU7Y txrggauPJ8Hnvkm5+pLw1269eR0K5aABs2mZ0vZqzqmkbnQjOt+qRMPlsTknOL04qC VNSrPCAR3Vhida581su04IqvVWGy8LyTZmFLE9IDD4R+AvfZncKcqu9huZ9ARWG2Ek apl5/U9yajDutZCkvWh8/mQVCZe5Z52VxffW+7hafx4grAyjgq64/Prr0ssskBCGr/ 8nzMyn7/acL21W/5t+r729BvDTYDrBwuAkmtC5zpjuSJwojeCdXfvLxmVImda6Mteg 0WDV6S9PwSPYQ== Date: Fri, 3 Feb 2023 11:12:17 +0100 From: Joerg Roedel To: Eric Curtin Cc: asahi@lists.linux.dev, Dan Carpenter , Hector Martin , Sven Peter , Alyssa Rosenzweig , Will Deacon , Robin Murphy , "moderated list:ARM/APPLE MACHINE SUPPORT" , "open list:IOMMU SUBSYSTEM" , open list Subject: Re: [PATCH v2] iommu: dart: DART_T8110_ERROR range should be 0 to 5 Message-ID: References: <20230201124257.7801-1-ecurtin@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230201124257.7801-1-ecurtin@redhat.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230203_021219_867661_5EBA47F5 X-CRM114-Status: UNSURE ( 9.65 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Feb 01, 2023 at 12:42:58PM +0000, Eric Curtin wrote: > This was detected by smatch as one "else if" statement could never be > reached. Confirmed bit order by comparing with python implementation [1]. > > drivers/iommu/apple-dart.c:991 apple_dart_t8110_irq() > warn: duplicate check 'error_code == ((((1))) << (3))' > (previous on line 989) > > Link: https://github.com/AsahiLinux/m1n1/commit/96b2d584feec1e3f7bfa [1] > > Fixes: d8bcc870d99d ("iommu: dart: Add t8110 DART support") > Reported-by: Dan Carpenter > Signed-off-by: Eric Curtin