All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bartosz Golaszewski <brgl@bgdev.pl>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	linux-i2c@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Bartosz Golaszewski <brgl@bgdev.pl>
Subject: [PATCH v2 1/2] eeprom: at24: fix coding style issues
Date: Wed,  6 Dec 2017 14:01:30 +0100	[thread overview]
Message-ID: <20171206130131.13438-2-brgl@bgdev.pl> (raw)
In-Reply-To: <20171206130131.13438-1-brgl@bgdev.pl>

Fix issues reported by checkpatch for at24.c.

Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
---
 drivers/misc/eeprom/at24.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
index 625b00166117..2426f2c111c7 100644
--- a/drivers/misc/eeprom/at24.c
+++ b/drivers/misc/eeprom/at24.c
@@ -70,8 +70,8 @@ struct at24_data {
 	 */
 	struct mutex lock;
 
-	unsigned write_max;
-	unsigned num_addresses;
+	unsigned int write_max;
+	unsigned int num_addresses;
 	unsigned int offset_adj;
 
 	struct nvmem_config nvmem_config;
@@ -93,16 +93,16 @@ struct at24_data {
  *
  * This value is forced to be a power of two so that writes align on pages.
  */
-static unsigned io_limit = 128;
-module_param(io_limit, uint, 0);
+static unsigned int io_limit = 128;
+module_param(io_limit, uint, 0000);
 MODULE_PARM_DESC(io_limit, "Maximum bytes per I/O (default 128)");
 
 /*
  * Specs often allow 5 msec for a page write, sometimes 20 msec;
  * it's important to recover from write timeouts.
  */
-static unsigned write_timeout = 25;
-module_param(write_timeout, uint, 0);
+static unsigned int write_timeout = 25;
+module_param(write_timeout, uint, 0000);
 MODULE_PARM_DESC(write_timeout, "Time (in ms) to try writes (default 25)");
 
 #define AT24_SIZE_BYTELEN 5
@@ -111,8 +111,8 @@ MODULE_PARM_DESC(write_timeout, "Time (in ms) to try writes (default 25)");
 #define AT24_BITMASK(x) (BIT(x) - 1)
 
 /* create non-zero magic value for given eeprom parameters */
-#define AT24_DEVICE_MAGIC(_len, _flags) 		\
-	((1 << AT24_SIZE_FLAGS | (_flags)) 		\
+#define AT24_DEVICE_MAGIC(_len, _flags)			\
+	((1 << AT24_SIZE_FLAGS | (_flags))		\
 	    << AT24_SIZE_BYTELEN | ilog2(_len))
 
 /*
@@ -264,7 +264,7 @@ MODULE_DEVICE_TABLE(acpi, at24_acpi_ids);
 static struct at24_client *at24_translate_offset(struct at24_data *at24,
 						 unsigned int *offset)
 {
-	unsigned i;
+	unsigned int i;
 
 	if (at24->chip.flags & AT24_FLAG_ADDR16) {
 		i = *offset >> 16;
@@ -319,7 +319,7 @@ static ssize_t at24_regmap_read(struct at24_data *at24, char *buf,
 static size_t at24_adjust_write_count(struct at24_data *at24,
 				      unsigned int offset, size_t count)
 {
-	unsigned next_page;
+	unsigned int next_page;
 
 	/* write_max is at most a page */
 	if (count > at24->write_max)
@@ -515,7 +515,7 @@ static int at24_probe(struct i2c_client *client, const struct i2c_device_id *id)
 	bool writable;
 	struct at24_data *at24;
 	int err;
-	unsigned i, num_addresses;
+	unsigned int i, num_addresses;
 	const struct regmap_config *config;
 	u8 test_byte;
 
-- 
2.15.1

  reply	other threads:[~2017-12-06 13:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-06 13:01 [PATCH v2 0/2] eeprom: at24: coding style fixes Bartosz Golaszewski
2017-12-06 13:01 ` Bartosz Golaszewski [this message]
2017-12-06 13:01 ` [PATCH v2 2/2] eeprom: at24: use a common prefix for all symbols in at24.c Bartosz Golaszewski
2017-12-06 13:40   ` Peter Rosin
2017-12-06 14:29     ` Bartosz Golaszewski
2017-12-06 17:27       ` Peter Rosin

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=20171206130131.13438-2-brgl@bgdev.pl \
    --to=brgl@bgdev.pl \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=u.kleine-koenig@pengutronix.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.