* [PATCH] fix some coding style problem in drivers/staging/iio/frequency/ad9832.c
@ 2014-06-02 17:05 Federico Di Pierro
2014-06-02 17:14 ` Joe Perches
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Federico Di Pierro @ 2014-06-02 17:05 UTC (permalink / raw)
To: jic23, jic23, gregkh, jg1.han, sachin.kamat
Cc: linux-iio, devel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 143 bytes --]
Hi!
This is my latest task of the eudyptula challenge.
Just a very small patch! It fixes 3 little coding style problems.
I'm using linux-next.
[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 1077 bytes --]
--- linux/drivers/staging/iio/frequency/ad9832.c.orig 2014-06-02 17:26:12.929978122 +0200
+++ linux/drivers/staging/iio/frequency/ad9832.c 2014-06-02 17:28:10.389970947 +0200
@@ -57,7 +57,7 @@ static int ad9832_write_frequency(struct
}
static int ad9832_write_phase(struct ad9832_state *st,
- unsigned long addr, unsigned long phase)
+ unsigned long addr, unsigned long phase)
{
if (phase > (1 << AD9832_PHASE_BITS))
return -EINVAL;
@@ -73,7 +73,7 @@ static int ad9832_write_phase(struct ad9
}
static ssize_t ad9832_write(struct device *dev,
- struct device_attribute *attr,
+ struct device_attribute *attr,
const char *buf,
size_t len)
{
@@ -109,11 +109,11 @@ static ssize_t ad9832_write(struct devic
ret = spi_sync(st->spi, &st->msg);
break;
case AD9832_FREQ_SYM:
- if (val == 1)
+ if (val == 1) {
st->ctrl_fp |= AD9832_FREQ;
- else if (val == 0)
+ } else if (val == 0) {
st->ctrl_fp &= ~AD9832_FREQ;
- else {
+ } else {
ret = -EINVAL;
break;
}
Signed-off-by: Federico Di Pierro <nierro92@gmail.org>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] fix some coding style problem in drivers/staging/iio/frequency/ad9832.c
2014-06-02 17:05 [PATCH] fix some coding style problem in drivers/staging/iio/frequency/ad9832.c Federico Di Pierro
@ 2014-06-02 17:14 ` Joe Perches
2014-06-02 17:21 ` Jianyu Zhan
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Joe Perches @ 2014-06-02 17:14 UTC (permalink / raw)
To: Federico Di Pierro
Cc: jic23, gregkh, jg1.han, sachin.kamat, linux-iio, devel,
linux-kernel
On Mon, 2014-06-02 at 19:05 +0200, Federico Di Pierro wrote:
> Hi!
Hello Federico.
> This is my latest task of the eudyptula challenge.
Your patch subject should be something like:
[PATCH] staging: iio: kernel style neatening
> Just a very small patch! It fixes 3 little coding style problems.
> I'm using linux-next.
linux/drivers/staging/iio/frequency/ad9832.c
[]
@@ -73,7 +73,7 @@ static int ad9832_write_phase(struct ad9
}
static ssize_t ad9832_write(struct device *dev,
- struct device_attribute *attr,
+ struct device_attribute *attr,
const char *buf,
size_t len)
checkpatch is a brainless little tool.
Please make sure your own brain is engaged when
acting on or verifying any warnings it emits.
Please expand the indented line range to include
all the arguments of the function.
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] fix some coding style problem in drivers/staging/iio/frequency/ad9832.c
2014-06-02 17:05 [PATCH] fix some coding style problem in drivers/staging/iio/frequency/ad9832.c Federico Di Pierro
2014-06-02 17:14 ` Joe Perches
@ 2014-06-02 17:21 ` Jianyu Zhan
2014-06-02 17:44 ` Jonathan Cameron
2014-06-02 19:10 ` Dan Carpenter
3 siblings, 0 replies; 5+ messages in thread
From: Jianyu Zhan @ 2014-06-02 17:21 UTC (permalink / raw)
To: Federico Di Pierro
Cc: jic23, Greg Kroah-Hartman, jg1.han, sachin.kamat, linux-iio,
devel, LKML
On Tue, Jun 3, 2014 at 1:05 AM, Federico Di Pierro <nierro92@gmail.com> wrote:
> Hi!
> This is my latest task of the eudyptula challenge.
> Just a very small patch! It fixes 3 little coding style problems.
> I'm using linux-next.
Hi, Federico,
It's awesome you taking part in eudyptula challenge program. That is a
good start
to kernel hacking.
But also please honour the community rule - the inline patch is preferred than
in attachment form . Please have a look at Documentation/SubmittingPatches file
in kernel source directory first before submitting patches.
Thanks,
Jianyu Zhan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] fix some coding style problem in drivers/staging/iio/frequency/ad9832.c
2014-06-02 17:05 [PATCH] fix some coding style problem in drivers/staging/iio/frequency/ad9832.c Federico Di Pierro
2014-06-02 17:14 ` Joe Perches
2014-06-02 17:21 ` Jianyu Zhan
@ 2014-06-02 17:44 ` Jonathan Cameron
2014-06-02 19:10 ` Dan Carpenter
3 siblings, 0 replies; 5+ messages in thread
From: Jonathan Cameron @ 2014-06-02 17:44 UTC (permalink / raw)
To: Federico Di Pierro, gregkh, jg1.han, sachin.kamat
Cc: linux-iio, devel, linux-kernel
On 02/06/14 18:05, Federico Di Pierro wrote:
> Hi!
> This is my latest task of the eudyptula challenge.
> Just a very small patch! It fixes 3 little coding style problems.
> I'm using linux-next.
Fair enough, but you need to spend a little time working
on the 'how' of your patch submission.
See Documentation/SubmittingPatches and repost the patch according
to those guidelines.
Also at a quick glance, unless I am very bored I'm unlikely to take
such a minor white space and bracket adjustment patch. If it were
part of a bigger series doing something more interesting I'd be
more interested.
If you want to approach this driver, then feel free but there are
many more major issues within it to be looked at such as ABI
compliance. See Documentation/ABI/testing/sysfs-bus-iio and friends
and compare the driver with them. Off the top of my head I can't
remember how bad this driver is but I doubt everything is well
documented.
Don't feel disheartened, as I would be happy to see more substantial
cleanup patches from you as part of the challenge or otherwise.
Good luck,
Jonathan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] fix some coding style problem in drivers/staging/iio/frequency/ad9832.c
2014-06-02 17:05 [PATCH] fix some coding style problem in drivers/staging/iio/frequency/ad9832.c Federico Di Pierro
` (2 preceding siblings ...)
2014-06-02 17:44 ` Jonathan Cameron
@ 2014-06-02 19:10 ` Dan Carpenter
3 siblings, 0 replies; 5+ messages in thread
From: Dan Carpenter @ 2014-06-02 19:10 UTC (permalink / raw)
To: Federico Di Pierro
Cc: jic23, gregkh, jg1.han, sachin.kamat, linux-iio, devel,
linux-kernel
On Mon, Jun 02, 2014 at 07:05:01PM +0200, Federico Di Pierro wrote:
> - else {
> + } else {
> ret = -EINVAL;
> break;
> }
>
>
> Signed-off-by: Federico Di Pierro <nierro92@gmail.org>
This goes after the changelog and before the diff.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-06-02 19:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-02 17:05 [PATCH] fix some coding style problem in drivers/staging/iio/frequency/ad9832.c Federico Di Pierro
2014-06-02 17:14 ` Joe Perches
2014-06-02 17:21 ` Jianyu Zhan
2014-06-02 17:44 ` Jonathan Cameron
2014-06-02 19:10 ` Dan Carpenter
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).