pktcdvd:checkpatch:fix pointer declaration
PATCH 1/1 pktcdvd:checkpatch:fix pointer declaration
* Fix all pointer declaration which causes
"ERROR: "foo* bar" should be "foo *bar""
--- drivers/block/pktcdvd.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/block/pktcdvd.c +7 -7
@@ -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 ;
Signature · 1 line
2.17.1
Quoted 2 lines · RAGHU Halharvi
* Fix all pointer declaration which causes
"ERROR: "foo* bar" should be "foo *bar"
AIg-
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/012=
296.html).
Thanks,
Bart.=
Quoted 4 lines · Bart Van Assche
Quoted 2 lines · RAGHU Halharvi
* Fix all pointer declaration which causes
"ERROR: "foo* bar" should be "foo *bar""
Quoted 8 lines
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.
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.
Quoted 17 lines · Joe Perches
Quoted 4 lines · Bart Van Assche
Quoted 2 lines · RAGHU Halharvi
* Fix all pointer declaration which causes
"ERROR: "foo* bar" should be "foo *bar""Quoted 8 lines
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.