2012-10-18 16:59:43

by Sangho Yi

[permalink] [raw]
Subject: [PATCH 1/6] mmc: core: sdio_io.c: Fixed lines with > 80 chars

I fixed lines over 80 characters per line.

Signed-off-by: Sangho Yi <[email protected]>
---
drivers/mmc/core/sdio_io.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/core/sdio_io.c b/drivers/mmc/core/sdio_io.c
index 8f6f5ac..c5f53d8 100644
--- a/drivers/mmc/core/sdio_io.c
+++ b/drivers/mmc/core/sdio_io.c
@@ -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


2012-10-18 16:59:50

by Sangho Yi

[permalink] [raw]
Subject: [PATCH 2/6] mmc: core: sdio_bus.c: Removed trailing whitespace error

Removed the one unnecessary whitespace error from sdio_bus.c

Signed-off-by: Sangho Yi <[email protected]>
---
drivers/mmc/core/sdio_bus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/core/sdio_bus.c b/drivers/mmc/core/sdio_bus.c
index 6bf6879..13146d2 100644
--- a/drivers/mmc/core/sdio_bus.c
+++ b/drivers/mmc/core/sdio_bus.c
@@ -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;

--
1.7.9.5

2012-10-18 16:59:58

by Sangho Yi

[permalink] [raw]
Subject: [PATCH 4/6] mmc: core: sdio_bus.c: Removed space between func name and ()

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

Signed-off-by: Sangho Yi <[email protected]>
---
drivers/mmc/core/sdio_bus.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/core/sdio_bus.c b/drivers/mmc/core/sdio_bus.c
index efa30eb..1a1d96c 100644
--- a/drivers/mmc/core/sdio_bus.c
+++ b/drivers/mmc/core/sdio_bus.c
@@ -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);
--
1.7.9.5

2012-10-18 17:00:06

by Sangho Yi

[permalink] [raw]
Subject: [PATCH 6/6] mmc: core: sdio_bus.c: Removed unnecessary NULL check routine

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

Signed-off-by: Sangho Yi <[email protected]>
---
drivers/mmc/core/sdio_bus.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/mmc/core/sdio_bus.c b/drivers/mmc/core/sdio_bus.c
index e5b7197..cf02146 100644
--- a/drivers/mmc/core/sdio_bus.c
+++ b/drivers/mmc/core/sdio_bus.c
@@ -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);
}
--
1.7.9.5

2012-10-18 17:00:38

by Sangho Yi

[permalink] [raw]
Subject: [PATCH 5/6] mmc: core: sdio_bus.c: Fixed a warning for the pr_warning(...

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

Signed-off-by: Sangho Yi <[email protected]>
---
drivers/mmc/core/sdio_bus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/core/sdio_bus.c b/drivers/mmc/core/sdio_bus.c
index 1a1d96c..e5b7197 100644
--- a/drivers/mmc/core/sdio_bus.c
+++ b/drivers/mmc/core/sdio_bus.c
@@ -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);
--
1.7.9.5

2012-10-18 17:00:56

by Sangho Yi

[permalink] [raw]
Subject: [PATCH 3/6] mmc: core: sdio_bus.c: Fixed lines > 80 chars

I fixed lines over 80 characters per line.

Signed-off-by: Sangho Yi <[email protected]>
---
drivers/mmc/core/sdio_bus.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/core/sdio_bus.c b/drivers/mmc/core/sdio_bus.c
index 13146d2..efa30eb 100644
--- a/drivers/mmc/core/sdio_bus.c
+++ b/drivers/mmc/core/sdio_bus.c
@@ -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);

--
1.7.9.5

2012-10-22 08:18:30

by Ulf Hansson

[permalink] [raw]
Subject: Re: [PATCH 1/6] mmc: core: sdio_io.c: Fixed lines with > 80 chars

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

On 18 October 2012 18:58, Sangho Yi <[email protected]> wrote:
> I fixed lines over 80 characters per line.
>
> Signed-off-by: Sangho Yi <[email protected]>
> ---
> drivers/mmc/core/sdio_io.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/core/sdio_io.c b/drivers/mmc/core/sdio_io.c
> index 8f6f5ac..c5f53d8 100644
> --- a/drivers/mmc/core/sdio_io.c
> +++ b/drivers/mmc/core/sdio_io.c
> @@ -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