Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp725676lqh; Fri, 31 May 2024 14:53:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWUpTiIR9UkS2of/DMPPXRfLbPZtFgkwGF/SL6QK2d4Gxvk3wvWiso/LG8dtTcIQ66Kx197anzperEw2zQNVxVPG9e4YYL4QL/g2P2rhQ== X-Google-Smtp-Source: AGHT+IEI7hc8RbSYgE9GASgcKHCribSvX9p9mLm+OfSBn8HUj+ChhJ865ra5Hwl3heXLJAgbe3jO X-Received: by 2002:a05:6a00:990:b0:702:4d8c:dbc9 with SMTP id d2e1a72fcca58-7024d8cddb6mr2798610b3a.33.1717192415872; Fri, 31 May 2024 14:53:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717192415; cv=pass; d=google.com; s=arc-20160816; b=kWmLd0VhucDUtKYiQl6e+C7B+w+4N+Y31M6Dwk7dK3I2wHZfUHepsnP40FIbJO2C1X E6/wOAp2x7u4M/jFXQo6FqMzwYnJGjXsfIGHFlC7RcNqdhVf5QKd4frcIZIBtMy7XpBc H6RbKOEkB3W0HkyEPIfmAZ5DZ1BKiLt+9anUicY74di2oqrzojL6LL2swa2bYpK6VFel 23YTD0zMAyNvNQxKZlZlEhUbcKMe3b3iafMuvUYEnrG2ypq4NOajtpkCs3CWW7CQ8dGm /AVWfNQRY7oWU0ZbGwYox5wlHqyRw2dAObz/eTorK6Xr7NFnGkyEq1j1Fnd40Q0ti3Nn CkSQ== 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=PS8G/bNulY6gPU5pjlZ0kCIgx6JeuPaZXDuTf5GUzuI=; fh=2o2HR2oDu6e4ue1RmqPLdveM2RcPJfbjbklM2aqgOvI=; b=FBKahnZHu08F8Q75hQc0SWIJKdcp/QcsobLjdiqkscQxIdm9jB9j+DD2Icfsby57MY e4m2bZ9ZKSOzPzdlnoH9QT0W8ivupsjqI1kuZiXORCIlmrCr0YK/YEcFmTmm5RU9srAp s+QWr1S4FmJO8GBR25oqUYoCPlczmLr/6RqpFd+S7oE1J7/uykInkAaIQdI1dsuaOfvz AnDkwPpoTBhvRxUFyJ1XYxs4Nf38XZJZCRSoGTRGTdK46zWrb1YlLCUOzXy91rUD7hBA euldOHCv54JpUyEHr8PsEN4krGe31NujBCgddrG21Yi7QyzYshTRHglTU0l38gsxmNuG 3E+A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=XkuMzVw5; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-197405-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197405-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6c355157c26si2150285a12.214.2024.05.31.14.53.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 14:53:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-197405-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=XkuMzVw5; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-197405-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197405-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 8D969B26527 for ; Fri, 31 May 2024 19:49:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3980A183A81; Fri, 31 May 2024 19:47:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="XkuMzVw5" 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 ED5D71822DE; Fri, 31 May 2024 19:47:35 +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=1717184857; cv=none; b=iGlGeSp9+CGfT62CjvaeYzaQI6AJ9qpGcOX+gre6F6lBEUV/Dn0N1w+kwrnZPsXXjMeOreDa5mLpGwgynRCQ//GpCOVHFjQ6XxVS4vRSs/KEHNxjThJvOp6UGcbwpSdcPbR7fZ7rakgbYqu/E3qxJMHduBpHp5sPJZiyB/id0No= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717184857; c=relaxed/simple; bh=/9eJLkmp3LgLhh+fMgJbD6pR0R5JNL/+VIoLm5XWU7o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CQ1c8kgKgIYrxjizWyM5LlRG4gYY3RLBMfKQCj5TA1SdfxP7/9mxe/MeE/YDtHLq1z8yL8yXI85SeR82fuyaeN46A89cXSRZffcqdcwi71ATD7vFxGy58IpeYobHEKAcNC31Jqz4tXOzIvG8aRhoDq3NOxvHxIX8xXhcfG1rbmM= 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=XkuMzVw5; 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=1717184856; x=1748720856; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=/9eJLkmp3LgLhh+fMgJbD6pR0R5JNL/+VIoLm5XWU7o=; b=XkuMzVw5k6GlFAZam/3Jf6++astZDrCw/q+Z7c56RgIYRlpY6LIUQ3Mx 5mjceLotL+ImaDw9YE3nHs9s9kXZy6+johPyBhkRbrovUnTLfiDBk3TSo SZH7wPzhgfh9jH5PBN7vfqkRo7yu35RqFOO1xUas4W/qij+RxPFXCqxdD xb5NsaHHtSLNP8cNI/RLo6AT9dBxhRyMKfOB2NgOCg8Gb+Ktnxmkg9C0p SLH3Z//2qdyTbjBxa4kz/FjE98rKNu04e6cMWnrFJT5w+/0Mbd078tGHi w8XybVYf0sDAH6EMblqk4SgsXUUlD5RKomh0i7fzamymOXMlUGJB4yspg Q==; X-CSE-ConnectionGUID: mCTLazYfTMe35ZzDfYJvWQ== X-CSE-MsgGUID: DOt14wRlS0qnMG7RvCu+nQ== X-IronPort-AV: E=McAfee;i="6600,9927,11089"; a="39144693" X-IronPort-AV: E=Sophos;i="6.08,205,1712646000"; d="scan'208";a="39144693" 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:34 -0700 X-CSE-ConnectionGUID: OzG7PVx1Sj6oa374KfTxyw== X-CSE-MsgGUID: w7sprX4/QRubzrJxN+DHJg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,205,1712646000"; d="scan'208";a="67452631" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa001.fm.intel.com with ESMTP; 31 May 2024 12:47:30 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 440BE3B3; 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 6/8] spi: pci1xxxx: Use new spi_xfer_is_dma_mapped() helper Date: Fri, 31 May 2024 22:42:38 +0300 Message-ID: <20240531194723.1761567-7-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-pci1xxxx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-pci1xxxx.c b/drivers/spi/spi-pci1xxxx.c index cc18d320370f..fc98979eba48 100644 --- a/drivers/spi/spi-pci1xxxx.c +++ b/drivers/spi/spi-pci1xxxx.c @@ -6,6 +6,7 @@ #include +#include #include #include #include @@ -15,7 +16,7 @@ #include #include #include -#include +#include "internals.h" #define DRV_NAME "spi-pci1xxxx" @@ -567,7 +568,7 @@ static int pci1xxxx_spi_transfer_with_dma(struct spi_controller *spi_ctlr, static int pci1xxxx_spi_transfer_one(struct spi_controller *spi_ctlr, struct spi_device *spi, struct spi_transfer *xfer) { - if (spi_ctlr->can_dma(spi_ctlr, spi, xfer) && spi_ctlr->cur_msg_mapped) + if (spi_xfer_is_dma_mapped(spi_ctlr, spi, xfer)) return pci1xxxx_spi_transfer_with_dma(spi_ctlr, spi, xfer); else return pci1xxxx_spi_transfer_with_io(spi_ctlr, spi, xfer); -- 2.43.0.rc1.1336.g36b5255a03ac