From patchwork Sun Apr 28 20:28:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 329 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 2DE993F08F for ; Sun, 28 Apr 2019 22:29:39 +0200 (CEST) Received: by mail-pf1-f199.google.com with SMTP id f7sf6119714pfd.7 for ; Sun, 28 Apr 2019 13:29:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1556483378; cv=pass; d=google.com; s=arc-20160816; b=ccOFBW9CdfGyovGsPs2UUDQiR57hEDUGcStPx1hnSe75OfnU1H1lcR1Bwvbh80XUIs YMX2j1JWYvbizKQLEQhkgsWt27pbvyZXr2aGS7AZjiphmLtM0QATvU45YQ5YFfiOXmVr fppc1ScFg+I3xGt5MzbXduPaFNSM/oQ4L7RCoQ0WR8OSi4CoJ2WuLLVvxIcVz6s/iv4+ pSv0p0vhe8eAfJAmU8WzID3gQ2xA+l9/Tau2TxpMRbdrBwMinjMnLCNJA5pWOSjyDJaz LD6gubgjIv6qH2HebkxzNumF7cW79HZ7UpT4HgsLkRj+AJnPuu7rFv9H+DCyUY9/Byzt tp4Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=HFmj8iYFThgrrHhPeDBbQung1FQPYVWsozJnP62Ef5o=; b=tU/6bzuRQnCZjGSSrWHxGIKodMVJHpIBQ/oS40h846XeT8mdYBxAmFunqiGgCYPuNw j7JLAleRvQFYTVr9qO8qDbQM/IKJeP8x0/v6ozOteCWQgODxGIPFM7pD30Frml2R3P2L 5/tNRgEBU3CbRLAPS8aVpBKb8HF5AR0oPwv+E72wt6bAEkTTlA9v4wKGRg+pPgfdIICP YVt5A2jSHeXWrKMm3QJO7rxgzvZZDwtZYSDB3hR6DA1cUDkW8qTTNLgUXMnDJkiBpgxI kKdUuuOAbOuRf7TYOlOPW7rGCjW6kp7r6qsUFfoY4PVwdkT4/SV1SfQ7+DiB1MfMVDon AAAA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=PH9y7yF6; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=HFmj8iYFThgrrHhPeDBbQung1FQPYVWsozJnP62Ef5o=; b=OtUfxSZ0qghmI91iE1756JW6x4x7hflU71/0Y2oA7mYEu7HZJqEltjjVrjrgWf/0rH xgeN534AVU3HZNGO9jGnT+uShf4wJAN5HZ/XLmA1a7a+FNlCLaaZylbgflFcQedjOhFz 8elRTtG+3ociNUP9JHNIFQvU8LLtr3UYu/+Hk= 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=HFmj8iYFThgrrHhPeDBbQung1FQPYVWsozJnP62Ef5o=; b=HG35qbpxY9h/W/8Fn3UqKCfIJIpgaR9lSzk/C4FSg+P5KfwPtQtOk7ovtUO4/BmcIC SRuCkcAtROFkqefctcS9rgSaIHyP6qnpiLBuM5/DazcBNIpVijbVTI5QQX2Ky4xhF6jG 8mi7K9sUGEWEFZNT+7yl64TtlGBCYx2GntgstyKzvvY+jpBSkvUo514N3XMD8LyP81Lf c8+ONgwy9n4V1HOjyo2+n7lRzUpoRNfiVeQSTVLw4sOGbAdyrXwWe5nw9GKtjzRBXAOx suDwzdib3xpifJkacObvwAiq0hYo7eP1C4xKC+BoO6w49+QBuS9WN8pe/V++KvJV1zxU UNrA== X-Gm-Message-State: APjAAAXvnhbPlTqJXW/5KXtDnqlS2GeUcTjE+ugffjgb/2I458yZMmaQ NM+FjnLphQROkuazQ+AiBUzug6MB X-Google-Smtp-Source: APXvYqwY69Sp1j8KobmE3aP/96BNpXQGK8jC1P5S788tXIYBUVucNQod0vJxQQbtkkPsvrYW7JdMeA== X-Received: by 2002:a65:5549:: with SMTP id t9mr54891463pgr.388.1556483377993; Sun, 28 Apr 2019 13:29:37 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a65:56cb:: with SMTP id w11ls506349pgs.12.gmail; Sun, 28 Apr 2019 13:29:37 -0700 (PDT) X-Received: by 2002:a63:f444:: with SMTP id p4mr55556945pgk.32.1556483377618; Sun, 28 Apr 2019 13:29:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556483377; cv=none; d=google.com; s=arc-20160816; b=BbavlgIYhqr9DiRiH3DUsCyQ2KV1eFhWCi9TvV4x4kEOefqYBiZS5WJIEjQozqL0WK Vkej1DD+FRi0eHrW2qPACCwDxMEyZPmhFwj20L90Ju7razPUE5kvMA8xi+yJLqqefap4 mjBT/7Ti7B2iFSzjj88EUjIyV1xtNWJSYfKJ6WV7NzWiwRbtkSupqeO7ln61LrxCBVcW cV0AHzJ5XbTm7o4lNBaZqBfYdiPu5fFSVdexpaehvSLzJc60zn/f4uLM/tR0g2/fsUr8 aB+iNxzudYW8vmgLbUtJ8WwlGTly3TFTr8YtntqfXElSeXx8dQoL9sYm/GlW+u1sd/1D CMmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=DvxOHgjATfWl2XuOb3BuIsm23gd4oYcGplmjAwTQIp8=; b=o3KQ9wgpTgOJZOAy7N6HeXssBvz700fmQNVxBSHvGyDU7VyJTDJ6K9l0iFxZfn2O6p Dpj/Qm0GxxbwvW/U9QlGWt/4yeCnoAl8LHg9DGXaufCp7AXgGBGwAWNoEte/ouVtFfOE VoyxwtEHVSb80BVbefwVc3NTAsjvkEC0Cuf2RP3As2xesT4fMeUE/KPhqe8uphuZVVNr ijJrc9P5oNQOAm55fJuklJCxT9ZT0j7zgCHWzui4b8WhnbgVTIFW3hv2uFd4lAkD0h2P wk176k5lr5imItNqfPwvM71vrNINH3UMtiZ13QvUB7G7+PqnZmf/1rKWl/IXfqFLfutn xE4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=PH9y7yF6; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id p2sor1782861plq.69.2019.04.28.13.29.37 for (Google Transport Security); Sun, 28 Apr 2019 13:29:37 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a17:902:6ac6:: with SMTP id i6mr58293518plt.313.1556483377368; Sun, 28 Apr 2019 13:29:37 -0700 (PDT) Received: from localhost.localdomain ([115.97.185.144]) by smtp.gmail.com with ESMTPSA id x66sm68841439pfb.78.2019.04.28.13.29.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 28 Apr 2019 13:29:36 -0700 (PDT) From: Jagan Teki To: Heiko Schocher , Tom Rini Cc: u-boot@lists.denx.de, linux-amarula@amarulasolutions.com, Mario Six Subject: [PATCH v2 13/19] spi: mpc8xxx: Rename variable Date: Mon, 29 Apr 2019 01:58:48 +0530 Message-Id: <20190428202854.8590-14-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190428202854.8590-1-jagan@amarulasolutions.com> References: <20190428202854.8590-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=PH9y7yF6; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Mario Six The variable "char_size" holds the number of bits to be transferred in the current loop iteration. A better name would be "xfer_bitlen", which we rename this variable to. Signed-off-by: Mario Six --- drivers/spi/mpc8xxx_spi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/spi/mpc8xxx_spi.c b/drivers/spi/mpc8xxx_spi.c index 83fd8b3cc1..63d956a295 100644 --- a/drivers/spi/mpc8xxx_spi.c +++ b/drivers/spi/mpc8xxx_spi.c @@ -114,10 +114,10 @@ int spi_xfer(struct spi_slave *slave, uint bitlen, const void *dout, void *din, while (num_blks--) { int tm; u32 tmpdout = 0; - uchar char_size = (bitlen >= 32 ? 32 : bitlen); + uchar xfer_bitlen = (bitlen >= 32 ? 32 : bitlen); /* Shift data so it's msb-justified */ - tmpdout = *(u32 *)dout >> (32 - char_size); + tmpdout = *(u32 *)dout >> (32 - xfer_bitlen); /* The LEN field of the SPMODE register is set as follows: * @@ -165,8 +165,8 @@ int spi_xfer(struct spi_slave *slave, uint bitlen, const void *dout, void *din, tmpdin = in_be32(&spi->rx); setbits_be32(&spi->event, SPI_EV_NE); - *(u32 *)din = (tmpdin << (32 - char_size)); - if (char_size == 32) { + *(u32 *)din = (tmpdin << (32 - xfer_bitlen)); + if (xfer_bitlen == 32) { /* Advance output buffer by 32 bits */ din += 4; }