linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pktcdvd:checkpatch:fix pointer declaration
@ 2018-07-18 15:58 RAGHU Halharvi
  2018-07-18 18:06 ` Bart Van Assche
  0 siblings, 1 reply; 6+ messages in thread
From: RAGHU Halharvi @ 2018-07-18 15:58 UTC (permalink / raw)
  To: linux-kernel, linux-block; +Cc: axboe, RAGHU Halharvi

* Fix all pointer declaration which causes
   "ERROR: "foo* bar" should be "foo *bar""

Signed-off-by: RAGHU Halharvi <raghuhack78@gmail.com>
---
 drivers/block/pktcdvd.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index 59fb66c0e064..50a574049144 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -104,7 +104,7 @@ static struct class	*class_pktcdvd;    /* /sys/class/pktcdvd */
 static struct dentry	*pkt_debugfs_root; /* /sys/kernel/debug/pktcdvd */
 
 /* forward declaration */
-static int pkt_setup_dev(dev_t dev, dev_t* pkt_dev);
+static int pkt_setup_dev(dev_t dev, dev_t *pkt_dev);
 static int pkt_remove_dev(dev_t pkt_dev);
 static int pkt_seq_show(struct seq_file *m, void *p);
 
@@ -116,10 +116,10 @@ static sector_t get_zone(sector_t sector, struct pktcdvd_device *pd)
 /*
  * create and register a pktcdvd kernel object.
  */
-static struct pktcdvd_kobj* pkt_kobj_create(struct pktcdvd_device *pd,
-					const char* name,
-					struct kobject* parent,
-					struct kobj_type* ktype)
+static struct pktcdvd_kobj *pkt_kobj_create(struct pktcdvd_device *pd,
+					const char *name,
+					struct kobject *parent,
+					struct kobj_type *ktype)
 {
 	struct pktcdvd_kobj *p;
 	int error;
@@ -246,7 +246,7 @@ static ssize_t kobj_pkt_show(struct kobject *kobj,
 	return n;
 }
 
-static void init_write_congestion_marks(int* lo, int* hi)
+static void init_write_congestion_marks(int *lo, int *hi)
 {
 	if (*hi > 0) {
 		*hi = max(*hi, 500);
@@ -2708,7 +2708,7 @@ static char *pktcdvd_devnode(struct gendisk *gd, umode_t *mode)
 /*
  * Set up mapping from pktcdvd device to CD-ROM device.
  */
-static int pkt_setup_dev(dev_t dev, dev_t* pkt_dev)
+static int pkt_setup_dev(dev_t dev, dev_t *pkt_dev)
 {
 	int idx;
 	int ret = -ENOMEM;
-- 
2.17.1


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

* Re: [PATCH] pktcdvd:checkpatch:fix pointer declaration
  2018-07-18 18:43   ` Joe Perches
@ 2018-07-18 17:55     ` RAGHU H
  0 siblings, 0 replies; 6+ messages in thread
From: RAGHU H @ 2018-07-18 17:55 UTC (permalink / raw)
  To: Joe Perches, m=, Bart.VanAssche
  Cc: Bart Van Assche, linux-kernel, linux-block, axboe

Bart,

I'm starter in kernel contribution & I guess cleanup of certain files
which have more than 50+ checkpatch errors is good start.

Also one of the patch was accepted by Jens Axboe & he responded back to
resend one of the patch which was not getting applied.

But I get your point ,I'll restrict my checkpatch fixes to drivers/staging files

Thanks Joe for followup.

On Wed, Jul 18, 2018 at 11:43:11AM -0700, Joe Perches wrote:
> On Wed, 2018-07-18 at 18:06 +0000, Bart Van Assche wrote:
> > On Wed, 2018-07-18 at 21:28 +0530, RAGHU Halharvi wrote:
> > > * Fix all pointer declaration which causes
> > >    "ERROR: "foo* bar" should be "foo *bar""
> > 
> > Hello Raghu,
> > 
> > If you would not be aware of this, checkpatch is a tool that is intended to
> > verify patches before submission and not to verify code that is already
> > upstream. A detailed explanation of why patches like this one should not be
> > submitted is available in "A quick guide to why stand-alone checkpatch
> > patches suck"
> > (https://lists.kernelnewbies.org/pipermail/kernelnewbies/2014-September/012296.html).
> 
> Read more of the whole thread.
> Varying opinions exist.
> 

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

* Re: [PATCH] pktcdvd:checkpatch:fix pointer declaration
  2018-07-18 15:58 [PATCH] pktcdvd:checkpatch:fix pointer declaration RAGHU Halharvi
@ 2018-07-18 18:06 ` Bart Van Assche
  2018-07-18 18:43   ` Joe Perches
  0 siblings, 1 reply; 6+ messages in thread
From: Bart Van Assche @ 2018-07-18 18:06 UTC (permalink / raw)
  To: linux-kernel, linux-block, raghuhack78; +Cc: axboe

On Wed, 2018-07-18 at 21:28 +0530, RAGHU Halharvi wrote:
> * Fix all pointer declaration which causes
>    "ERROR: "foo* bar" should be "foo *bar""

Hello Raghu,

If you would not be aware of this, checkpatch is a tool that is intended to
verify patches before submission and not to verify code that is already
upstream. A detailed explanation of why patches like this one should not be
submitted is available in "A quick guide to why stand-alone checkpatch
patches suck"
(https://lists.kernelnewbies.org/pipermail/kernelnewbies/2014-September/012296.html).

Thanks,

Bart.

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

* Re: [PATCH] pktcdvd:checkpatch:fix pointer declaration
  2018-07-18 18:06 ` Bart Van Assche
@ 2018-07-18 18:43   ` Joe Perches
  2018-07-18 17:55     ` RAGHU H
  0 siblings, 1 reply; 6+ messages in thread
From: Joe Perches @ 2018-07-18 18:43 UTC (permalink / raw)
  To: Bart Van Assche, linux-kernel, linux-block, raghuhack78; +Cc: axboe

On Wed, 2018-07-18 at 18:06 +0000, Bart Van Assche wrote:
> On Wed, 2018-07-18 at 21:28 +0530, RAGHU Halharvi wrote:
> > * Fix all pointer declaration which causes
> >    "ERROR: "foo* bar" should be "foo *bar""
> 
> Hello Raghu,
> 
> If you would not be aware of this, checkpatch is a tool that is intended to
> verify patches before submission and not to verify code that is already
> upstream. A detailed explanation of why patches like this one should not be
> submitted is available in "A quick guide to why stand-alone checkpatch
> patches suck"
> (https://lists.kernelnewbies.org/pipermail/kernelnewbies/2014-September/012296.html).

Read more of the whole thread.
Varying opinions exist.


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

* [PATCH] pktcdvd:checkpatch:fix pointer declaration
@ 2018-07-18 14:59 RAGHU Halharvi
  0 siblings, 0 replies; 6+ messages in thread
From: RAGHU Halharvi @ 2018-07-18 14:59 UTC (permalink / raw)
  To: linux-kernel, linux-block; +Cc: RAGHU Halharvi, axboe

* Fix all pointer declaration which causes
   "ERROR: "foo* bar" should be "foo *bar""

Signed-off-by: RAGHU Halharvi <raghuhack78@gmail.com>
---
 drivers/block/pktcdvd.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index 59fb66c0e064..50a574049144 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -104,7 +104,7 @@ static struct class	*class_pktcdvd;    /* /sys/class/pktcdvd */
 static struct dentry	*pkt_debugfs_root; /* /sys/kernel/debug/pktcdvd */
 
 /* forward declaration */
-static int pkt_setup_dev(dev_t dev, dev_t* pkt_dev);
+static int pkt_setup_dev(dev_t dev, dev_t *pkt_dev);
 static int pkt_remove_dev(dev_t pkt_dev);
 static int pkt_seq_show(struct seq_file *m, void *p);
 
@@ -116,10 +116,10 @@ static sector_t get_zone(sector_t sector, struct pktcdvd_device *pd)
 /*
  * create and register a pktcdvd kernel object.
  */
-static struct pktcdvd_kobj* pkt_kobj_create(struct pktcdvd_device *pd,
-					const char* name,
-					struct kobject* parent,
-					struct kobj_type* ktype)
+static struct pktcdvd_kobj *pkt_kobj_create(struct pktcdvd_device *pd,
+					const char *name,
+					struct kobject *parent,
+					struct kobj_type *ktype)
 {
 	struct pktcdvd_kobj *p;
 	int error;
@@ -246,7 +246,7 @@ static ssize_t kobj_pkt_show(struct kobject *kobj,
 	return n;
 }
 
-static void init_write_congestion_marks(int* lo, int* hi)
+static void init_write_congestion_marks(int *lo, int *hi)
 {
 	if (*hi > 0) {
 		*hi = max(*hi, 500);
@@ -2708,7 +2708,7 @@ static char *pktcdvd_devnode(struct gendisk *gd, umode_t *mode)
 /*
  * Set up mapping from pktcdvd device to CD-ROM device.
  */
-static int pkt_setup_dev(dev_t dev, dev_t* pkt_dev)
+static int pkt_setup_dev(dev_t dev, dev_t *pkt_dev)
 {
 	int idx;
 	int ret = -ENOMEM;
-- 
2.17.1


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

* [PATCH] pktcdvd:checkpatch:fix pointer declaration
@ 2018-07-17 18:01 RAGHU Halharvi
  0 siblings, 0 replies; 6+ messages in thread
From: RAGHU Halharvi @ 2018-07-17 18:01 UTC (permalink / raw)
  To: linux-kernel, linux-block; +Cc: RAGHU Halharvi, axboe

* Fix all pointer declaration which causes
   "ERROR: "foo* bar" should be "foo *bar""

Signed-off-by: RAGHU Halharvi <raghuhack78@gmail.com>
---
 drivers/block/pktcdvd.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index 59fb66c0e064..50a574049144 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -104,7 +104,7 @@ static struct class	*class_pktcdvd;    /* /sys/class/pktcdvd */
 static struct dentry	*pkt_debugfs_root; /* /sys/kernel/debug/pktcdvd */
 
 /* forward declaration */
-static int pkt_setup_dev(dev_t dev, dev_t* pkt_dev);
+static int pkt_setup_dev(dev_t dev, dev_t *pkt_dev);
 static int pkt_remove_dev(dev_t pkt_dev);
 static int pkt_seq_show(struct seq_file *m, void *p);
 
@@ -116,10 +116,10 @@ static sector_t get_zone(sector_t sector, struct pktcdvd_device *pd)
 /*
  * create and register a pktcdvd kernel object.
  */
-static struct pktcdvd_kobj* pkt_kobj_create(struct pktcdvd_device *pd,
-					const char* name,
-					struct kobject* parent,
-					struct kobj_type* ktype)
+static struct pktcdvd_kobj *pkt_kobj_create(struct pktcdvd_device *pd,
+					const char *name,
+					struct kobject *parent,
+					struct kobj_type *ktype)
 {
 	struct pktcdvd_kobj *p;
 	int error;
@@ -246,7 +246,7 @@ static ssize_t kobj_pkt_show(struct kobject *kobj,
 	return n;
 }
 
-static void init_write_congestion_marks(int* lo, int* hi)
+static void init_write_congestion_marks(int *lo, int *hi)
 {
 	if (*hi > 0) {
 		*hi = max(*hi, 500);
@@ -2708,7 +2708,7 @@ static char *pktcdvd_devnode(struct gendisk *gd, umode_t *mode)
 /*
  * Set up mapping from pktcdvd device to CD-ROM device.
  */
-static int pkt_setup_dev(dev_t dev, dev_t* pkt_dev)
+static int pkt_setup_dev(dev_t dev, dev_t *pkt_dev)
 {
 	int idx;
 	int ret = -ENOMEM;
-- 
2.17.1


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

end of thread, other threads:[~2018-07-18 19:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-18 15:58 [PATCH] pktcdvd:checkpatch:fix pointer declaration RAGHU Halharvi
2018-07-18 18:06 ` Bart Van Assche
2018-07-18 18:43   ` Joe Perches
2018-07-18 17:55     ` RAGHU H
  -- strict thread matches above, loose matches on Subject: below --
2018-07-18 14:59 RAGHU Halharvi
2018-07-17 18:01 RAGHU Halharvi

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).