2008-07-09 10:49:45

by Ben Dooks

[permalink] [raw]
Subject: [patch 2/4] MFD: Coding style fixes

Fix some coding style fixes in the mfd core driver.

Signed-off-by: Ben Dooks <[email protected]>

Index: linux-2.6.26-rc9-next20080709/drivers/mfd/mfd-core.c
===================================================================
--- linux-2.6.26-rc9-next20080709.orig/drivers/mfd/mfd-core.c 2008-07-09 10:43:54.000000000 +0100
+++ linux-2.6.26-rc9-next20080709/drivers/mfd/mfd-core.c 2008-07-09 10:44:45.000000000 +0100
@@ -16,9 +16,9 @@
#include <linux/mfd/core.h>

static int mfd_add_device(struct platform_device *parent,
- const struct mfd_cell *cell,
- struct resource *mem_base,
- int irq_base)
+ const struct mfd_cell *cell,
+ struct resource *mem_base,
+ int irq_base)
{
struct resource res[cell->num_resources];
struct platform_device *pdev;
@@ -75,11 +75,10 @@ fail_alloc:
return ret;
}

-int mfd_add_devices(
- struct platform_device *parent,
- const struct mfd_cell *cells, int n_devs,
- struct resource *mem_base,
- int irq_base)
+int mfd_add_devices(struct platform_device *parent,
+ const struct mfd_cell *cells, int n_devs,
+ struct resource *mem_base,
+ int irq_base)
{
int i;
int ret = 0;
Index: linux-2.6.26-rc9-next20080709/include/linux/mfd/core.h
===================================================================
--- linux-2.6.26-rc9-next20080709.orig/include/linux/mfd/core.h 2008-07-09 10:43:54.000000000 +0100
+++ linux-2.6.26-rc9-next20080709/include/linux/mfd/core.h 2008-07-09 10:44:45.000000000 +0100
@@ -1,5 +1,3 @@
-#ifndef MFD_CORE_H
-#define MFD_CORE_H
/*
* drivers/mfd/mfd-core.h
*
@@ -13,6 +11,9 @@
*
*/

+#ifndef MFD_CORE_H
+#define MFD_CORE_H
+
#include <linux/platform_device.h>

/*
@@ -38,17 +39,15 @@ struct mfd_cell {
const struct resource *resources;
};

-static inline struct mfd_cell *
-mfd_get_cell(struct platform_device *pdev)
+static inline struct mfd_cell *mfd_get_cell(struct platform_device *pdev)
{
return (struct mfd_cell *)pdev->dev.platform_data;
}

-extern int mfd_add_devices(
- struct platform_device *parent,
- const struct mfd_cell *cells, int n_devs,
- struct resource *mem_base,
- int irq_base);
+extern int mfd_add_devices(struct platform_device *parent,
+ const struct mfd_cell *cells, int n_devs,
+ struct resource *mem_base,
+ int irq_base);

extern void mfd_remove_devices(struct platform_device *parent);


--


2008-07-09 11:11:41

by Dmitry Baryshkov

[permalink] [raw]
Subject: Re: [patch 2/4] MFD: Coding style fixes

2008/7/9 Ben Dooks <[email protected]>:
> Fix some coding style fixes in the mfd core driver.
>
> Signed-off-by: Ben Dooks <[email protected]>

I don't have a strong feeling about this. As it's pretty much only
whitespace changes,
my feelings are closer to NAK. Leaving decision to Samuel or Ian.

>
> Index: linux-2.6.26-rc9-next20080709/drivers/mfd/mfd-core.c
> ===================================================================
> --- linux-2.6.26-rc9-next20080709.orig/drivers/mfd/mfd-core.c 2008-07-09 10:43:54.000000000 +0100
> +++ linux-2.6.26-rc9-next20080709/drivers/mfd/mfd-core.c 2008-07-09 10:44:45.000000000 +0100
> @@ -16,9 +16,9 @@
> #include <linux/mfd/core.h>
>
> static int mfd_add_device(struct platform_device *parent,
> - const struct mfd_cell *cell,
> - struct resource *mem_base,
> - int irq_base)
> + const struct mfd_cell *cell,
> + struct resource *mem_base,
> + int irq_base)
> {
> struct resource res[cell->num_resources];
> struct platform_device *pdev;
> @@ -75,11 +75,10 @@ fail_alloc:
> return ret;
> }
>
> -int mfd_add_devices(
> - struct platform_device *parent,
> - const struct mfd_cell *cells, int n_devs,
> - struct resource *mem_base,
> - int irq_base)
> +int mfd_add_devices(struct platform_device *parent,
> + const struct mfd_cell *cells, int n_devs,
> + struct resource *mem_base,
> + int irq_base)
> {
> int i;
> int ret = 0;
> Index: linux-2.6.26-rc9-next20080709/include/linux/mfd/core.h
> ===================================================================
> --- linux-2.6.26-rc9-next20080709.orig/include/linux/mfd/core.h 2008-07-09 10:43:54.000000000 +0100
> +++ linux-2.6.26-rc9-next20080709/include/linux/mfd/core.h 2008-07-09 10:44:45.000000000 +0100
> @@ -1,5 +1,3 @@
> -#ifndef MFD_CORE_H
> -#define MFD_CORE_H
> /*
> * drivers/mfd/mfd-core.h
> *
> @@ -13,6 +11,9 @@
> *
> */
>
> +#ifndef MFD_CORE_H
> +#define MFD_CORE_H
> +
> #include <linux/platform_device.h>
>
> /*
> @@ -38,17 +39,15 @@ struct mfd_cell {
> const struct resource *resources;
> };
>
> -static inline struct mfd_cell *
> -mfd_get_cell(struct platform_device *pdev)
> +static inline struct mfd_cell *mfd_get_cell(struct platform_device *pdev)
> {
> return (struct mfd_cell *)pdev->dev.platform_data;
> }
>
> -extern int mfd_add_devices(
> - struct platform_device *parent,
> - const struct mfd_cell *cells, int n_devs,
> - struct resource *mem_base,
> - int irq_base);
> +extern int mfd_add_devices(struct platform_device *parent,
> + const struct mfd_cell *cells, int n_devs,
> + struct resource *mem_base,
> + int irq_base);
>
> extern void mfd_remove_devices(struct platform_device *parent);
>
>
> --
>



--
With best wishes
Dmitry

2008-07-09 11:13:18

by Ben Dooks

[permalink] [raw]
Subject: Re: [patch 2/4] MFD: Coding style fixes

On Wed, Jul 09, 2008 at 03:11:21PM +0400, Dmitry wrote:
> 2008/7/9 Ben Dooks <[email protected]>:
> > Fix some coding style fixes in the mfd core driver.
> >
> > Signed-off-by: Ben Dooks <[email protected]>
>
> I don't have a strong feeling about this. As it's pretty much only
> whitespace changes,
> my feelings are closer to NAK. Leaving decision to Samuel or Ian.

The coding style is all over the place, this makes it far more readable.

> >
> > Index: linux-2.6.26-rc9-next20080709/drivers/mfd/mfd-core.c
> > ===================================================================
> > --- linux-2.6.26-rc9-next20080709.orig/drivers/mfd/mfd-core.c 2008-07-09 10:43:54.000000000 +0100
> > +++ linux-2.6.26-rc9-next20080709/drivers/mfd/mfd-core.c 2008-07-09 10:44:45.000000000 +0100
> > @@ -16,9 +16,9 @@
> > #include <linux/mfd/core.h>
> >
> > static int mfd_add_device(struct platform_device *parent,
> > - const struct mfd_cell *cell,
> > - struct resource *mem_base,
> > - int irq_base)
> > + const struct mfd_cell *cell,
> > + struct resource *mem_base,
> > + int irq_base)
> > {
> > struct resource res[cell->num_resources];
> > struct platform_device *pdev;
> > @@ -75,11 +75,10 @@ fail_alloc:
> > return ret;
> > }
> >
> > -int mfd_add_devices(
> > - struct platform_device *parent,
> > - const struct mfd_cell *cells, int n_devs,
> > - struct resource *mem_base,
> > - int irq_base)
> > +int mfd_add_devices(struct platform_device *parent,
> > + const struct mfd_cell *cells, int n_devs,
> > + struct resource *mem_base,
> > + int irq_base)
> > {
> > int i;
> > int ret = 0;
> > Index: linux-2.6.26-rc9-next20080709/include/linux/mfd/core.h
> > ===================================================================
> > --- linux-2.6.26-rc9-next20080709.orig/include/linux/mfd/core.h 2008-07-09 10:43:54.000000000 +0100
> > +++ linux-2.6.26-rc9-next20080709/include/linux/mfd/core.h 2008-07-09 10:44:45.000000000 +0100
> > @@ -1,5 +1,3 @@
> > -#ifndef MFD_CORE_H
> > -#define MFD_CORE_H
> > /*
> > * drivers/mfd/mfd-core.h
> > *
> > @@ -13,6 +11,9 @@
> > *
> > */
> >
> > +#ifndef MFD_CORE_H
> > +#define MFD_CORE_H
> > +
> > #include <linux/platform_device.h>
> >
> > /*
> > @@ -38,17 +39,15 @@ struct mfd_cell {
> > const struct resource *resources;
> > };
> >
> > -static inline struct mfd_cell *
> > -mfd_get_cell(struct platform_device *pdev)
> > +static inline struct mfd_cell *mfd_get_cell(struct platform_device *pdev)
> > {
> > return (struct mfd_cell *)pdev->dev.platform_data;
> > }
> >
> > -extern int mfd_add_devices(
> > - struct platform_device *parent,
> > - const struct mfd_cell *cells, int n_devs,
> > - struct resource *mem_base,
> > - int irq_base);
> > +extern int mfd_add_devices(struct platform_device *parent,
> > + const struct mfd_cell *cells, int n_devs,
> > + struct resource *mem_base,
> > + int irq_base);
> >
> > extern void mfd_remove_devices(struct platform_device *parent);
> >
> >
> > --
> >
>
>
>
> --
> With best wishes
> Dmitry

--
--
Ben

Q: What's a light-year?
A: One-third less calories than a regular year.

2008-07-09 11:48:18

by Ian molton

[permalink] [raw]
Subject: Re: [patch 2/4] MFD: Coding style fixes

On Wed, 2008-07-09 at 15:11 +0400, Dmitry wrote:
> > Signed-off-by: Ben Dooks <[email protected]>
>
> I don't have a strong feeling about this. As it's pretty much only
> whitespace changes, my feelings are closer to NAK. Leaving decision
> to Samuel or Ian.

I like whitespace-fixing patches... so I'm ok with it.

2008-07-10 14:46:50

by Samuel Ortiz

[permalink] [raw]
Subject: Re: [patch 2/4] MFD: Coding style fixes

On Wed, Jul 09, 2008 at 12:12:56PM +0100, Ben Dooks wrote:
> On Wed, Jul 09, 2008 at 03:11:21PM +0400, Dmitry wrote:
> > 2008/7/9 Ben Dooks <[email protected]>:
> > > Fix some coding style fixes in the mfd core driver.
> > >
> > > Signed-off-by: Ben Dooks <[email protected]>
> >
> > I don't have a strong feeling about this. As it's pretty much only
> > whitespace changes,
> > my feelings are closer to NAK. Leaving decision to Samuel or Ian.
>
> The coding style is all over the place, this makes it far more readable.
I agree.
I'll apply it after the merge window as well.

Cheers,
Samuel.


> > >
> > > Index: linux-2.6.26-rc9-next20080709/drivers/mfd/mfd-core.c
> > > ===================================================================
> > > --- linux-2.6.26-rc9-next20080709.orig/drivers/mfd/mfd-core.c 2008-07-09 10:43:54.000000000 +0100
> > > +++ linux-2.6.26-rc9-next20080709/drivers/mfd/mfd-core.c 2008-07-09 10:44:45.000000000 +0100
> > > @@ -16,9 +16,9 @@
> > > #include <linux/mfd/core.h>
> > >
> > > static int mfd_add_device(struct platform_device *parent,
> > > - const struct mfd_cell *cell,
> > > - struct resource *mem_base,
> > > - int irq_base)
> > > + const struct mfd_cell *cell,
> > > + struct resource *mem_base,
> > > + int irq_base)
> > > {
> > > struct resource res[cell->num_resources];
> > > struct platform_device *pdev;
> > > @@ -75,11 +75,10 @@ fail_alloc:
> > > return ret;
> > > }
> > >
> > > -int mfd_add_devices(
> > > - struct platform_device *parent,
> > > - const struct mfd_cell *cells, int n_devs,
> > > - struct resource *mem_base,
> > > - int irq_base)
> > > +int mfd_add_devices(struct platform_device *parent,
> > > + const struct mfd_cell *cells, int n_devs,
> > > + struct resource *mem_base,
> > > + int irq_base)
> > > {
> > > int i;
> > > int ret = 0;
> > > Index: linux-2.6.26-rc9-next20080709/include/linux/mfd/core.h
> > > ===================================================================
> > > --- linux-2.6.26-rc9-next20080709.orig/include/linux/mfd/core.h 2008-07-09 10:43:54.000000000 +0100
> > > +++ linux-2.6.26-rc9-next20080709/include/linux/mfd/core.h 2008-07-09 10:44:45.000000000 +0100
> > > @@ -1,5 +1,3 @@
> > > -#ifndef MFD_CORE_H
> > > -#define MFD_CORE_H
> > > /*
> > > * drivers/mfd/mfd-core.h
> > > *
> > > @@ -13,6 +11,9 @@
> > > *
> > > */
> > >
> > > +#ifndef MFD_CORE_H
> > > +#define MFD_CORE_H
> > > +
> > > #include <linux/platform_device.h>
> > >
> > > /*
> > > @@ -38,17 +39,15 @@ struct mfd_cell {
> > > const struct resource *resources;
> > > };
> > >
> > > -static inline struct mfd_cell *
> > > -mfd_get_cell(struct platform_device *pdev)
> > > +static inline struct mfd_cell *mfd_get_cell(struct platform_device *pdev)
> > > {
> > > return (struct mfd_cell *)pdev->dev.platform_data;
> > > }
> > >
> > > -extern int mfd_add_devices(
> > > - struct platform_device *parent,
> > > - const struct mfd_cell *cells, int n_devs,
> > > - struct resource *mem_base,
> > > - int irq_base);
> > > +extern int mfd_add_devices(struct platform_device *parent,
> > > + const struct mfd_cell *cells, int n_devs,
> > > + struct resource *mem_base,
> > > + int irq_base);
> > >
> > > extern void mfd_remove_devices(struct platform_device *parent);
> > >
> > >
> > > --
> > >
> >
> >
> >
> > --
> > With best wishes
> > Dmitry
>
> --
> --
> Ben
>
> Q: What's a light-year?
> A: One-third less calories than a regular year.
>

2008-07-29 00:07:40

by Samuel Ortiz

[permalink] [raw]
Subject: Re: [patch 2/4] MFD: Coding style fixes

On Wed, Jul 09, 2008 at 11:49:18AM +0100, Ben Dooks wrote:
> Fix some coding style fixes in the mfd core driver.
>
> Signed-off-by: Ben Dooks <[email protected]>
Applied as well, thanks.

Cheers,
Samuel.

> Index: linux-2.6.26-rc9-next20080709/drivers/mfd/mfd-core.c
> ===================================================================
> --- linux-2.6.26-rc9-next20080709.orig/drivers/mfd/mfd-core.c 2008-07-09 10:43:54.000000000 +0100
> +++ linux-2.6.26-rc9-next20080709/drivers/mfd/mfd-core.c 2008-07-09 10:44:45.000000000 +0100
> @@ -16,9 +16,9 @@
> #include <linux/mfd/core.h>
>
> static int mfd_add_device(struct platform_device *parent,
> - const struct mfd_cell *cell,
> - struct resource *mem_base,
> - int irq_base)
> + const struct mfd_cell *cell,
> + struct resource *mem_base,
> + int irq_base)
> {
> struct resource res[cell->num_resources];
> struct platform_device *pdev;
> @@ -75,11 +75,10 @@ fail_alloc:
> return ret;
> }
>
> -int mfd_add_devices(
> - struct platform_device *parent,
> - const struct mfd_cell *cells, int n_devs,
> - struct resource *mem_base,
> - int irq_base)
> +int mfd_add_devices(struct platform_device *parent,
> + const struct mfd_cell *cells, int n_devs,
> + struct resource *mem_base,
> + int irq_base)
> {
> int i;
> int ret = 0;
> Index: linux-2.6.26-rc9-next20080709/include/linux/mfd/core.h
> ===================================================================
> --- linux-2.6.26-rc9-next20080709.orig/include/linux/mfd/core.h 2008-07-09 10:43:54.000000000 +0100
> +++ linux-2.6.26-rc9-next20080709/include/linux/mfd/core.h 2008-07-09 10:44:45.000000000 +0100
> @@ -1,5 +1,3 @@
> -#ifndef MFD_CORE_H
> -#define MFD_CORE_H
> /*
> * drivers/mfd/mfd-core.h
> *
> @@ -13,6 +11,9 @@
> *
> */
>
> +#ifndef MFD_CORE_H
> +#define MFD_CORE_H
> +
> #include <linux/platform_device.h>
>
> /*
> @@ -38,17 +39,15 @@ struct mfd_cell {
> const struct resource *resources;
> };
>
> -static inline struct mfd_cell *
> -mfd_get_cell(struct platform_device *pdev)
> +static inline struct mfd_cell *mfd_get_cell(struct platform_device *pdev)
> {
> return (struct mfd_cell *)pdev->dev.platform_data;
> }
>
> -extern int mfd_add_devices(
> - struct platform_device *parent,
> - const struct mfd_cell *cells, int n_devs,
> - struct resource *mem_base,
> - int irq_base);
> +extern int mfd_add_devices(struct platform_device *parent,
> + const struct mfd_cell *cells, int n_devs,
> + struct resource *mem_base,
> + int irq_base);
>
> extern void mfd_remove_devices(struct platform_device *parent);
>
>
> --