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 F079BC4332F for ; Tue, 14 Nov 2023 15:17:44 +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=umfw37GtFb0PDuozc09JC/e+17r8IYyBQQvKB2l5/Iw=; b=Gp8Rap8oE3OyKs qultYxNBWiUpUrWIa1E5iGgA7opA0O8P/WkjhRXyS3LTdvzCSoHyNuHsF/LUMcsuzoDTa4qUuv/zp DL88gHlAq7yKzA6CbO0f9wqzOTC3jLbxNBgxRJobEccdW43q1svUedZFqJu0CKy7x3gI+F1EvY0IV gVaiTgMf+rD+4glIVF3NEkUi9CVT23QIxRgyRkuJne+mY8PszWeZVsPgGFupmGZjZxV+SvKYFWi1p nY8o4111U/EWZoXSP+Ls09HeHgKTaJeoS/+AF/w0LDZ4LZpeleZpXRt8fs9mBwUc3VnqZ4S6gIICv Kh8cnBOCpx56PrS0d83A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r2vAF-00GHp7-2f; Tue, 14 Nov 2023 15:17:19 +0000 Received: from mail-qk1-f169.google.com ([209.85.222.169]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r2vAC-00GHnU-2h for linux-arm-kernel@lists.infradead.org; Tue, 14 Nov 2023 15:17:18 +0000 Received: by mail-qk1-f169.google.com with SMTP id af79cd13be357-77bc5d8490dso291484185a.2 for ; Tue, 14 Nov 2023 07:17:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699975034; x=1700579834; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=GAzdt6JVu+8zpjX2fxJm6GnOJWLExS4LrswxE8RUMVM=; b=j5Qyrvjr2f16ELIyUzuQeSLZnJ4d2CG9FUqoj1i4CV+rfTobV+ndLrlkIbfzIh4+iE f6S7pjC0uCGqXZT+Cxf5JuI64ZcJ/YDpmry5TINXeBjxEw2ugept8VFHWV1N8l7OvVeZ fW/kRFbxYlLDjzQW0YXyKxsq59IOkG8BM0P+/iCMyBjAdTbhCd8ZxQr3NV29eExXRT5h o6mboSz1YmOdFlVKEpUKAhVvTe+F+pOHlRW3IWnDE+jrxfBVcyf+1bms+OTLsGSWaQzJ ME839RsJ81tLQciHcM3F6RJink26O16aSb5U6fF7AF+LbzzebZP4/6oJjWPoRmhVLpSu zNJw== X-Gm-Message-State: AOJu0YwxeZ0ax6nHfOetaoTRPm7mOO0NPkjJ52sJssLE0ik0XPFuzBEY pp70A0f9nogR6gEVRdvm5d0= X-Google-Smtp-Source: AGHT+IG7dg4d3lJHK2Z5QjydOqHp8/wiUSYvuoaII+i9nEC0HtfUy3PfbdN71yq06958YUaUrTDE8A== X-Received: by 2002:a05:620a:3985:b0:778:9183:621b with SMTP id ro5-20020a05620a398500b007789183621bmr2024486qkn.28.1699975034504; Tue, 14 Nov 2023 07:17:14 -0800 (PST) Received: from localhost ([12.186.190.2]) by smtp.gmail.com with ESMTPSA id m12-20020ae9e70c000000b00775bb02893esm2733476qka.96.2023.11.14.07.17.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 07:17:14 -0800 (PST) Date: Tue, 14 Nov 2023 07:17:12 -0800 From: Moritz Fischer To: Jason Gunthorpe Cc: iommu@lists.linux.dev, Joerg Roedel , linux-arm-kernel@lists.infradead.org, Robin Murphy , Will Deacon , Michael Shavit , Nicolin Chen , Shameerali Kolothum Thodi Subject: Re: [PATCH v2 02/19] iommu/arm-smmu-v3: Master cannot be NULL in arm_smmu_write_strtab_ent() Message-ID: References: <0-v2-de8b10590bf5+400-smmuv3_newapi_p1_jgg@nvidia.com> <2-v2-de8b10590bf5+400-smmuv3_newapi_p1_jgg@nvidia.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <2-v2-de8b10590bf5+400-smmuv3_newapi_p1_jgg@nvidia.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231114_071716_877592_5D04272B X-CRM114-Status: GOOD ( 18.40 ) 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 Mon, Nov 13, 2023 at 01:53:09PM -0400, 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: Moritz Fischer > --- > 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: > -- > 2.42.0 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel