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 0F1F9C4167B for ; Mon, 27 Nov 2023 15:42:10 +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:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=FNgeBBSW66m2ku/33CZRQ3OTkPsirJPjYwACZjpr8bk=; b=bzkiDdx12h91x2 w5thFFcTIF5sh6bkhPIXiu28r8PrL+Ujsat5FyCpn/1hGYIi6HPLXbHXJ+4kGZF/t9bE98sz2jXHb JIZUbPiYHaGoKUMjWebT4ZCJnURolXbEylowTRwF4cH1pdKhyXzXrCi4FU2bGD8cTPR3tHU1hhvjX Bmpbz7FCUMe+bwRSJlxPWUF0FSU5kVk2aFXyOjKavHfGS4jDJ8VnSakZhW3yl3Zu77jwbOf6xwp4q kTLjclVZIFuTf7LebyFxRqkGcM5W87iXQa9o4GjbduFN5e8Bs7+qS8rgRlKBKoBiDnRlnyTbhc2go Pb+w4rYyu5qgU1a+wJIQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r7djw-002qeE-1o; Mon, 27 Nov 2023 15:41:40 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r7djs-002qdP-02 for linux-arm-kernel@lists.infradead.org; Mon, 27 Nov 2023 15:41:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701099692; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=trlRZGaWwOa4OdLh+VqMKyI2A0CG6rsUX5Pgp/NJz1A=; b=BqDBOHrWc0h5FqjJ3Q70rmsaOFo/B7bJZVRXHFtbxgu/IB59+4Wnd5Mbf/o9/uDKqonNdh guHDaWgRh34qq8EZSl555891AyPBWruvF7cmavoMt1nNuNxFs9Qi/NxgTnh9t5SbwlxPjB VuaOAIpU6557upXU84/sieIl+uaEjj4= Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-541-aUZoRUG9PLigt_FN38h1HQ-1; Mon, 27 Nov 2023 10:41:31 -0500 X-MC-Unique: aUZoRUG9PLigt_FN38h1HQ-1 Received: by mail-qv1-f70.google.com with SMTP id 6a1803df08f44-67a37b9e1d2so18380326d6.0 for ; Mon, 27 Nov 2023 07:41:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701099691; x=1701704491; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=trlRZGaWwOa4OdLh+VqMKyI2A0CG6rsUX5Pgp/NJz1A=; b=AyqV+BwAWqC67yRz40tQVgSKBWNCglkz68tb9JTbrFaQoT9c+aGdwZJXp1OQR9G5NI GTT3dr/ywc9kQp+8K68TsaaaxYV/p43aBPz6r6r7V6plgqA+JJ5yNmfUcH+NJIuBSObV vAMvU0zA/UDFFHzO9P6eev2Pg3f2IEHTEfZYC1aDyUJtGPNgcYG2OzUEu3xhTYGVQ+G9 SzKRX7ue/oXSGwpNUwMYSgA8GcHD/CHJtGBEjwqRUsDsL/QZIJvoD2l72CLfX+K5+MGt PcSMB9Szhs7585C1A7UtQu8LZnb4xED0v5XbxKiZYthAXWmv3GCZpDGCHmq/o5wApPt9 ngyQ== X-Gm-Message-State: AOJu0Yz+9N1To2WDFtSXXE14VlkLcqnIApNIkTyNhSfEnBpOH1iycMLW 630uoa2bYddddCI7SM7Dz6ve9sj+XIJTr+z3tWWaxo0UkcxdB5VP97AUpxbiBTxAC5V/WKuOVVl ehH/xmoj8wxpB/JJUDL/i1BNWrmdMaG9UmEw= X-Received: by 2002:a05:6214:cce:b0:67a:1580:d7c3 with SMTP id 14-20020a0562140cce00b0067a1580d7c3mr18665586qvx.58.1701099690832; Mon, 27 Nov 2023 07:41:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IFwdYeuSCwaZFkmXA2r4JClIbyW6DLiolODtDtamQUhQE+K2DuC5boIrMydIesr7kyDs0Msnw== X-Received: by 2002:a05:6214:cce:b0:67a:1580:d7c3 with SMTP id 14-20020a0562140cce00b0067a1580d7c3mr18665560qvx.58.1701099690604; Mon, 27 Nov 2023 07:41:30 -0800 (PST) Received: from ?IPV6:2a01:e0a:59e:9d80:527b:9dff:feef:3874? ([2a01:e0a:59e:9d80:527b:9dff:feef:3874]) by smtp.gmail.com with ESMTPSA id oo28-20020a056214451c00b0067a18167533sm3323974qvb.83.2023.11.27.07.41.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Nov 2023 07:41:30 -0800 (PST) Message-ID: <39f2ba60-a627-4df7-9a1a-f5c1ec12b16a@redhat.com> Date: Mon, 27 Nov 2023 16:41:26 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 02/19] iommu/arm-smmu-v3: Master cannot be NULL in arm_smmu_write_strtab_ent() To: Jason Gunthorpe , iommu@lists.linux.dev, Joerg Roedel , linux-arm-kernel@lists.infradead.org, Robin Murphy , Will Deacon Cc: Michael Shavit , Nicolin Chen , Shameerali Kolothum Thodi References: <2-v2-de8b10590bf5+400-smmuv3_newapi_p1_jgg@nvidia.com> From: Eric Auger In-Reply-To: <2-v2-de8b10590bf5+400-smmuv3_newapi_p1_jgg@nvidia.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231127_074136_120625_E5B6C750 X-CRM114-Status: GOOD ( 15.98 ) 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 Hi Jason, On 11/13/23 18:53, Jason Gunthorpe wrote: > The only caller is arm_smmu_install_ste_for_dev() which never has a NULL > master. Remove the confusing if. > > Signed-off-by: Jason Gunthorpe Reviewed-by: Eric Auger Eric > --- > drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 9 ++------- > 1 file changed, 2 insertions(+), 7 deletions(-) > > diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c > index 519749d15fbda0..9117e769a965e1 100644 > --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c > +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c > @@ -1269,10 +1269,10 @@ static void arm_smmu_write_strtab_ent(struct arm_smmu_master *master, u32 sid, > */ > u64 val = le64_to_cpu(dst->data[0]); > bool ste_live = false; > - struct arm_smmu_device *smmu = NULL; > + struct arm_smmu_device *smmu = master->smmu; > struct arm_smmu_ctx_desc_cfg *cd_table = NULL; > struct arm_smmu_s2_cfg *s2_cfg = NULL; > - struct arm_smmu_domain *smmu_domain = NULL; > + struct arm_smmu_domain *smmu_domain = master->domain; > struct arm_smmu_cmdq_ent prefetch_cmd = { > .opcode = CMDQ_OP_PREFETCH_CFG, > .prefetch = { > @@ -1280,11 +1280,6 @@ static void arm_smmu_write_strtab_ent(struct arm_smmu_master *master, u32 sid, > }, > }; > > - if (master) { > - smmu_domain = master->domain; > - smmu = master->smmu; > - } > - > if (smmu_domain) { > switch (smmu_domain->stage) { > case ARM_SMMU_DOMAIN_S1: _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel