Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp421225pxb; Thu, 9 Sep 2021 04:11:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwFEBRq2wnpYuuuR4VoPZsih7zo/oia2U3lBhu8WGeYD23ng2zazsE2jZdOaU5jPXrqF+io X-Received: by 2002:a5d:9ada:: with SMTP id x26mr2199040ion.50.1631185881455; Thu, 09 Sep 2021 04:11:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631185881; cv=none; d=google.com; s=arc-20160816; b=c31ze/11OVVhAXFNOwhXn3bGv6jT3Y00wFHyl1gyHZCd6frMgCyFPrLTQmc/V/709w 0Qdtwdvd4ytenKUF0nQLx6HJSlhEKWzclMB5JnmahFEdeSynrOW3C6bCli7qzADVOobg lCAzWcRiAjAWSyxYWOjN0uxFxzE8GsZLQsfNOs+/HebfmPV0pag/ib/K4MAW++F2ktkj REWL6ZMiDhDFcfbykptHR7/krdJsuyNCh28J33NhNZKrkiJ3lDATKrXCsGl2uiCnNubC YjhtxJJQZcx2nylXrCk1zT9go4sMdI9lCxsr/GXmqKDZkD3OZedr31gRAfPwPk2eDDRW 8+rQ== 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=z8OR6d+ZMzv6Zm7tmMIKU13EYKzvNmgnXJ/B25RTzOk=; b=pENgdWWayGpyV4CYgHaQFFrO0bxTDkYN0EJjF7+fGFyJU411v8IPuOw2LeBZGgjfx6 prBNCa3yxKweC6efal2pL9SeDN3GaybRb+EyJGypao41naAFMTpmTfSGo5Z0DR9IE1SC JKSqVmQ5WWdZZDhsNmOOcZkSyBIR23F65vjDNdKgkE3OMJawD3iijUD5UPH/KHdMsBDy pWUU7lK3xi2U0DZKHiC1h2lWg1+jbT5TKEjblLpwKHe7JFYFeFtxgZZiqg6XYBn311qr LblU9D5lixFLQz3cHpPYodtK1u26Z9CQEBwLujwIoO85cJ7wJvzHZ5jxq1YleQpVwXtb PaXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b="EmcJA/0T"; 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=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m2si1792823ili.39.2021.09.09.04.11.10; Thu, 09 Sep 2021 04:11:21 -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; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b="EmcJA/0T"; 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=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235057AbhIILL0 (ORCPT + 99 others); Thu, 9 Sep 2021 07:11:26 -0400 Received: from mx0b-001ae601.pphosted.com ([67.231.152.168]:35222 "EHLO mx0b-001ae601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234928AbhIILLW (ORCPT ); Thu, 9 Sep 2021 07:11:22 -0400 Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1895CKha012432; Thu, 9 Sep 2021 06:10:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=PODMain02222019; bh=z8OR6d+ZMzv6Zm7tmMIKU13EYKzvNmgnXJ/B25RTzOk=; b=EmcJA/0TAfM9rd7TP9yjQeEvneHO/NZR1Y+H0rsq6QLsIYquaZBz4snvKIz8UdjgNKZQ 91kDvqvLbgEp4bit7Usrq+ovQ/vJ8v4vMtFo+8x/4EE5S+rR3F4p/fgR6XofWBkoiut8 kIlv78yDZmWYiXQT7Y72lZVEyb20YOYDaEtsyghh48vhxj6EYBQfZOUHM1bUM9U32eKY 5Ja5mey5MOi+Um9Ly+S5MmN4Yw00chlO1UGiP3AQJfFm5u7CultqILEylx3Mc843VWi0 mBAHzxrRE2qSVw1KK8yNpBJ76B7ChwdQesId5Y4KFYLsGnEAL/ZXkmmh/F5USQeDuy0j 0g== Received: from ediex01.ad.cirrus.com ([87.246.76.36]) by mx0b-001ae601.pphosted.com with ESMTP id 3ay8n60e5d-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Thu, 09 Sep 2021 06:10:10 -0500 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Thu, 9 Sep 2021 12:10:08 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.2242.12 via Frontend Transport; Thu, 9 Sep 2021 12:10:08 +0100 Received: from aryzen.ad.cirrus.com (unknown [198.61.64.231]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 4B3C5478; Thu, 9 Sep 2021 11:10:08 +0000 (UTC) From: Lucas Tanure To: Mark Brown , Sanjay R Mehta , Nehal Bakulchandra Shah CC: , , , Lucas Tanure Subject: [PATCH 3/4] spi: amd: Remove unneeded variable Date: Thu, 9 Sep 2021 12:10:04 +0100 Message-ID: <20210909111005.304101-3-tanureal@opensource.cirrus.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210909111005.304101-1-tanureal@opensource.cirrus.com> References: <20210909111005.304101-1-tanureal@opensource.cirrus.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: 4O0kBz2lGrivKcXtO66AU-kItBg_faSq X-Proofpoint-GUID: 4O0kBz2lGrivKcXtO66AU-kItBg_faSq X-Proofpoint-Spam-Reason: safe Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove internal cs from amd_spi Signed-off-by: Lucas Tanure --- drivers/spi/spi-amd.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/spi/spi-amd.c b/drivers/spi/spi-amd.c index f2dd8d432aff..97838b57871c 100644 --- a/drivers/spi/spi-amd.c +++ b/drivers/spi/spi-amd.c @@ -38,7 +38,6 @@ struct amd_spi { void __iomem *io_remap_addr; unsigned long io_base_addr; u32 rom_addr; - u8 chip_select; }; static inline u8 amd_spi_readreg8(struct amd_spi *amd_spi, int idx) @@ -77,10 +76,9 @@ static inline void amd_spi_setclear_reg32(struct amd_spi *amd_spi, int idx, u32 amd_spi_writereg32(amd_spi, idx, tmp); } -static void amd_spi_select_chip(struct amd_spi *amd_spi) +static void amd_spi_select_chip(struct amd_spi *amd_spi, u8 cs) { - amd_spi_setclear_reg8(amd_spi, AMD_SPI_ALT_CS_REG, amd_spi->chip_select, - AMD_SPI_ALT_CS_MASK); + amd_spi_setclear_reg8(amd_spi, AMD_SPI_ALT_CS_REG, cs, AMD_SPI_ALT_CS_MASK); } static void amd_spi_clear_fifo_ptr(struct amd_spi *amd_spi) @@ -201,8 +199,7 @@ static int amd_spi_master_transfer(struct spi_master *master, struct amd_spi *amd_spi = spi_master_get_devdata(master); struct spi_device *spi = msg->spi; - amd_spi->chip_select = spi->chip_select; - amd_spi_select_chip(amd_spi); + amd_spi_select_chip(amd_spi, spi->chip_select); /* * Extract spi_transfers from the spi message and -- 2.33.0