Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp674630lqh; Fri, 31 May 2024 12:48:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUnhbiDZgWmbTtyLL1qV14nnL0/MRuW/sUrmxrZ2uwW/42ZyxxwxMnhQ3fR1fSo7JuvWzxIyNSvBK4/QlTHQZf1AeCrIQXnKtnEhO5L/w== X-Google-Smtp-Source: AGHT+IGHOB5vffNjGk47Qj/CsPz+DjffrU0oUHMaIdqaGeAhqJDF70iWE/NXAqNFgOzTOucJfV66 X-Received: by 2002:a17:90b:4b8c:b0:2b6:208c:2aee with SMTP id 98e67ed59e1d1-2c1c4453885mr4014111a91.20.1717184896105; Fri, 31 May 2024 12:48:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717184896; cv=pass; d=google.com; s=arc-20160816; b=G5EQWFKDLQhghud0MDxVwXiN9eCu71b1/Z+F9wlMDWhqLLxVMXESlz4imSom9CkXAp 6qDXibM5srXXiMhmHw7h8QPAyt8uj0hrxG+ocGfx0XFsfpwN21COE0Q98r2sOS1ws+Lg edQBNXw3YL9xpwURdKRctXXNcWarZEUc1GYjwgMkQnHErH+JMbOUdmgWPMxfIo9Jx7ab kiY6/PM0GZWac74MNtDuD9VwihTQ5TxTPOxoq5dvhBXBvCRmjAinpY8LmzRajlVELh64 AAGfZbbhm+DV83B64jKWr+aT0I547Mt9BYKp+JC/HJegAp2nbZB1lejaWi/6h6bnclhq m3ww== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=BnQH1DaSGJNzM53rH+jfEswv6xai6CcFmoJyf3z8Pb0=; fh=2o2HR2oDu6e4ue1RmqPLdveM2RcPJfbjbklM2aqgOvI=; b=uT31DhoX66OFIodLJQVSLn4GZWBOxuJj8OS9QtMHFhRpB5zvcoJX6RaHjiFYK8btKb u4nsxTNiW7KDC7sDKx6rjpBeVpM7d8MyfnFcevqbWDU/V081wnDeKNUV86XQ7R359hHa hZxreubDMCXTjV03zLYCEIsAJHjdZKlI/3Zf5ksZKlsRb3Ai3qgJ4HqEUqrKdUdWLLCu nsVrEkLm8xRsKD48bkYkMwduxQXBdp3lgRx2LWYBEJP5DSrbHxrMwYgyk8WWO4k6JVJr 33Bl4RBKQDZpLy7kV1BQSZ194nJaIICtMok/wIAdFE7b49QKK0hjXmpRT+/icEOYsYIB obWg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=JYTQSupf; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-197400-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197400-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c1a77b6252si3864139a91.121.2024.05.31.12.48.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 12:48:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-197400-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=JYTQSupf; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-197400-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197400-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 4172F287909 for ; Fri, 31 May 2024 19:48:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6D9B317F515; Fri, 31 May 2024 19:47:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="JYTQSupf" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2B559178369; Fri, 31 May 2024 19:47:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717184853; cv=none; b=aNsG2uqOO6jKhJMI+MfA9xq4E10rXVfFhpdV5BSji6gQdUFghJl4ey0Q+7NE9sw4HKRQq5dAEfmOpu4OMLZWzKBGQTbc5oc9YRjxgHeI/YIPG68cY7VCoffUl/iFqbwtR/ivjJ8TLpGAdMfGMnGZ7P6Z1NpYHfYWUAEUyKxCxa0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717184853; c=relaxed/simple; bh=h+TKuS+Kdb3EPN8yAMusweqbJNDGlVqQOxmyBy/mh6A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=A3QtdTK3XBOP9eNl1AK7rFtLqInu9vMQG8NatqbSSwxJqVlaMP0CBz02rv/Z2m565CDlkVkIE5xdYP8wX9Dlh++XsPymvF0Z/9Fjaqtro4N5OJZn71pfEztYXapGjbBSIdC/As86e3mfJc04nq4ZZ3BQx2ikJF06536GVYjcyX0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=JYTQSupf; arc=none smtp.client-ip=192.198.163.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717184852; x=1748720852; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=h+TKuS+Kdb3EPN8yAMusweqbJNDGlVqQOxmyBy/mh6A=; b=JYTQSupfrVk+ncv575yVAPFwqTrk15iUADrwcS9uOps5JUQEfGuzcj9v p37/9bzAZgvh5HbMm3AQNbArEZq6aksup+Y1yx+finWyaEyEOGpRm3X12 uP81OYvnEy9JINOc/5F3s3YCh6/0xMO2DgbU3d+6y8ERdlRj/Yz/ABfev oQ9o82/cyb4nXcCpDQIdPhek3Jykff+v1mtaWLtNoCyCcoYNUuFvowqYq WnM8bsGxKi0IaZBlxnzErK003kjWRzU4QRJ2HLPlF9r8D5tGud70aJoR0 8m6pOyimeXAHo73A8+vp2Z5YOT7uAVdegOfAz9jjsVN8KE1qCaxOgbm74 g==; X-CSE-ConnectionGUID: bZU4WJ4sTeq3ZPd0dbS7uQ== X-CSE-MsgGUID: wRBHKDuqQ/mZz+haTKlOLw== X-IronPort-AV: E=McAfee;i="6600,9927,11089"; a="39144652" X-IronPort-AV: E=Sophos;i="6.08,205,1712646000"; d="scan'208";a="39144652" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 12:47:30 -0700 X-CSE-ConnectionGUID: wmQx8GSBSMyebRW4k5MCGA== X-CSE-MsgGUID: BrgdulQQRBK5Wbl/9p+0fQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,205,1712646000"; d="scan'208";a="67452621" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa001.fm.intel.com with ESMTP; 31 May 2024 12:47:26 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 1639641D; Fri, 31 May 2024 22:47:25 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , Mark Brown , Yang Yingliang , Christophe JAILLET , Thangaraj Samynathan , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org Cc: Serge Semin , Daniel Mack , Haojian Zhuang , Robert Jarzmik , =?UTF-8?q?N=C3=ADcolas=20F=20=2E=20R=20=2E=20A=20=2E=20Prado?= , Neil Armstrong Subject: [PATCH v1 2/8] spi: dw: Use new spi_xfer_is_dma_mapped() helper Date: Fri, 31 May 2024 22:42:34 +0300 Message-ID: <20240531194723.1761567-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240531194723.1761567-1-andriy.shevchenko@linux.intel.com> References: <20240531194723.1761567-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Replace a few lines of code by calling a spi_xfer_is_dma_mapped() helper. Signed-off-by: Andy Shevchenko --- drivers/spi/spi-dw-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-dw-core.c b/drivers/spi/spi-dw-core.c index ddfdb903047a..431788dd848c 100644 --- a/drivers/spi/spi-dw-core.c +++ b/drivers/spi/spi-dw-core.c @@ -19,6 +19,7 @@ #include #include +#include "internals.h" #include "spi-dw.h" #ifdef CONFIG_DEBUG_FS @@ -438,8 +439,7 @@ static int dw_spi_transfer_one(struct spi_controller *host, transfer->effective_speed_hz = dws->current_freq; /* Check if current transfer is a DMA transaction */ - if (host->can_dma && host->can_dma(host, spi, transfer)) - dws->dma_mapped = host->cur_msg_mapped; + dws->dma_mapped = spi_xfer_is_dma_mapped(host, spi, transfer); /* For poll mode just disable all interrupts */ dw_spi_mask_intr(dws, 0xff); -- 2.43.0.rc1.1336.g36b5255a03ac