From patchwork Fri Sep 2 13:35:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rahul Singh X-Patchwork-Id: 12964156 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 C651EECAAD5 for ; Fri, 2 Sep 2022 13:38:40 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.397742.638411 (Exim 4.92) (envelope-from ) id 1oU6sS-0003Pl-51; Fri, 02 Sep 2022 13:38:32 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 397742.638411; Fri, 02 Sep 2022 13:38:32 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oU6sS-0003Pe-2U; Fri, 02 Sep 2022 13:38:32 +0000 Received: by outflank-mailman (input) for mailman id 397742; Fri, 02 Sep 2022 13:38:30 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oU6sQ-0003PW-Kx for xen-devel@lists.xenproject.org; Fri, 02 Sep 2022 13:38:30 +0000 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by se1-gles-sth1.inumbo.com (Halon) with ESMTP id 87245b12-2ac4-11ed-934f-f50d60e1c1bd; Fri, 02 Sep 2022 15:38:29 +0200 (CEST) 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 CAF301516; Fri, 2 Sep 2022 06:38:34 -0700 (PDT) Received: from e109506.cambridge.arm.com (e109506.cambridge.arm.com [10.1.199.62]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 82CE23F766; Fri, 2 Sep 2022 06:38:27 -0700 (PDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 87245b12-2ac4-11ed-934f-f50d60e1c1bd From: Rahul Singh To: xen-devel@lists.xenproject.org Cc: bertrand.marquis@arm.com, rahul.singh@arm.com, Zhen Lei , Stefano Stabellini , Julien Grall , Volodymyr Babchuk , Will Deacon Subject: [PATCH v2 08/10] xen/arm: smmuv3: Remove unnecessary oom message Date: Fri, 2 Sep 2022 14:35:00 +0100 Message-Id: <43ec5ca66040cea4783fe5608a68d667597ddb24.1662123432.git.rahul.singh@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 From: Zhen Lei Backport Linux commit affa909571b0. This is the clean backport without any changes. Fixes scripts/checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Remove it can help us save a bit of memory. Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210609125438.14369-1-thunder.leizhen@huawei.com Signed-off-by: Will Deacon Origin: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git affa909571b0 Signed-off-by: Rahul Singh --- Changes in v2: - fix commit msg --- xen/drivers/passthrough/arm/smmu-v3.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/xen/drivers/passthrough/arm/smmu-v3.c b/xen/drivers/passthrough/arm/smmu-v3.c index 9bd0c211c0..f8f0eeb528 100644 --- a/xen/drivers/passthrough/arm/smmu-v3.c +++ b/xen/drivers/passthrough/arm/smmu-v3.c @@ -1644,10 +1644,8 @@ static int arm_smmu_init_l1_strtab(struct arm_smmu_device *smmu) void *strtab = smmu->strtab_cfg.strtab; cfg->l1_desc = _xzalloc(size, sizeof(void *)); - if (!cfg->l1_desc) { - dev_err(smmu->dev, "failed to allocate l1 stream table desc\n"); + if (!cfg->l1_desc) return -ENOMEM; - } for (i = 0; i < cfg->num_l1_ents; ++i) { arm_smmu_write_strtab_l1_desc(strtab, &cfg->l1_desc[i]); @@ -2432,10 +2430,8 @@ static int arm_smmu_device_probe(struct platform_device *pdev) struct arm_smmu_device *smmu; smmu = xzalloc(struct arm_smmu_device); - if (!smmu) { - dev_err(pdev, "failed to allocate arm_smmu_device\n"); + if (!smmu) return -ENOMEM; - } smmu->dev = pdev; if (pdev->of_node) {