From: Anton Vorontsov <avorontsov@ru.mvista.com>
To: Kumar Gala <galak@kernel.crashing.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
David Brownell <dbrownell@users.sourceforge.net>,
linuxppc-dev@ozlabs.org, spi-devel-general@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: [PATCH 5/9] spi_mpc83xx: Fix checkpatch issues
Date: Fri, 1 May 2009 03:48:27 +0400 [thread overview]
Message-ID: <20090430234827.GE7901@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <20090430234739.GA27709@oksana.dev.rtsoft.ru>
Checkpatch is spitting errors when seeing the rename patch, so fix
the errors prior to moving.
Following errors and warnings were fixed:
WARNING: Use #include <linux/io.h> instead of <asm/io.h>
#1027: FILE: drivers/spi/spi_mpc8xxx.c:37:
+#include <asm/io.h>
ERROR: "foo * bar" should be "foo *bar"
#1111: FILE: drivers/spi/spi_mpc8xxx.c:121:
+static inline void mpc83xx_spi_write_reg(__be32 __iomem * reg, u32 val)
ERROR: "foo * bar" should be "foo *bar"
#1116: FILE: drivers/spi/spi_mpc8xxx.c:126:
+static inline u32 mpc83xx_spi_read_reg(__be32 __iomem * reg)
ERROR: "foo * bar" should be "foo *bar"
#1125: FILE: drivers/spi/spi_mpc8xxx.c:135:
+ type * rx = mpc83xx_spi->rx; \
ERROR: "foo * bar" should be "foo *bar"
#1135: FILE: drivers/spi/spi_mpc8xxx.c:145:
+ const type * tx = mpc83xx_spi->tx; \
WARNING: suspect code indent for conditional statements (16, 25)
#1504: FILE: drivers/spi/spi_mpc8xxx.c:514:
+ while (((event =
[...]
+ cpu_relax();
Following warnings were left over, since fixing them will
hurt the readability. We'd better fix them by lowering
the indentation level by splitting mpc83xx_spi_work function
into two parts.
WARNING: line over 80 characters
#1371: FILE: drivers/spi/spi_mpc8xxx.c:381:
+ status = mpc83xx_spi_setup_transfer(spi, t);
WARNING: line over 80 characters
#1392: FILE: drivers/spi/spi_mpc8xxx.c:402:
+ mpc83xx_spi_chipselect(spi, BITBANG_CS_INACTIVE);
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
drivers/spi/spi_mpc83xx.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/spi/spi_mpc83xx.c b/drivers/spi/spi_mpc83xx.c
index d378d5e..40f7448 100644
--- a/drivers/spi/spi_mpc83xx.c
+++ b/drivers/spi/spi_mpc83xx.c
@@ -17,6 +17,7 @@
#include <linux/bug.h>
#include <linux/errno.h>
#include <linux/err.h>
+#include <linux/io.h>
#include <linux/completion.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
@@ -34,7 +35,6 @@
#include <sysdev/fsl_soc.h>
#include <asm/irq.h>
-#include <asm/io.h>
/* SPI Controller registers */
struct mpc83xx_spi_reg {
@@ -118,12 +118,12 @@ struct spi_mpc83xx_cs {
u32 hw_mode; /* Holds HW mode register settings */
};
-static inline void mpc83xx_spi_write_reg(__be32 __iomem * reg, u32 val)
+static inline void mpc83xx_spi_write_reg(__be32 __iomem *reg, u32 val)
{
out_be32(reg, val);
}
-static inline u32 mpc83xx_spi_read_reg(__be32 __iomem * reg)
+static inline u32 mpc83xx_spi_read_reg(__be32 __iomem *reg)
{
return in_be32(reg);
}
@@ -132,7 +132,7 @@ static inline u32 mpc83xx_spi_read_reg(__be32 __iomem * reg)
static \
void mpc83xx_spi_rx_buf_##type(u32 data, struct mpc83xx_spi *mpc83xx_spi) \
{ \
- type * rx = mpc83xx_spi->rx; \
+ type *rx = mpc83xx_spi->rx; \
*rx++ = (type)(data >> mpc83xx_spi->rx_shift); \
mpc83xx_spi->rx = rx; \
}
@@ -142,7 +142,7 @@ static \
u32 mpc83xx_spi_tx_buf_##type(struct mpc83xx_spi *mpc83xx_spi) \
{ \
u32 data; \
- const type * tx = mpc83xx_spi->tx; \
+ const type *tx = mpc83xx_spi->tx; \
if (!tx) \
return 0; \
data = *tx++ << mpc83xx_spi->tx_shift; \
@@ -516,7 +516,7 @@ static irqreturn_t mpc83xx_spi_irq(s32 irq, void *context_data)
while (((event =
mpc83xx_spi_read_reg(&mpc83xx_spi->base->event)) &
SPIE_NF) == 0)
- cpu_relax();
+ cpu_relax();
mpc83xx_spi->count -= 1;
if (mpc83xx_spi->count) {
--
1.6.2.2
next prev parent reply other threads:[~2009-04-30 23:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-30 23:47 [PATCH 0/9] Some work for spi_mpc83xx driver, spi-mmc support for MPC8610HPCD Anton Vorontsov
2009-04-30 23:48 ` [PATCH 1/9] spi_mpc83xx: Handles other Freescale processors Anton Vorontsov
2009-04-30 23:48 ` [PATCH 2/9] spi_mpc83xx: Quieten down the "Requested speed is too low" message Anton Vorontsov
2009-04-30 23:48 ` [PATCH 3/9] spi_mpc83xx: Add small delay after asserting chip-select line Anton Vorontsov
2009-04-30 23:48 ` [PATCH 4/9] powerpc/86xx: Add MMC SPI support for MPC8610HPCD boards Anton Vorontsov
2009-04-30 23:48 ` Anton Vorontsov [this message]
2009-04-30 23:48 ` [PATCH 6/9] spi_mpc83xx: Split mpc83xx_spi_work() into two routines Anton Vorontsov
2009-04-30 23:48 ` [PATCH 7/9] spi_mpc83xx: Remove dead code Anton Vorontsov
2009-04-30 23:48 ` [PATCH 8/9] spi_mpc83xx: Rename spi_83xx.c to spi_8xxx.c Anton Vorontsov
2009-04-30 23:48 ` [PATCH 9/9] spi_mpc8xxx: s/83xx/8xxx/g Anton Vorontsov
2009-05-01 21:42 ` [spi-devel-general] " Grant Likely
2009-05-04 20:53 ` Andrew Morton
2009-05-04 23:36 ` Anton Vorontsov
2009-05-04 20:55 ` [PATCH 0/9] Some work for spi_mpc83xx driver, spi-mmc support for MPC8610HPCD Andrew Morton
2009-05-04 23:36 ` Anton Vorontsov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090430234827.GE7901@oksana.dev.rtsoft.ru \
--to=avorontsov@ru.mvista.com \
--cc=akpm@linux-foundation.org \
--cc=dbrownell@users.sourceforge.net \
--cc=galak@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=spi-devel-general@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox