All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mario Six <mario.six@gdsys.cc>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 01/18] spi: mpc8xxx: Use short type names
Date: Thu, 19 Apr 2018 14:36:16 +0200	[thread overview]
Message-ID: <20180419123633.32172-2-mario.six@gdsys.cc> (raw)
In-Reply-To: <20180419123633.32172-1-mario.six@gdsys.cc>

The function signatures in the driver are quite long as is. Use short
type names (uint etc.) to make them more readable.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
---
 drivers/spi/mpc8xxx_spi.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
---

Changes v1 -> v2:
None

---
diff --git a/drivers/spi/mpc8xxx_spi.c b/drivers/spi/mpc8xxx_spi.c
index 00cbcbf9fc..2e1a6caf03 100644
--- a/drivers/spi/mpc8xxx_spi.c
+++ b/drivers/spi/mpc8xxx_spi.c
@@ -21,8 +21,7 @@

 #define SPI_TIMEOUT	1000

-struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
-		unsigned int max_hz, unsigned int mode)
+struct spi_slave *spi_setup_slave(uint bus, uint cs, uint max_hz, uint mode)
 {
 	struct spi_slave *slave;

@@ -69,17 +68,16 @@ int spi_claim_bus(struct spi_slave *slave)

 void spi_release_bus(struct spi_slave *slave)
 {
-
 }

-int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout,
-		void *din, unsigned long flags)
+int spi_xfer(struct spi_slave *slave, uint bitlen, const void *dout, void *din,
+	     ulong flags)
 {
 	volatile spi8xxx_t *spi = &((immap_t *) (CONFIG_SYS_IMMR))->spi;
-	unsigned int tmpdout, tmpdin, event;
+	uint tmpdout, tmpdin, event;
 	int numBlks = DIV_ROUND_UP(bitlen, 32);
 	int tm, isRead = 0;
-	unsigned char charSize = 32;
+	uchar charSize = 32;

 	debug("spi_xfer: slave %u:%u dout %08X din %08X bitlen %u\n",
 	      slave->bus, slave->cs, *(uint *) dout, *(uint *) din, bitlen);
--
2.16.1

  reply	other threads:[~2018-04-19 12:36 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-19 12:36 [U-Boot] [PATCH v2 00/18] spi: mpc8xxx: DM conversion Mario Six
2018-04-19 12:36 ` Mario Six [this message]
2018-04-19 12:36 ` [U-Boot] [PATCH v2 02/18] spi: mpc8xxx: Fix comments Mario Six
2018-04-19 12:36 ` [U-Boot] [PATCH v2 03/18] spi: mpc8xxx: Rename camel-case variables Mario Six
2018-04-19 12:36 ` [U-Boot] [PATCH v2 04/18] spi: mpc8xxx: Fix space after cast Mario Six
2018-04-19 12:36 ` [U-Boot] [PATCH v2 05/18] spi: mpc8xxx: Fix function names in strings Mario Six
2018-04-19 12:36 ` [U-Boot] [PATCH v2 06/18] spi: mpc8xxx: Replace defines with enums Mario Six
2018-04-19 12:36 ` [U-Boot] [PATCH v2 07/18] spi: mpc8xxx: Use IO accessors Mario Six
2018-04-19 12:36 ` [U-Boot] [PATCH v2 08/18] spi: mpc8xxx: Simplify if Mario Six
2018-04-19 12:36 ` [U-Boot] [PATCH v2 09/18] spi: mpc8xxx: Get rid of is_read Mario Six
2018-04-19 12:36 ` [U-Boot] [PATCH v2 10/18] spi: mpc8xxx: Simplify logic a bit Mario Six
2018-04-19 12:36 ` [U-Boot] [PATCH v2 11/18] spi: mpc8xxx: Reduce scope of loop variables Mario Six
2018-04-19 12:36 ` [U-Boot] [PATCH v2 12/18] spi: mpc8xxx: Make code more readable Mario Six
2018-04-19 12:36 ` [U-Boot] [PATCH v2 13/18] spi: mpc8xxx: Rename variable Mario Six
2018-04-19 12:36 ` [U-Boot] [PATCH v2 14/18] spi: mpc8xxx: Document LEN setting better Mario Six
2018-04-19 12:36 ` [U-Boot] [PATCH v2 15/18] spi: mpc8xxx: Re-order transfer setup Mario Six
2018-04-19 12:36 ` [U-Boot] [PATCH v2 16/18] spi: mpc8xxx: Fix if check Mario Six
2018-04-19 12:36 ` [U-Boot] [PATCH v2 17/18] spi: mpc8xxx: Use get_timer Mario Six
2018-04-19 12:36 ` [U-Boot] [PATCH v2 18/18] spi: mpc8xxx: Convert to DM Mario Six
2018-04-26  5:34   ` Jagan Teki
2018-04-26  5:43     ` Mario Six
2018-04-26  5:49       ` Jagan Teki
2018-04-26  5:55         ` Mario Six
2018-04-26  5:30 ` [U-Boot] [PATCH v2 00/18] spi: mpc8xxx: DM conversion Jagan Teki
2018-04-26  5:54   ` Mario Six
2018-04-26  6:05     ` Jagan Teki
2018-04-26  8:23       ` Joakim Tjernlund
2018-04-26  8:36         ` Mario Six
2018-08-10  7:35           ` Christophe LEROY
2018-08-10  7:57             ` Mario Six
2018-08-10  8:13               ` Jagan Teki
2018-08-21 15:12               ` Christophe LEROY
2018-09-04  6:09                 ` Jagan Teki
2018-09-04 11:55                   ` Mario Six

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=20180419123633.32172-2-mario.six@gdsys.cc \
    --to=mario.six@gdsys.cc \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.