From patchwork Sun Apr 28 20:28:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 319 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 099673F08F for ; Sun, 28 Apr 2019 22:29:15 +0200 (CEST) Received: by mail-pf1-f198.google.com with SMTP id f64sf6114481pfb.11 for ; Sun, 28 Apr 2019 13:29:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1556483353; cv=pass; d=google.com; s=arc-20160816; b=HEwJB38RQR1vSxx1EDb/5VPVAjWoAZR4ThfC45SigJQJSKnyb4Id9pHF/nHX1ofMZ4 pVvi/yb6myKkIydmRrSFAR3rEpq7HCbhKfdBh60Mlk2pyq21jd+KKYem9jZgKS9w+Hvn Hbu34UA12Yy6TTPeq2PPAFO4nRQfirpqqbjcCM+VZtN/syLpq2qePFHqfW8FAXP638rq eabxWOJj3Li9z0Oy4H4uLT3s5BJEK3T3t3l13lNzpcK+X6xLIHQHvoIZZkGcwwzZE7a9 5b91nCy2DH27g15ol5eBswnXKFTrMtgvHQzjYSB64QeumjWD0VpqoUYHasY3XFABCLiC AG8g== 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=f9CoABwT+3GcekCCxW0upEXyprX3mM7YuG7c6GHi1+o=; b=MXkVxYjYu4JP8Z8mX9yfkjpvgLSmLssegH4P36C6IvOLMiuJ6BJ22LYG+WdLnfqdcQ RGeYyKLHBtm7dzU8tlx94WwlE5Cmu94ybJLfVusYLSsaMLjbSABfUQvOtrZfmRUJ3F/s McLbs3g7FigfsRrdu1fwhOMZhO+hr3Nuvcz0c0MJgBSMpcUaPOpAgKZBPHtKFyQ9nebe 2USAKsa897rzCcURqFlbrv6ZCE5T6bt2STNSugMg0rDYC8tn/jiVQfRF1Bc5mWkqR4D0 iLl4uGE8lQJfNvx+XxTktECOs4mSlMIeUqQmq8hFUXaR8PuqjN2Nm7pDB4bTmHFgdc2H qy4g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="N4/zEtFH"; 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=f9CoABwT+3GcekCCxW0upEXyprX3mM7YuG7c6GHi1+o=; b=nQrEroTKgNGpZ9SxAbsp33rqaR2yyTKIja7mpMWklCvWOf3luNnY/nXKGRUwGBvWZX 8sYzvZnPIOT1QYCde2b1fNOeAfA8+K0x45labT2ikd8U96qruikoLHphfKTrvKSgGoU2 XzWE5PnFN/R7s3iZrYjmBYJYtKcMS9HgTM/Uw= 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=f9CoABwT+3GcekCCxW0upEXyprX3mM7YuG7c6GHi1+o=; b=sBVdIegPh3V0XGYZwGTuAUe0ZycWdpC3nriBwwrEdXVH10eMzhqISiKR35JbWyRuqi 6CF02dtYkWZPXJG3PwfGEaFg1oN1VIVIo2xwPJq5lL1IO/AeCq5viovme63p4b/luVRT eIWinFEDktKHUk8QtMBV0/E0V2y2hVmBSoBBoBMygOS7sBbSSOnTT32T73LXRl9qAzYb /CtLDTUBpgWs6r3olCYPXVoZBbEN10vgZ2kJ6Atd6CX8jfH1+BPVScUCakhmqAgTrhGA HPeAAUFm+Un8rCD1w7L/bFZxbQ8ionF9jCLoYcZrC9NoRGLaG6E0Zzfgbjddqt5iwcpp oh6g== X-Gm-Message-State: APjAAAXW927xgSHrlNObfULm0RSSgSvC66k0ZafQkmmCG/pk5WKz7Wf+ PxMlYWZrrv5LwgCrua3hVgDqqfl0 X-Google-Smtp-Source: APXvYqxtz2pi3pJqEXAVwG+R2/SSZZJbAIzTzwIwy57mPEhIjLeILOl1AR+LrV8Caft9YwYDXYgR5A== X-Received: by 2002:a17:902:4643:: with SMTP id o61mr13882pld.95.1556483353846; Sun, 28 Apr 2019 13:29:13 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:aa08:: with SMTP id be8ls8387238plb.14.gmail; Sun, 28 Apr 2019 13:29:13 -0700 (PDT) X-Received: by 2002:a17:902:9304:: with SMTP id bc4mr59105959plb.312.1556483353471; Sun, 28 Apr 2019 13:29:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556483353; cv=none; d=google.com; s=arc-20160816; b=Rf8WhZT6TqaAtN1s2Bealnz6IWE1VOYOfSBvTYZG5/P65VrCfpuxnc+/L31fqihgvW KYRmJ9tO2TSTcijnawLnF+Uzw5eFTGH1HP1TzG2AR4uMU7+L5V/PibHT9eqr/PcM6m47 syjC4Jvgtb7nUNZ4s4WLKMZYxlIClmT5Caf3lSYZHNb1x5CyGk4cyH1KLEZ9GATWAy72 7H2G7is/Uya+MbGUpcmNBhTMiTvhC75RZ2KwHxkP1CpSOYlp5e/QkvH/bvmigQcQ7vul GzE6PqImlMG650Gb9kLQnKiq85bexVT4sexR/ecRdhle5G45TWWRCfMSYBiQqGcK6mz+ CpZg== 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=TXnmJXWzQZbceoQ13rsAItoSdwmGHt2K3HR8Es2Fhzs=; b=uE2lmd7cNpcARDVhHuGJJ0y0XQn7V06zuZ4Z8UYqnGZUSfQutU+ZM3tFLCoVXfS8y7 rOjl6UThirzWcy1YUMrSU0A3mSpxZbfrn2O48xajBm5iARZ7M7dW51rNATRnkhxG97h2 j2UBnzN+gk34sJsiwQh5Tetph5k41dYfUTpcJ2b9cqD/A0Gs6hArwm+l7JaqWjex37J9 h7EeuPhIigypRqlSlA6/flO4ADFhXSA+eob0RwawMG0WdbJWY8+HyVAAiiaMbMBluhbA X/5HWzd6FnebZ1qamlvKx7SZndCeKmmNxHxFZZIbzgWzVOJAa4HDZa9HQCWhvjb03B2G fcWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="N4/zEtFH"; 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 i73sor6723622pgd.68.2019.04.28.13.29.13 for (Google Transport Security); Sun, 28 Apr 2019 13:29:13 -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:a63:1654:: with SMTP id 20mr10034237pgw.166.1556483353171; Sun, 28 Apr 2019 13:29:13 -0700 (PDT) Received: from localhost.localdomain ([115.97.185.144]) by smtp.gmail.com with ESMTPSA id x66sm68841439pfb.78.2019.04.28.13.29.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 28 Apr 2019 13:29:12 -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 03/19] spi: mpc8xxx: Rename camel-case variables Date: Mon, 29 Apr 2019 01:58:38 +0530 Message-Id: <20190428202854.8590-4-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="N4/zEtFH"; 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 There are three variables that have camel-case names, which is not the preferred naming style. Give those variables more compliant names instead. Signed-off-by: Mario Six --- drivers/spi/mpc8xxx_spi.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/spi/mpc8xxx_spi.c b/drivers/spi/mpc8xxx_spi.c index 3016cfe2ca..0393765b6f 100644 --- a/drivers/spi/mpc8xxx_spi.c +++ b/drivers/spi/mpc8xxx_spi.c @@ -77,9 +77,9 @@ int spi_xfer(struct spi_slave *slave, uint bitlen, const void *dout, void *din, { volatile spi8xxx_t *spi = &((immap_t *) (CONFIG_SYS_IMMR))->spi; uint tmpdout, tmpdin, event; - int numBlks = DIV_ROUND_UP(bitlen, 32); - int tm, isRead = 0; - uchar charSize = 32; + int num_blks = DIV_ROUND_UP(bitlen, 32); + int tm, is_read = 0; + uchar char_size = 32; debug("spi_xfer: slave %u:%u dout %08X din %08X bitlen %u\n", slave->bus, slave->cs, *(uint *) dout, *(uint *) din, bitlen); @@ -91,12 +91,12 @@ int spi_xfer(struct spi_slave *slave, uint bitlen, const void *dout, void *din, spi->event = 0xffffffff; /* Handle data in 32-bit chunks */ - while (numBlks--) { + while (num_blks--) { tmpdout = 0; - charSize = (bitlen >= 32 ? 32 : bitlen); + char_size = (bitlen >= 32 ? 32 : bitlen); /* Shift data so it's msb-justified */ - tmpdout = *(u32 *) dout >> (32 - charSize); + tmpdout = *(u32 *) dout >> (32 - char_size); /* The LEN field of the SPMODE register is set as follows: * @@ -134,15 +134,15 @@ int spi_xfer(struct spi_slave *slave, uint bitlen, const void *dout, void *din, * or time out (1 second = 1000 ms) * The NE event must be read and cleared first */ - for (tm = 0, isRead = 0; tm < SPI_TIMEOUT; ++tm) { + for (tm = 0, is_read = 0; tm < SPI_TIMEOUT; ++tm) { event = spi->event; if (event & SPI_EV_NE) { tmpdin = spi->rx; spi->event |= SPI_EV_NE; - isRead = 1; + is_read = 1; - *(u32 *) din = (tmpdin << (32 - charSize)); - if (charSize == 32) { + *(u32 *) din = (tmpdin << (32 - char_size)); + if (char_size == 32) { /* Advance output buffer by 32 bits */ din += 4; } @@ -153,7 +153,7 @@ int spi_xfer(struct spi_slave *slave, uint bitlen, const void *dout, void *din, * in the future put an arbitrary delay after writing * the device. Arbitrary delays suck, though... */ - if (isRead && (event & SPI_EV_NF)) + if (is_read && (event & SPI_EV_NF)) break; } if (tm >= SPI_TIMEOUT)