Skip to contentSkip to conversation

mmc: core: sdio_io.c: Fixed lines with > 80 chars

PATCH In review Sangho Yi 2 participants 7 messages Oct 18, 2012 – Oct 22, 2012 MMC, SD and SDIO

lore
Share & tools
lore
author
#1 lore raw

PATCH 2/6 mmc: core: sdio_bus.c: Removed trailing whitespace error

In reply to Sangho Yi

Removed the one unnecessary whitespace error from sdio_bus.c

---
 drivers/mmc/core/sdio_bus.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/core/sdio_bus.c +1 -1
index 6bf6879..13146d2 100644
@@ -105,7 +105,7 @@ sdio_bus_uevent(struct device *dev, struct kobj_uevent_env *env)
 			"SDIO_CLASS=%02X", func->class))
 		return -ENOMEM;
 
-	if (add_uevent_var(env, 
+	if (add_uevent_var(env,
 			   "SDIO_ID=%04X:%04X", func->vendor, func->device))
 		return -ENOMEM;
 
Signature · 1 line
1.7.9.5
author
#2 lore raw

PATCH 3/6 mmc: core: sdio_bus.c: Fixed lines > 80 chars

In reply to Sangho Yi

I fixed lines over 80 characters per line.

---
 drivers/mmc/core/sdio_bus.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/mmc/core/sdio_bus.c +3 -2
index 13146d2..efa30eb 100644
@@ -27,7 +27,7 @@
 /* show configuration fields */
 #define sdio_config_attr(field, format_string)				\
 static ssize_t								\
-field##_show(struct device *dev, struct device_attribute *attr, char *buf)				\
+field##_show(struct device *dev, struct device_attribute *attr, char *buf)\
 {									\
 	struct sdio_func *func;						\
 									\
@@ -39,7 +39,8 @@ sdio_config_attr(class, "0x%02x\n");
 sdio_config_attr(vendor, "0x%04x\n");
 sdio_config_attr(device, "0x%04x\n");
 
-static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, char *buf)
+static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
+		char *buf)
 {
 	struct sdio_func *func = dev_to_sdio_func (dev);
 
Signature · 1 line
1.7.9.5
author
#3 lore raw

PATCH 4/6 mmc: core: sdio_bus.c: Removed space between func name and ()

In reply to Sangho Yi

Fixed a coding style warning like this:
from foo (arg) --> to foo(arg)

---
 drivers/mmc/core/sdio_bus.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/mmc/core/sdio_bus.c +3 -3
index efa30eb..1a1d96c 100644
@@ -31,8 +31,8 @@ field##_show(struct device *dev, struct device_attribute *attr, char *buf)\
 {									\
 	struct sdio_func *func;						\
 									\
-	func = dev_to_sdio_func (dev);					\
-	return sprintf (buf, format_string, func->field);		\
+	func = dev_to_sdio_func(dev);					\
+	return sprintf(buf, format_string, func->field);		\
 }
 
 sdio_config_attr(class, "0x%02x\n");
@@ -42,7 +42,7 @@ sdio_config_attr(device, "0x%04x\n");
 static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
 		char *buf)
 {
-	struct sdio_func *func = dev_to_sdio_func (dev);
+	struct sdio_func *func = dev_to_sdio_func(dev);
 
 	return sprintf(buf, "sdio:c%02Xv%04Xd%04X\n",
 			func->class, func->vendor, func->device);
Signature · 1 line
1.7.9.5
author
#4 lore raw

PATCH 5/6 mmc: core: sdio_bus.c: Fixed a warning for the pr_warning(...

In reply to Sangho Yi

I fixed a line which had the following warning:
WARNING: Prefer pr_warn(... to pr_warning(...

---
 drivers/mmc/core/sdio_bus.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/core/sdio_bus.c +1 -1
index 1a1d96c..e5b7197 100644
@@ -175,7 +175,7 @@ static int sdio_bus_remove(struct device *dev)
 	drv->remove(func);
 
 	if (func->irq_handler) {
-		pr_warning("WARNING: driver %s did not remove "
+		pr_warn("WARNING: driver %s did not remove "
 			"its interrupt handler!\n", drv->name);
 		sdio_claim_host(func);
 		sdio_release_irq(func);
Signature · 1 line
1.7.9.5
author
#5 lore raw

PATCH 6/6 mmc: core: sdio_bus.c: Removed unnecessary NULL check routine

In reply to Sangho Yi

kfree(something) is safe function, so I removed the NULL check routine for the input of kfree.

---
 drivers/mmc/core/sdio_bus.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/mmc/core/sdio_bus.c +1 -2
index e5b7197..cf02146 100644
@@ -259,8 +259,7 @@ static void sdio_release_func(struct device *dev)
 
 	sdio_free_func_cis(func);
 
-	if (func->info)
-		kfree(func->info);
+	kfree(func->info);
 
 	kfree(func);
 }
Signature · 1 line
1.7.9.5

Sangho Yi

author
#0 lore raw

PATCH 1/6 mmc: core: sdio_io.c: Fixed lines with > 80 chars

I fixed lines over 80 characters per line.

---
 drivers/mmc/core/sdio_io.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/mmc/core/sdio_io.c +4 -2
index 8f6f5ac..c5f53d8 100644
@@ -80,7 +80,8 @@ int sdio_enable_func(struct sdio_func *func)
 	timeout = jiffies + msecs_to_jiffies(func->enable_timeout);
 
 	while (1) {
-		ret = mmc_io_rw_direct(func->card, 0, 0, SDIO_CCCR_IORx, 0, &reg);
+		ret = mmc_io_rw_direct(func->card, 0, 0, SDIO_CCCR_IORx, 0,
+				&reg);
 		if (ret)
 			goto err;
 		if (reg & (1 << func->num))
@@ -664,7 +665,8 @@ void sdio_f0_writeb(struct sdio_func *func, unsigned char b, unsigned int addr,
 
 	BUG_ON(!func);
 
-	if ((addr < 0xF0 || addr > 0xFF) && (!mmc_card_lenient_fn0(func->card))) {
+	if ((addr < 0xF0 || addr > 0xFF) &&
+	    (!mmc_card_lenient_fn0(func->card))) {
 		if (err_ret)
 			*err_ret = -EINVAL;
 		return;
Signature · 1 line
1.7.9.5
#6 lore raw

Hi Sangho,

If you really must do this kind of clean up patches; from my point of view I would suggest you to collect them in one "mmc: core: Code cleanup" patch instead.

Kind regards
Ulf Hansson

Quoted 38 lines · Sangho Yi

I fixed lines over 80 characters per line.

---
 drivers/mmc/core/sdio_io.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/mmc/core/sdio_io.c +4 -3
index 8f6f5ac..c5f53d8 100644
@@ -80,7 +80,8 @@ int sdio_enable_func(struct sdio_func *func)
        timeout = jiffies + msecs_to_jiffies(func->enable_timeout);
 
        while (1) {
-               ret = mmc_io_rw_direct(func->card, 0, 0, SDIO_CCCR_IORx, 0, &reg);
+               ret = mmc_io_rw_direct(func->card, 0, 0, SDIO_CCCR_IORx, 0,
+                               &reg);
                if (ret)
                        goto err;
                if (reg & (1 << func->num))
@@ -664,7 +665,8 @@ void sdio_f0_writeb(struct sdio_func *func, unsigned char b, unsigned int addr,
 
        BUG_ON(!func);
 
-       if ((addr < 0xF0 || addr > 0xFF) && (!mmc_card_lenient_fn0(func->card))) {
+       if ((addr < 0xF0 || addr > 0xFF) &&
+           (!mmc_card_lenient_fn0(func->card))) {
                if (err_ret)
                        *err_ret = -EINVAL;
                return;
--

1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html