From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.8bytes.org (mail.8bytes.org [85.214.250.239]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 823E81C29; Fri, 3 Feb 2023 10:12:19 +0000 (UTC) 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> Precedence: bulk X-Mailing-List: iommu@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230201124257.7801-1-ecurtin@redhat.com> 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