mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* drivers/pcmcia fix checkpatch CodingStyle issues
@ 2013-01-21 21:16 Laurent Navet
  2013-01-21 21:16 ` [PATCH 1/3] drivers: pcmcia: at91_cf.c fix checkpatch error Laurent Navet
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Laurent Navet @ 2013-01-21 21:16 UTC (permalink / raw)
  To: linux-pcmcia; +Cc: plagnioj, gregkh, nicolas.ferre, wfp5p, linux-kernel

[PATCH 1/3] drivers: pcmcia: at91_cf.c fix checkpatch error
[PATCH 2/3] drivers: pcmcia: ds.c fix checkpatch errors
[PATCH 3/3] drivers: pcmcia: electra_cf.c fix checkpatch error and

There is a lot of checkpatch issues in drivers/pcmcia directory
this fix some of them, if this kind of work is appreciated,
i can do more.

Regards.


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

* [PATCH 1/3] drivers: pcmcia: at91_cf.c fix checkpatch error
  2013-01-21 21:16 drivers/pcmcia fix checkpatch CodingStyle issues Laurent Navet
@ 2013-01-21 21:16 ` Laurent Navet
  2013-01-21 21:16 ` [PATCH 2/3] drivers: pcmcia: ds.c fix checkpatch errors Laurent Navet
  2013-01-21 21:16 ` [PATCH 3/3] drivers: pcmcia: electra_cf.c fix checkpatch error and warnings Laurent Navet
  2 siblings, 0 replies; 4+ messages in thread
From: Laurent Navet @ 2013-01-21 21:16 UTC (permalink / raw)
  To: linux-pcmcia
  Cc: plagnioj, gregkh, nicolas.ferre, wfp5p, linux-kernel, Laurent Navet

fix this checkpatch error:
- ERROR: switch and case should be at the same indent

Signed-off-by: Laurent Navet <laurent.navet@gmail.com>
---
 drivers/pcmcia/at91_cf.c |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/pcmcia/at91_cf.c b/drivers/pcmcia/at91_cf.c
index 01463c7..918be53 100644
--- a/drivers/pcmcia/at91_cf.c
+++ b/drivers/pcmcia/at91_cf.c
@@ -120,14 +120,14 @@ at91_cf_set_socket(struct pcmcia_socket *sock, struct socket_state_t *s)
 	/* switch Vcc if needed and possible */
 	if (gpio_is_valid(cf->board->vcc_pin)) {
 		switch (s->Vcc) {
-			case 0:
-				gpio_set_value(cf->board->vcc_pin, 0);
-				break;
-			case 33:
-				gpio_set_value(cf->board->vcc_pin, 1);
-				break;
-			default:
-				return -EINVAL;
+		case 0:
+			gpio_set_value(cf->board->vcc_pin, 0);
+			break;
+		case 33:
+			gpio_set_value(cf->board->vcc_pin, 1);
+			break;
+		default:
+			return -EINVAL;
 		}
 	}
 
-- 
1.7.10.4


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

* [PATCH 2/3] drivers: pcmcia: ds.c fix checkpatch errors
  2013-01-21 21:16 drivers/pcmcia fix checkpatch CodingStyle issues Laurent Navet
  2013-01-21 21:16 ` [PATCH 1/3] drivers: pcmcia: at91_cf.c fix checkpatch error Laurent Navet
@ 2013-01-21 21:16 ` Laurent Navet
  2013-01-21 21:16 ` [PATCH 3/3] drivers: pcmcia: electra_cf.c fix checkpatch error and warnings Laurent Navet
  2 siblings, 0 replies; 4+ messages in thread
From: Laurent Navet @ 2013-01-21 21:16 UTC (permalink / raw)
  To: linux-pcmcia
  Cc: plagnioj, gregkh, nicolas.ferre, wfp5p, linux-kernel, Laurent Navet

fix these checkpatch errors :
- ERROR: spaces required around that '<' (ctx:VxW)
- ERROR: "foo * bar" should be "foo *bar"
- WARNING: please, no space before tabs

Signed-off-by: Laurent Navet <laurent.navet@gmail.com>
---
 drivers/pcmcia/ds.c |   17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index 2deacbb..04a4b2d 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -81,8 +81,8 @@ static void pcmcia_check_driver(struct pcmcia_driver *p_drv)
 
 
 struct pcmcia_dynid {
-	struct list_head 		node;
-	struct pcmcia_device_id 	id;
+	struct list_head		node;
+	struct pcmcia_device_id		id;
 };
 
 /**
@@ -566,7 +566,7 @@ static struct pcmcia_device *pcmcia_device_add(struct pcmcia_socket *s,
 			c->io[i].name = p_dev->devname;
 			c->io[i].flags = IORESOURCE_IO;
 		}
-		for (i = 0; i< MAX_WIN; i++) {
+		for (i = 0; i < MAX_WIN; i++) {
 			c->mem[i].name = p_dev->devname;
 			c->mem[i].flags = IORESOURCE_MEM;
 		}
@@ -651,7 +651,7 @@ static int pcmcia_card_add(struct pcmcia_socket *s)
 }
 
 
-static int pcmcia_requery_callback(struct device *dev, void * _data)
+static int pcmcia_requery_callback(struct device *dev, void *_data)
 {
 	struct pcmcia_device *p_dev = to_pcmcia_dev(dev);
 	if (!p_dev->dev.driver) {
@@ -726,7 +726,7 @@ static void pcmcia_requery(struct pcmcia_socket *s)
  * the one provided by the card is broken. The firmware files reside in
  * /lib/firmware/ in userspace.
  */
-static int pcmcia_load_firmware(struct pcmcia_device *dev, char * filename)
+static int pcmcia_load_firmware(struct pcmcia_device *dev, char *filename)
 {
 	struct pcmcia_socket *s = dev->socket;
 	const struct firmware *fw;
@@ -778,7 +778,8 @@ static int pcmcia_load_firmware(struct pcmcia_device *dev, char * filename)
 
 #else /* !CONFIG_PCMCIA_LOAD_CIS */
 
-static inline int pcmcia_load_firmware(struct pcmcia_device *dev, char * filename)
+static inline int pcmcia_load_firmware(struct pcmcia_device *dev,
+				       char *filename)
 {
 	return -ENODEV;
 }
@@ -1190,7 +1191,7 @@ static int pcmcia_dev_resume(struct device *dev)
 }
 
 
-static int pcmcia_bus_suspend_callback(struct device *dev, void * _data)
+static int pcmcia_bus_suspend_callback(struct device *dev, void *_data)
 {
 	struct pcmcia_socket *skt = _data;
 	struct pcmcia_device *p_dev = to_pcmcia_dev(dev);
@@ -1201,7 +1202,7 @@ static int pcmcia_bus_suspend_callback(struct device *dev, void * _data)
 	return runtime_suspend(dev);
 }
 
-static int pcmcia_bus_resume_callback(struct device *dev, void * _data)
+static int pcmcia_bus_resume_callback(struct device *dev, void *_data)
 {
 	struct pcmcia_socket *skt = _data;
 	struct pcmcia_device *p_dev = to_pcmcia_dev(dev);
-- 
1.7.10.4


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

* [PATCH 3/3] drivers: pcmcia: electra_cf.c fix checkpatch error and warnings
  2013-01-21 21:16 drivers/pcmcia fix checkpatch CodingStyle issues Laurent Navet
  2013-01-21 21:16 ` [PATCH 1/3] drivers: pcmcia: at91_cf.c fix checkpatch error Laurent Navet
  2013-01-21 21:16 ` [PATCH 2/3] drivers: pcmcia: ds.c fix checkpatch errors Laurent Navet
@ 2013-01-21 21:16 ` Laurent Navet
  2 siblings, 0 replies; 4+ messages in thread
From: Laurent Navet @ 2013-01-21 21:16 UTC (permalink / raw)
  To: linux-pcmcia
  Cc: plagnioj, gregkh, nicolas.ferre, wfp5p, linux-kernel, Laurent Navet

fix these checkpatch errors and warning:
- ERROR: "foo *           bar" should be "foo *bar"
- WARNING: please, no space before tabs
- WARNING: sizeof *cf should be sizeof(*cf)
- WARNING: space prohibited between function name and open parenthesis '('i

Signed-off-by: Laurent Navet <laurent.navet@gmail.com>
---
 drivers/pcmcia/electra_cf.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/pcmcia/electra_cf.c b/drivers/pcmcia/electra_cf.c
index a007321a..7c5cfa26 100644
--- a/drivers/pcmcia/electra_cf.c
+++ b/drivers/pcmcia/electra_cf.c
@@ -46,14 +46,14 @@ struct electra_cf_socket {
 
 	struct platform_device	*ofdev;
 	unsigned long		mem_phys;
-	void __iomem *		mem_base;
+	void __iomem		*mem_base;
 	unsigned long		mem_size;
-	void __iomem *		io_virt;
+	void __iomem		*io_virt;
 	unsigned int		io_base;
 	unsigned int		io_size;
 	u_int			irq;
 	struct resource		iomem;
-	void __iomem *		gpio_base;
+	void __iomem		*gpio_base;
 	int			gpio_detect;
 	int			gpio_vsense;
 	int			gpio_3v;
@@ -200,7 +200,7 @@ static int electra_cf_probe(struct platform_device *ofdev)
 	if (err)
 		return -EINVAL;
 
-	cf = kzalloc(sizeof *cf, GFP_KERNEL);
+	cf = kzalloc(sizeof(*cf), GFP_KERNEL);
 	if (!cf)
 		return -ENOMEM;
 
@@ -368,5 +368,5 @@ static struct platform_driver electra_cf_driver = {
 module_platform_driver(electra_cf_driver);
 
 MODULE_LICENSE("GPL");
-MODULE_AUTHOR ("Olof Johansson <olof@lixom.net>");
+MODULE_AUTHOR("Olof Johansson <olof@lixom.net>");
 MODULE_DESCRIPTION("PA Semi Electra CF driver");
-- 
1.7.10.4


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

end of thread, other threads:[~2013-01-21 21:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-21 21:16 drivers/pcmcia fix checkpatch CodingStyle issues Laurent Navet
2013-01-21 21:16 ` [PATCH 1/3] drivers: pcmcia: at91_cf.c fix checkpatch error Laurent Navet
2013-01-21 21:16 ` [PATCH 2/3] drivers: pcmcia: ds.c fix checkpatch errors Laurent Navet
2013-01-21 21:16 ` [PATCH 3/3] drivers: pcmcia: electra_cf.c fix checkpatch error and warnings Laurent Navet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®