From nobody Sat Nov 23 03:07:01 2024 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) (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 CD5251BC08B for ; Fri, 15 Nov 2024 13:26:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.200 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731677198; cv=none; b=IELdv5xEZdOhJBuX/a354tgRUW3Jt9em1SaMsNKF1KmBABciL8HQT3dbndf9Ek63DiNxTMoDJGJeGVOegnqDzlo9P2Ij5yKfPVhYPwB2fSUvNGajQIii5ENW2EAPMC5bCcXwwE26nFbwcKvX+ocVAocDBp4znkcrRGW2O4AyK08= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731677198; c=relaxed/simple; bh=oY59SY6A6wqY/ptcdG2ON7Jn8L80m9u4SbJJfcOy3fc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=khG6kq1WSgPK9+cq1/kf7+w29aITBVI6UzSFTkze0W/9HCpmdaYJsmXW2nonvDNMysh2ydE6EERChWeHEN6OaUjgSByftb6GO5qyw6dUtP3SIFhaLEmaDzA0a+w7V7ARcahztm7kGHYu/N0IpJBCaaSmJ1KALIIBwW/l8j2q5oE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=iDYt4TIz; arc=none smtp.client-ip=217.70.183.200 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="iDYt4TIz" Received: by mail.gandi.net (Postfix) with ESMTPA id C27AE2000A; Fri, 15 Nov 2024 13:26:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1731677195; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BOO57gCrd7kA1kaHAYAJHP1GvAJRJefE1dAecm/19NU=; b=iDYt4TIzHr8+xIODoea7yrM2qFW2zm4jTncX33Zx04rUY7qPZeO9m4e6/edL58GDsvhp4n GjJA2z/K3UTok+8dqxyVopUp9QgWs4fw1BOOdAVJhbrUxJoi84O0qt8Ui+9uLNy/nTyLwz xiNgfED64pWf2ivKlfR/5EVKT52LxiyULJE5hXu1YOl+udl2LUKJbjzuM9wEWVxQJtY1bS JS8LBWETImXtwkbb5Zx1AtxI/Wu3RTRUwCNrfJ0nbfCW9jWmHwx/Li0qsWPjNtEF/+JoPf bLvu40SVZCQe+fBroW8ut68nGlCb46gjf69tBEu9+fehf1oosU8IQCGrt9eFpA== From: Bastien Curutchet To: Santosh Shilimkar , Krzysztof Kozlowski , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, Thomas Petazzoni , Herve Codina , Christopher Cordahi , Bastien Curutchet Subject: [PATCH v4 02/10] memory: ti-aemif: Remove unnecessary local variables Date: Fri, 15 Nov 2024 14:26:23 +0100 Message-ID: <20241115132631.264609-3-bastien.curutchet@bootlin.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241115132631.264609-1-bastien.curutchet@bootlin.com> References: <20241115132631.264609-1-bastien.curutchet@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: bastien.curutchet@bootlin.com Content-Type: text/plain; charset="utf-8" CS timings are copied to local variables that are then used as is, without any modifications. Remove these unneeded local variables and deal directly with the timings stored in the struct aemif_cs_data. Signed-off-by: Bastien Curutchet Reviewed-by: Miquel Raynal --- drivers/memory/ti-aemif.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/memory/ti-aemif.c b/drivers/memory/ti-aemif.c index bd0c49ba1939..6a751a23d41a 100644 --- a/drivers/memory/ti-aemif.c +++ b/drivers/memory/ti-aemif.c @@ -174,22 +174,14 @@ static int aemif_config_abus(struct platform_device *= pdev, int csnum) { struct aemif_device *aemif =3D platform_get_drvdata(pdev); struct aemif_cs_data *data =3D &aemif->cs_data[csnum]; - int ta, rhold, rstrobe, rsetup, whold, wstrobe, wsetup; unsigned offset; u32 set, val; =20 offset =3D A1CR_OFFSET + (data->cs - aemif->cs_offset) * 4; =20 - ta =3D data->ta; - rhold =3D data->rhold; - rstrobe =3D data->rstrobe; - rsetup =3D data->rsetup; - whold =3D data->whold; - wstrobe =3D data->wstrobe; - wsetup =3D data->wsetup; - - set =3D TA(ta) | RHOLD(rhold) | RSTROBE(rstrobe) | RSETUP(rsetup) | - WHOLD(whold) | WSTROBE(wstrobe) | WSETUP(wsetup); + set =3D TA(data->ta) | + RHOLD(data->rhold) | RSTROBE(data->rstrobe) | RSETUP(data->rsetup) | + WHOLD(data->whold) | WSTROBE(data->wstrobe) | WSETUP(data->wsetup); =20 set |=3D (data->asize & ACR_ASIZE_MASK); if (data->enable_ew) --=20 2.47.0