From nobody Fri Jun 19 09:49:49 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50CE3C433EF for ; Wed, 6 Apr 2022 02:11:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1847063AbiDFCMo (ORCPT ); Tue, 5 Apr 2022 22:12:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378484AbiDENNT (ORCPT ); Tue, 5 Apr 2022 09:13:19 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A500B45056 for ; Tue, 5 Apr 2022 05:13:37 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6EB9ED6E; Tue, 5 Apr 2022 05:13:37 -0700 (PDT) Received: from e121345-lin.cambridge.arm.com (e121345-lin.cambridge.arm.com [10.1.196.40]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 9F7643F5A1; Tue, 5 Apr 2022 05:13:36 -0700 (PDT) From: Robin Murphy To: perex@perex.cz, tiwai@suse.com Cc: iommu@lists.linux-foundation.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH] ALSA: emu10k1: Stop using iommu_present() Date: Tue, 5 Apr 2022 13:13:33 +0100 Message-Id: <5ac9b54285b2189b848da2595408eb3cae8e5e9d.1649160813.git.robin.murphy@arm.com> X-Mailer: git-send-email 2.28.0.dirty MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" iommu_get_domain_for_dev() is already perfectly happy to return NULL if the given device has no IOMMU. Drop the unnecessary check. Signed-off-by: Robin Murphy --- sound/pci/emu10k1/emu10k1_main.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_m= ain.c index 86cc1ca025e4..5ffab343b89c 100644 --- a/sound/pci/emu10k1/emu10k1_main.c +++ b/sound/pci/emu10k1/emu10k1_main.c @@ -1751,9 +1751,6 @@ static void snd_emu10k1_detect_iommu(struct snd_emu10= k1 *emu) =20 emu->iommu_workaround =3D false; =20 - if (!iommu_present(emu->card->dev->bus)) - return; - domain =3D iommu_get_domain_for_dev(emu->card->dev); if (domain && domain->type =3D=3D IOMMU_DOMAIN_IDENTITY) return; --=20 2.28.0.dirty