Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1808384pxb; Mon, 8 Mar 2021 06:57:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJwqaFUe2WUP60ID/rzlSt/McL5kH3ZJ8Ud2xZ3XZcwCBACyk35xv7hRljrGXsMpRXud9TM9 X-Received: by 2002:aa7:d4d6:: with SMTP id t22mr23065617edr.376.1615215473098; Mon, 08 Mar 2021 06:57:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615215473; cv=none; d=google.com; s=arc-20160816; b=G1m+KqAxa0yXLGsueqS+VNhP0BECuiLG6vWBmoN3ypFt0ibIlQj2j+aJsGePlIjFII eaGTf1rXxqakGB8Iw+B35+DWaJBnax/eN6dlwt+HY5YeEA6r4C/BEH58PtnZh376oNJX n4+u06Veyl0Cg/izJzyvxep1xiGrewuqqnvNohrwtYK7rxfsuLzeSYAy2tVuntr686IJ EftH+nuceSlPkyX3/HbTVDBP64ynfCOZVehEZPtu89Oe50zQZVUKCLk35Pz9BoZC1P1x 0r5FixiPUEVS5jUkuBUFOb91wt0gEFR17XHXSQ+uTLzthbBERaFgsgGvoFjz0E28MsPe /+aA== 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 :dkim-signature; bh=urYLQtVdnzA+q/DonKHBr+50GGSu7EQTj+TBy7g6Q9o=; b=XWk4GjgMrL0zGmkkDDq9fqOnD7kilkUeGU0wdBdd6u1q5QYaxzCyxjJyMdfiSPHAfH 3U4zeXzOD/hGi3LblAvEsSXimJMEpUjYZ1IgQdYb9quYu2QxPdAXi22aArhp8sXt4oTl agRTk4tRDeKW5YVnktFXCZWbDiPhTudHbqYrzPiDD4kiOx3uhXkHLsgbxKlDpTzWpzHO 6Q5ANz+jcf4aHDGItO63EBSjFpuU4RWHOGobWGq1S8iQC5KPtqf2+GR1x0gbfnQm+knf MYUn1wZs24Lt9ZL1XgV3/mJaksUbS9hygwYOmolXfE08GC2RRmPVb2cZHsJanXTzdzT5 TlpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@deviqon.com header.s=google header.b=DI2451Hf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=deviqon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bt18si7423956ejb.443.2021.03.08.06.57.29; Mon, 08 Mar 2021 06:57:53 -0800 (PST) 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; dkim=pass header.i=@deviqon.com header.s=google header.b=DI2451Hf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=deviqon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230511AbhCHO4N (ORCPT + 99 others); Mon, 8 Mar 2021 09:56:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231215AbhCHOzi (ORCPT ); Mon, 8 Mar 2021 09:55:38 -0500 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1EF3C06174A for ; Mon, 8 Mar 2021 06:55:37 -0800 (PST) Received: by mail-ed1-x529.google.com with SMTP id bd6so15098390edb.10 for ; Mon, 08 Mar 2021 06:55:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=deviqon.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=urYLQtVdnzA+q/DonKHBr+50GGSu7EQTj+TBy7g6Q9o=; b=DI2451HfgotQz9pB6iDClae765YmLRgpDL2tCkDipGN54R+t87igdJbgK+kmmreaeA 8KPw7u3xoIz9kOCfIv08lBVwmzr0JSwKZUBDRyUNWmSK5ATIQfmWqO5Q6xx8uIJLikA5 X+4sOWpuDw30weSJk+atq9Ow39Uv0ffPDH/Jbwcu8Jdi+JnQaHboHU8msYT9CKq6m4UT DBTRx+IZAUsflr0foefztI0cy35cwviB5fimBRCYTDiCtV1JgeVmbCDL+fLj6coXxdhK akBiWjsSx/bzPQDIxfRyuf5JLv7mwrqLzRThKIwHEz2B43K7HqN1vXA5pvmO8yhk9Dfy 8jPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=urYLQtVdnzA+q/DonKHBr+50GGSu7EQTj+TBy7g6Q9o=; b=mLGD7DSw8P7DOiInkuiaE8hkEunJnPSMMyle6FVT/26KUIhs4rNmPQUMJ4SHY8Ta32 SDpLX0An6f+nzQy5zOp0dswvuM2n2JN4U7ztubP87sPqH3bnq4GMoEmwni2Zx0MDKzHa AoMXKeF9yGAym5bMXZKeXNz47/O3C735nYD7B5dTUKDCfSc0HrdzhYnqEKkPTHXUlTgZ xpeXHJ+akyYgh/cJNCOY1+3RdiOQVm+8yyAn9WHKnL4WYYncqjBpd7jqcRrkogeGPg5G wSdD6EXM5aX5+b6NB2ePyjeBDwClEYybBM0d7pI0z7ARJKeL1N1BgpF7xMH9NTunNwl/ uZbw== X-Gm-Message-State: AOAM532d1cm+wLdlJlmZqL6ye3xNSw+Lbse0GvNwtwLQKwbHKQ0uEp7Q yuAEsufxqBMX+yJQA7L3c7eBEg== X-Received: by 2002:aa7:c94c:: with SMTP id h12mr22840108edt.40.1615215336605; Mon, 08 Mar 2021 06:55:36 -0800 (PST) Received: from localhost.localdomain ([5.2.193.191]) by smtp.gmail.com with ESMTPSA id bt14sm7411234edb.92.2021.03.08.06.55.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Mar 2021 06:55:36 -0800 (PST) From: Alexandru Ardelean To: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, greybus-dev@lists.linaro.org, devel@driverdev.osuosl.org, linux-tegra@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com Cc: broonie@kernel.org, gregkh@linuxfoundation.org, elder@kernel.org, johan@kernel.org, vireshk@kernel.org, rmfrfs@gmail.com, f.fainelli@gmail.com, ldewangan@nvidia.com, thierry.reding@gmail.com, jonathanh@nvidia.com, linux@deviqon.com, Alexandru Ardelean Subject: [PATCH 08/10] spi: fsl-espi: remove usage of 'delay_usecs' field Date: Mon, 8 Mar 2021 16:55:00 +0200 Message-Id: <20210308145502.1075689-9-aardelean@deviqon.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210308145502.1075689-1-aardelean@deviqon.com> References: <20210308145502.1075689-1-aardelean@deviqon.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The 'delay_usecs' field is being removed from the spi_transfer struct. This change removes it from the SPI FSL ESPI driver. Signed-off-by: Alexandru Ardelean --- drivers/spi/spi-fsl-espi.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/drivers/spi/spi-fsl-espi.c b/drivers/spi/spi-fsl-espi.c index cf2b947c600e..f7066bef7b06 100644 --- a/drivers/spi/spi-fsl-espi.c +++ b/drivers/spi/spi-fsl-espi.c @@ -435,8 +435,7 @@ static int fsl_espi_trans(struct spi_message *m, struct spi_transfer *trans) static int fsl_espi_do_one_msg(struct spi_master *master, struct spi_message *m) { - unsigned int delay_usecs = 0, rx_nbits = 0; - unsigned int delay_nsecs = 0, delay_nsecs1 = 0; + unsigned int rx_nbits = 0, delay_nsecs = 0; struct spi_transfer *t, trans = {}; int ret; @@ -445,16 +444,10 @@ static int fsl_espi_do_one_msg(struct spi_master *master, goto out; list_for_each_entry(t, &m->transfers, transfer_list) { - if (t->delay_usecs) { - if (t->delay_usecs > delay_usecs) { - delay_usecs = t->delay_usecs; - delay_nsecs = delay_usecs * 1000; - } - } else { - delay_nsecs1 = spi_delay_to_ns(&t->delay, t); - if (delay_nsecs1 > delay_nsecs) - delay_nsecs = delay_nsecs1; - } + unsigned int delay = spi_delay_to_ns(&t->delay, t); + + if (delay > delay_nsecs) + delay_nsecs = delay; if (t->rx_nbits > rx_nbits) rx_nbits = t->rx_nbits; } -- 2.29.2