linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/6] mmc: core: sdio_io.c: Fixed lines with > 80 chars
@ 2012-10-18 16:58 Sangho Yi
  2012-10-18 16:58 ` [PATCH 2/6] mmc: core: sdio_bus.c: Removed trailing whitespace error Sangho Yi
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Sangho Yi @ 2012-10-18 16:58 UTC (permalink / raw)
  To: paul.gortmaker, stefan.xk.nilsson, linus.walleij, ulf.hansson,
	rjw, girish.shivananjappa, cjb
  Cc: linux-kernel, linux-mmc, Sangho Yi

I fixed lines over 80 characters per line.

Signed-off-by: Sangho Yi <antiroot@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/6] mmc: core: sdio_bus.c: Removed trailing whitespace error
  2012-10-18 16:58 [PATCH 1/6] mmc: core: sdio_io.c: Fixed lines with > 80 chars Sangho Yi
@ 2012-10-18 16:58 ` Sangho Yi
  2012-10-18 16:58 ` [PATCH 3/6] mmc: core: sdio_bus.c: Fixed lines > 80 chars Sangho Yi
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Sangho Yi @ 2012-10-18 16:58 UTC (permalink / raw)
  To: paul.gortmaker, stefan.xk.nilsson, linus.walleij, ulf.hansson,
	rjw, girish.shivananjappa, cjb
  Cc: linux-kernel, linux-mmc, Sangho Yi

Removed the one unnecessary whitespace error from sdio_bus.c

Signed-off-by: Sangho Yi <antiroot@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/6] mmc: core: sdio_bus.c: Fixed lines > 80 chars
  2012-10-18 16:58 [PATCH 1/6] mmc: core: sdio_io.c: Fixed lines with > 80 chars Sangho Yi
  2012-10-18 16:58 ` [PATCH 2/6] mmc: core: sdio_bus.c: Removed trailing whitespace error Sangho Yi
@ 2012-10-18 16:58 ` Sangho Yi
  2012-10-18 16:58 ` [PATCH 4/6] mmc: core: sdio_bus.c: Removed space between func name and () Sangho Yi
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Sangho Yi @ 2012-10-18 16:58 UTC (permalink / raw)
  To: paul.gortmaker, stefan.xk.nilsson, linus.walleij, ulf.hansson,
	rjw, girish.shivananjappa, cjb
  Cc: linux-kernel, linux-mmc, Sangho Yi

I fixed lines over 80 characters per line.

Signed-off-by: Sangho Yi <antiroot@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 4/6] mmc: core: sdio_bus.c: Removed space between func name and ()
  2012-10-18 16:58 [PATCH 1/6] mmc: core: sdio_io.c: Fixed lines with > 80 chars Sangho Yi
  2012-10-18 16:58 ` [PATCH 2/6] mmc: core: sdio_bus.c: Removed trailing whitespace error Sangho Yi
  2012-10-18 16:58 ` [PATCH 3/6] mmc: core: sdio_bus.c: Fixed lines > 80 chars Sangho Yi
@ 2012-10-18 16:58 ` Sangho Yi
  2012-10-18 16:58 ` [PATCH 5/6] mmc: core: sdio_bus.c: Fixed a warning for the pr_warning( Sangho Yi
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Sangho Yi @ 2012-10-18 16:58 UTC (permalink / raw)
  To: paul.gortmaker, stefan.xk.nilsson, linus.walleij, ulf.hansson,
	rjw, girish.shivananjappa, cjb
  Cc: linux-kernel, linux-mmc, Sangho Yi

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

Signed-off-by: Sangho Yi <antiroot@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 5/6] mmc: core: sdio_bus.c: Fixed a warning for the pr_warning(...
  2012-10-18 16:58 [PATCH 1/6] mmc: core: sdio_io.c: Fixed lines with > 80 chars Sangho Yi
                   ` (2 preceding siblings ...)
  2012-10-18 16:58 ` [PATCH 4/6] mmc: core: sdio_bus.c: Removed space between func name and () Sangho Yi
@ 2012-10-18 16:58 ` Sangho Yi
  2012-10-18 16:58 ` [PATCH 6/6] mmc: core: sdio_bus.c: Removed unnecessary NULL check routine Sangho Yi
  2012-10-22  8:18 ` [PATCH 1/6] mmc: core: sdio_io.c: Fixed lines with > 80 chars Ulf Hansson
  5 siblings, 0 replies; 8+ messages in thread
From: Sangho Yi @ 2012-10-18 16:58 UTC (permalink / raw)
  To: paul.gortmaker, stefan.xk.nilsson, linus.walleij, ulf.hansson,
	rjw, girish.shivananjappa, cjb
  Cc: linux-kernel, linux-mmc, Sangho Yi

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

Signed-off-by: Sangho Yi <antiroot@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 6/6] mmc: core: sdio_bus.c: Removed unnecessary NULL check routine
  2012-10-18 16:58 [PATCH 1/6] mmc: core: sdio_io.c: Fixed lines with > 80 chars Sangho Yi
                   ` (3 preceding siblings ...)
  2012-10-18 16:58 ` [PATCH 5/6] mmc: core: sdio_bus.c: Fixed a warning for the pr_warning( Sangho Yi
@ 2012-10-18 16:58 ` Sangho Yi
  2012-10-22  8:18 ` [PATCH 1/6] mmc: core: sdio_io.c: Fixed lines with > 80 chars Ulf Hansson
  5 siblings, 0 replies; 8+ messages in thread
From: Sangho Yi @ 2012-10-18 16:58 UTC (permalink / raw)
  To: paul.gortmaker, stefan.xk.nilsson, linus.walleij, ulf.hansson,
	rjw, girish.shivananjappa, cjb
  Cc: linux-kernel, linux-mmc, Sangho Yi

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

Signed-off-by: Sangho Yi <antiroot@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/6] mmc: core: sdio_io.c: Fixed lines with > 80 chars
  2012-10-18 16:58 [PATCH 1/6] mmc: core: sdio_io.c: Fixed lines with > 80 chars Sangho Yi
                   ` (4 preceding siblings ...)
  2012-10-18 16:58 ` [PATCH 6/6] mmc: core: sdio_bus.c: Removed unnecessary NULL check routine Sangho Yi
@ 2012-10-22  8:18 ` Ulf Hansson
  5 siblings, 0 replies; 8+ messages in thread
From: Ulf Hansson @ 2012-10-22  8:18 UTC (permalink / raw)
  To: Sangho Yi
  Cc: paul.gortmaker, stefan.xk.nilsson, linus.walleij, ulf.hansson,
	rjw, girish.shivananjappa, cjb, linux-kernel, linux-mmc

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 <antiroot@gmail.com> wrote:
> I fixed lines over 80 characters per line.
>
> Signed-off-by: Sangho Yi <antiroot@gmail.com>
> ---
>  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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 2/6] mmc: core: sdio_bus.c: Removed trailing whitespace error
  2012-10-18 16:31 Sangho Yi
@ 2012-10-18 16:31 ` Sangho Yi
  0 siblings, 0 replies; 8+ messages in thread
From: Sangho Yi @ 2012-10-18 16:31 UTC (permalink / raw)
  To: paul.gortmaker, stefan.xk.nilsson, linus.walleij, ulf.hansson,
	rjw, girish.shivananjappa, cjb
  Cc: linux-kernel, linux-mmc, Sangho Yi

Removed the one unnecessary whitespace error from sdio_bus.c

Signed-off-by: Sangho Yi <antiroot@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-10-22  8:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-18 16:58 [PATCH 1/6] mmc: core: sdio_io.c: Fixed lines with > 80 chars Sangho Yi
2012-10-18 16:58 ` [PATCH 2/6] mmc: core: sdio_bus.c: Removed trailing whitespace error Sangho Yi
2012-10-18 16:58 ` [PATCH 3/6] mmc: core: sdio_bus.c: Fixed lines > 80 chars Sangho Yi
2012-10-18 16:58 ` [PATCH 4/6] mmc: core: sdio_bus.c: Removed space between func name and () Sangho Yi
2012-10-18 16:58 ` [PATCH 5/6] mmc: core: sdio_bus.c: Fixed a warning for the pr_warning( Sangho Yi
2012-10-18 16:58 ` [PATCH 6/6] mmc: core: sdio_bus.c: Removed unnecessary NULL check routine Sangho Yi
2012-10-22  8:18 ` [PATCH 1/6] mmc: core: sdio_io.c: Fixed lines with > 80 chars Ulf Hansson
  -- strict thread matches above, loose matches on Subject: below --
2012-10-18 16:31 Sangho Yi
2012-10-18 16:31 ` [PATCH 2/6] mmc: core: sdio_bus.c: Removed trailing whitespace error Sangho Yi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).