Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1285192 > unrolled thread

[PATCH v2 1/8] spi: lm70llp: remove multiple blank lines

Started bySudip Mukherjee <sudipm.mukherjee@gmail.com>
First post2015-12-07 11:50 +0100
Last post2015-12-08 15:40 +0100
Articles 10 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2 1/8] spi: lm70llp: remove multiple blank lines Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-12-07 11:50 +0100
    [PATCH v2 4/8] spi: lm70llp: correct alignment Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-12-07 11:50 +0100
    [PATCH v2 5/8] spi: lm70llp: remove space Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-12-07 11:50 +0100
    [PATCH v2 8/8] spi: lm70llp: remove printk Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-12-07 11:50 +0100
    [PATCH v2 3/8] spi: lm70llp: remove cast to void Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-12-07 12:00 +0100
    [PATCH v2 2/8] spi: lm70llp: add blank line after declaration Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-12-07 12:00 +0100
    Re: [PATCH v2 1/8] spi: lm70llp: remove multiple blank lines Mark Brown <broonie@kernel.org> - 2015-12-07 21:10 +0100
      Re: [PATCH v2 1/8] spi: lm70llp: remove multiple blank lines Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-12-08 05:40 +0100
        Re: [PATCH v2 1/8] spi: lm70llp: remove multiple blank lines Mark Brown <broonie@kernel.org> - 2015-12-08 14:00 +0100
          Re: [PATCH v2 1/8] spi: lm70llp: remove multiple blank lines Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-12-08 15:40 +0100

#1285192 — [PATCH v2 1/8] spi: lm70llp: remove multiple blank lines

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2015-12-07 11:50 +0100
Subject[PATCH v2 1/8] spi: lm70llp: remove multiple blank lines
Message-ID<qD1wJ-3l4-3@gated-at.bofh.it>
checkpatch complains about multiple blank lines.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/spi/spi-lm70llp.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/spi/spi-lm70llp.c b/drivers/spi/spi-lm70llp.c
index ba72347..eb4b421 100644
--- a/drivers/spi/spi-lm70llp.c
+++ b/drivers/spi/spi-lm70llp.c
@@ -23,11 +23,9 @@
 #include <linux/sysfs.h>
 #include <linux/workqueue.h>
 
-
 #include <linux/spi/spi.h>
 #include <linux/spi/spi_bitbang.h>
 
-
 /*
  * The LM70 communicates with a host processor using a 3-wire variant of
  * the SPI/Microwire bus interface. This driver specifically supports an
@@ -88,7 +86,6 @@ struct spi_lm70llp {
 /* REVISIT : ugly global ; provides "exclusive open" facility */
 static struct spi_lm70llp *lm70llp;
 
-
 /*-------------------------------------------------------------------*/
 
 static inline struct spi_lm70llp *spidev_to_pp(struct spi_device *spi)
@@ -319,7 +316,6 @@ static void spi_lm70llp_detach(struct parport *p)
 	lm70llp = NULL;
 }
 
-
 static struct parport_driver spi_lm70llp_drv = {
 	.name =		DRVNAME,
 	.attach =	spi_lm70llp_attach,
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1285193 — [PATCH v2 4/8] spi: lm70llp: correct alignment

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2015-12-07 11:50 +0100
Subject[PATCH v2 4/8] spi: lm70llp: correct alignment
Message-ID<qD1wK-3l4-17@gated-at.bofh.it>
In reply to#1285192
checkpatch complains about the allignment with open parenthesis.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/spi/spi-lm70llp.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/spi/spi-lm70llp.c b/drivers/spi/spi-lm70llp.c
index 133e76c..5f526ce 100644
--- a/drivers/spi/spi-lm70llp.c
+++ b/drivers/spi/spi-lm70llp.c
@@ -229,8 +229,8 @@ static void spi_lm70llp_attach(struct parport *p)
 	 */
 	pp->port = p;
 	pd = parport_register_device(p, DRVNAME,
-			NULL, NULL, NULL,
-			PARPORT_FLAG_EXCL, pp);
+				     NULL, NULL, NULL,
+				     PARPORT_FLAG_EXCL, pp);
 	if (!pd) {
 		status = -ENOMEM;
 		goto out_free_master;
@@ -273,7 +273,7 @@ static void spi_lm70llp_attach(struct parport *p)
 	pp->spidev_lm70 = spi_new_device(pp->bitbang.master, &pp->info);
 	if (pp->spidev_lm70)
 		dev_dbg(&pp->spidev_lm70->dev, "spidev_lm70 at %s\n",
-				dev_name(&pp->spidev_lm70->dev));
+			dev_name(&pp->spidev_lm70->dev));
 	else {
 		printk(KERN_WARNING "%s: spi_new_device failed\n", DRVNAME);
 		status = -ENODEV;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1285196 — [PATCH v2 5/8] spi: lm70llp: remove space

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2015-12-07 11:50 +0100
Subject[PATCH v2 5/8] spi: lm70llp: remove space
Message-ID<qD1wJ-3l4-13@gated-at.bofh.it>
In reply to#1285192
checkpatch complains about space before closing brace.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/spi/spi-lm70llp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-lm70llp.c b/drivers/spi/spi-lm70llp.c
index 5f526ce..62d0f6d 100644
--- a/drivers/spi/spi-lm70llp.c
+++ b/drivers/spi/spi-lm70llp.c
@@ -166,7 +166,7 @@ static inline int getmiso(struct spi_device *s)
 {
 	struct spi_lm70llp *pp = spidev_to_pp(s);
 
-	return ((SIO == (parport_read_status(pp->port) & SIO)) ? 0 : 1 );
+	return ((SIO == (parport_read_status(pp->port) & SIO)) ? 0 : 1);
 }
 
 /*--------------------------------------------------------------------*/
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1285197 — [PATCH v2 8/8] spi: lm70llp: remove printk

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2015-12-07 11:50 +0100
Subject[PATCH v2 8/8] spi: lm70llp: remove printk
Message-ID<qD1wK-3l4-21@gated-at.bofh.it>
In reply to#1285192
Using pr_* macros are more prefferable than using printk. Start using
pr_* family of macros and define pr_fmt to be used with it.
While at it remove DRVNAME from an existing pr_info() as the name is now
being printed by pr_fmt.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/spi/spi-lm70llp.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/spi/spi-lm70llp.c b/drivers/spi/spi-lm70llp.c
index 393eb2b..8fe83d0 100644
--- a/drivers/spi/spi-lm70llp.c
+++ b/drivers/spi/spi-lm70llp.c
@@ -14,6 +14,8 @@
  * GNU General Public License for more details.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
@@ -200,9 +202,7 @@ static void spi_lm70llp_attach(struct parport *p)
 	struct pardev_cb        lm70llp_cb;
 
 	if (lm70llp) {
-		printk(KERN_WARNING
-			"%s: spi_lm70llp instance already loaded. Aborting.\n",
-			DRVNAME);
+		pr_warn("spi_lm70llp instance already loaded. Aborting.\n");
 		return;
 	}
 
@@ -298,7 +298,7 @@ out_parport_unreg:
 out_free_master:
 	spi_master_put(master);
 out_fail:
-	pr_info("%s: spi_lm70llp probe fail, status %d\n", DRVNAME, status);
+	pr_info("spi_lm70llp probe fail, status %d\n", status);
 }
 
 static void spi_lm70llp_detach(struct parport *p)
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1285198 — [PATCH v2 3/8] spi: lm70llp: remove cast to void

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2015-12-07 12:00 +0100
Subject[PATCH v2 3/8] spi: lm70llp: remove cast to void
Message-ID<qD1Gq-3oq-9@gated-at.bofh.it>
In reply to#1285192
checkpatch was complaining about space after cast. But the cast to void
is not required at that place.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/spi/spi-lm70llp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi-lm70llp.c b/drivers/spi/spi-lm70llp.c
index 7037028..133e76c 100644
--- a/drivers/spi/spi-lm70llp.c
+++ b/drivers/spi/spi-lm70llp.c
@@ -294,7 +294,7 @@ out_off_and_release:
 out_parport_unreg:
 	parport_unregister_device(pd);
 out_free_master:
-	(void) spi_master_put(master);
+	spi_master_put(master);
 out_fail:
 	pr_info("%s: spi_lm70llp probe fail, status %d\n", DRVNAME, status);
 }
@@ -315,7 +315,7 @@ static void spi_lm70llp_detach(struct parport *p)
 	parport_release(pp->pd);
 	parport_unregister_device(pp->pd);
 
-	(void) spi_master_put(pp->bitbang.master);
+	spi_master_put(pp->bitbang.master);
 
 	lm70llp = NULL;
 }
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1285206 — [PATCH v2 2/8] spi: lm70llp: add blank line after declaration

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2015-12-07 12:00 +0100
Subject[PATCH v2 2/8] spi: lm70llp: add blank line after declaration
Message-ID<qD1Gr-3oq-41@gated-at.bofh.it>
In reply to#1285192
checkpatch complains about missing blank line after declaration.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/spi/spi-lm70llp.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/spi/spi-lm70llp.c b/drivers/spi/spi-lm70llp.c
index eb4b421..7037028 100644
--- a/drivers/spi/spi-lm70llp.c
+++ b/drivers/spi/spi-lm70llp.c
@@ -119,12 +119,14 @@ static inline void assertCS(struct spi_lm70llp *pp)
 static inline void clkHigh(struct spi_lm70llp *pp)
 {
 	u8 data = parport_read_data(pp->port);
+
 	parport_write_data(pp->port, data | SCLK);
 }
 
 static inline void clkLow(struct spi_lm70llp *pp)
 {
 	u8 data = parport_read_data(pp->port);
+
 	parport_write_data(pp->port, data & ~SCLK);
 }
 
@@ -163,8 +165,10 @@ static inline void setmosi(struct spi_device *s, int is_on)
 static inline int getmiso(struct spi_device *s)
 {
 	struct spi_lm70llp *pp = spidev_to_pp(s);
+
 	return ((SIO == (parport_read_status(pp->port) & SIO)) ? 0 : 1 );
 }
+
 /*--------------------------------------------------------------------*/
 
 #include "spi-bitbang-txrx.h"
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1285887

FromMark Brown <broonie@kernel.org>
Date2015-12-07 21:10 +0100
Message-ID<qDagH-Lz-27@gated-at.bofh.it>
In reply to#1285192

[Multipart message — attachments visible in raw view] — view raw

On Mon, Dec 07, 2015 at 04:17:28PM +0530, Sudip Mukherjee wrote:
> checkpatch complains about multiple blank lines.

Please don't resubmit already applied patches, please submit against the
latest development code for the subsystem you're submitting to (unless
the change is a bug fix that should go to Linus).

[toc] | [prev] | [next] | [standalone]


#1286215

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2015-12-08 05:40 +0100
Message-ID<qDied-5VW-13@gated-at.bofh.it>
In reply to#1285887
On Mon, Dec 07, 2015 at 08:07:37PM +0000, Mark Brown wrote:
> On Mon, Dec 07, 2015 at 04:17:28PM +0530, Sudip Mukherjee wrote:
> > checkpatch complains about multiple blank lines.
> 
> Please don't resubmit already applied patches, please submit against the
> latest development code for the subsystem you're submitting to (unless
> the change is a bug fix that should go to Linus).

I think there is some confusion. I am not seeing v1 of these patches in
for-next branch of your spi tree. And in review of v1 you said to use
dev_*. And for that last 2 patch of v1 changed and one extra came so I
sent the whole series as v2.

regards
sudip
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1286447

FromMark Brown <broonie@kernel.org>
Date2015-12-08 14:00 +0100
Message-ID<qDq26-2uA-13@gated-at.bofh.it>
In reply to#1286215

[Multipart message — attachments visible in raw view] — view raw

On Tue, Dec 08, 2015 at 10:03:00AM +0530, Sudip Mukherjee wrote:

> I think there is some confusion. I am not seeing v1 of these patches in
> for-next branch of your spi tree. And in review of v1 you said to use
> dev_*. And for that last 2 patch of v1 changed and one extra came so I
> sent the whole series as v2.

I'm not sure why you're not seeing them but they're there...

[toc] | [prev] | [next] | [standalone]


#1286534

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2015-12-08 15:40 +0100
Message-ID<qDrAS-3yq-21@gated-at.bofh.it>
In reply to#1286447
On Tue, Dec 08, 2015 at 12:49:56PM +0000, Mark Brown wrote:
> On Tue, Dec 08, 2015 at 10:03:00AM +0530, Sudip Mukherjee wrote:
> 
> > I think there is some confusion. I am not seeing v1 of these patches in
> > for-next branch of your spi tree. And in review of v1 you said to use
> > dev_*. And for that last 2 patch of v1 changed and one extra came so I
> > sent the whole series as v2.
> 
> I'm not sure why you're not seeing them but they're there...

oops... no. Sorry for that. I think I checked before updating your tree
in my local tree.

sorry again.

regards
sudip
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web