Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1346991pxx; Fri, 30 Oct 2020 08:02:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVKPuGJFjz1M3uxIR/3X0jbDKL12agyrwZIZGEqptHj4flVUEklQ5PLZQyyk0AEEBU88Dw X-Received: by 2002:a05:6402:1ad9:: with SMTP id ba25mr2932962edb.120.1604070168685; Fri, 30 Oct 2020 08:02:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604070168; cv=none; d=google.com; s=arc-20160816; b=Ex4S/efOgAu3N/I2S/QCxJ4Ia2TVxciDIg4VMkcfkzN32SbRyoV/9FSApv9fBz4Toi 7uYvV52E/IwgpYR5aRic4ZvJoGmGKDXLUe4bGHplYSQJH4bX9kcQfDxtUgmnHkMi7+4m foUuiWic12Qduy5Pmho1FZkAK18L36rknrXKBDF8i0i61/2Im5PiRj9blmsHCqE/9dHp Vi+u9vx4cFH7tWjhjhr6hM6GXW9KH/gaXBQTLMlb18ha+aDyjM5yrxgodqmXEct5s8kh KA1bWE6AD8HoxkFd/ciXgfpTPNhLUCLdtD9L1U4YFTchZ7JAfcV9JI+6z/rg8clZwxyT PRhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=CkIYO9e7IgpisbvbjPoCHhqeVqrDdQH9sUd4O8Sql+E=; b=A4g5KBmkOOO1dd6mF4CBo6Z3NCzrJDKt0fEhjG6i/OwePP0OlNG7p15gq/yFGwtNyE Nfa3RIHcfS3dpJPv1cQAx1OkpA67pJ+Kuifdt7L/q+MfJOBD7NzV/OXlcrgYk3n0FQtA Mg8t6ldbsLGlNcksxRqVh4EryqXBHvyC7gRGcz8gao3KpNp9qHyJeMcYsMj7wsQxB91T V1z/Mx9RQOAIIQl6OhmbQpDo+wHMh6YPBLOIrUEplZBzqcIcpfeJJIIIsKuFFnEr0XA5 E8k/ylNHjkkGvZoAmZF1sH3eDdoFkv+7m7G4YLBgStCdoMfI2goPhI3vmKYRGWNwuHJk OVnA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ym1si4301081ejb.689.2020.10.30.08.02.23; Fri, 30 Oct 2020 08:02:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726890AbgJ3PAq (ORCPT + 99 others); Fri, 30 Oct 2020 11:00:46 -0400 Received: from alexa-out.qualcomm.com ([129.46.98.28]:15998 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727021AbgJ3PAm (ORCPT ); Fri, 30 Oct 2020 11:00:42 -0400 Received: from ironmsg-lv-alpha.qualcomm.com ([10.47.202.13]) by alexa-out.qualcomm.com with ESMTP; 30 Oct 2020 08:00:41 -0700 X-QCInternal: smtphost Received: from ironmsg02-blr.qualcomm.com ([10.86.208.131]) by ironmsg-lv-alpha.qualcomm.com with ESMTP/TLS/AES256-SHA; 30 Oct 2020 08:00:39 -0700 X-QCInternal: smtphost Received: from c-rojay-linux.qualcomm.com ([10.206.21.80]) by ironmsg02-blr.qualcomm.com with ESMTP; 30 Oct 2020 20:30:05 +0530 Received: by c-rojay-linux.qualcomm.com (Postfix, from userid 88981) id AF77326B6; Fri, 30 Oct 2020 20:30:03 +0530 (IST) From: Roja Rani Yarubandi To: wsa@kernel.org Cc: swboyd@chromium.org, dianders@chromium.org, saiprakash.ranjan@codeaurora.org, gregkh@linuxfoundation.org, mka@chromium.org, akashast@codeaurora.org, msavaliy@qti.qualcomm.com, skakit@codeaurora.org, vkaur@codeaurora.org, pyarlaga@codeaurora.org, rnayak@codeaurora.org, agross@kernel.org, bjorn.andersson@linaro.org, linux-arm-msm@vger.kernel.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, sumit.semwal@linaro.org, linux-media@vger.kernel.org, Roja Rani Yarubandi Subject: [PATCH V6 1/3] soc: qcom: geni: Remove "iova" check Date: Fri, 30 Oct 2020 20:29:57 +0530 Message-Id: <20201030145959.505-2-rojay@codeaurora.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201030145959.505-1-rojay@codeaurora.org> References: <20201030145959.505-1-rojay@codeaurora.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove "iova" check from geni_se_tx_dma_unprep and geni_se_rx_dma_unprep functions as checking with dma_mapping_error() is enough. Signed-off-by: Roja Rani Yarubandi --- Changes in V5: - This is newly added patch in V5. As per Stephen's comments separted this patch from shutdown callback patch. Changes in V6: - Fixed nit-picks in commit text. drivers/soc/qcom/qcom-geni-se.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soc/qcom/qcom-geni-se.c b/drivers/soc/qcom/qcom-geni-se.c index d0e4f520cff8..0216b38c1e9a 100644 --- a/drivers/soc/qcom/qcom-geni-se.c +++ b/drivers/soc/qcom/qcom-geni-se.c @@ -705,7 +705,7 @@ void geni_se_tx_dma_unprep(struct geni_se *se, dma_addr_t iova, size_t len) { struct geni_wrapper *wrapper = se->wrapper; - if (iova && !dma_mapping_error(wrapper->dev, iova)) + if (!dma_mapping_error(wrapper->dev, iova)) dma_unmap_single(wrapper->dev, iova, len, DMA_TO_DEVICE); } EXPORT_SYMBOL(geni_se_tx_dma_unprep); @@ -722,7 +722,7 @@ void geni_se_rx_dma_unprep(struct geni_se *se, dma_addr_t iova, size_t len) { struct geni_wrapper *wrapper = se->wrapper; - if (iova && !dma_mapping_error(wrapper->dev, iova)) + if (!dma_mapping_error(wrapper->dev, iova)) dma_unmap_single(wrapper->dev, iova, len, DMA_FROM_DEVICE); } EXPORT_SYMBOL(geni_se_rx_dma_unprep); -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation