LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] Staging: comedi: drivers: ni_atmio.c: fixed multi-line derefernce issue
@ 2018-03-15 17:30 Pratik Jain
2018-03-15 17:39 ` Greg KH
0 siblings, 1 reply; 11+ messages in thread
From: Pratik Jain @ 2018-03-15 17:30 UTC (permalink / raw)
To: greg; +Cc: linux-kernel, devel, abbotti, Pratik Jain
Fixed coding style issue.
Signed-off-by: Pratik Jain <pratik.jain0509@gmail.com>
---
drivers/staging/comedi/drivers/ni_atmio.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/comedi/drivers/ni_atmio.c b/drivers/staging/comedi/drivers/ni_atmio.c
index b9e9ab548c4b..e82fbe987dd8 100644
--- a/drivers/staging/comedi/drivers/ni_atmio.c
+++ b/drivers/staging/comedi/drivers/ni_atmio.c
@@ -226,8 +226,8 @@ static int ni_isapnp_find_board(struct pnp_dev **dev)
for (i = 0; i < ARRAY_SIZE(ni_boards); i++) {
isapnp_dev = pnp_find_dev(NULL,
ISAPNP_VENDOR('N', 'I', 'C'),
- ISAPNP_FUNCTION(ni_boards[i].
- isapnp_id), NULL);
+ ISAPNP_FUNCTION(ni_boards[i].isapnp_id),
+ NULL);
if (!isapnp_dev || !isapnp_dev->card)
continue;
@@ -356,4 +356,3 @@ module_comedi_driver(ni_atmio_driver);
MODULE_AUTHOR("Comedi http://www.comedi.org");
MODULE_DESCRIPTION("Comedi low-level driver");
MODULE_LICENSE("GPL");
-
--
2.16.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] Staging: comedi: drivers: ni_atmio.c: fixed multi-line derefernce issue
2018-03-15 17:30 [PATCH] Staging: comedi: drivers: ni_atmio.c: fixed multi-line derefernce issue Pratik Jain
@ 2018-03-15 17:39 ` Greg KH
[not found] ` <CABbwmYcnDNcA70_-BhLkBcuK-77tk3BWKcvzQts6eWqu5_mMKA@mail.gmail.com>
0 siblings, 1 reply; 11+ messages in thread
From: Greg KH @ 2018-03-15 17:39 UTC (permalink / raw)
To: Pratik Jain; +Cc: linux-kernel, devel, abbotti
On Thu, Mar 15, 2018 at 11:00:40PM +0530, Pratik Jain wrote:
> Fixed coding style issue.
>
> Signed-off-by: Pratik Jain <pratik.jain0509@gmail.com>
> ---
> drivers/staging/comedi/drivers/ni_atmio.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/ni_atmio.c b/drivers/staging/comedi/drivers/ni_atmio.c
> index b9e9ab548c4b..e82fbe987dd8 100644
> --- a/drivers/staging/comedi/drivers/ni_atmio.c
> +++ b/drivers/staging/comedi/drivers/ni_atmio.c
> @@ -226,8 +226,8 @@ static int ni_isapnp_find_board(struct pnp_dev **dev)
> for (i = 0; i < ARRAY_SIZE(ni_boards); i++) {
> isapnp_dev = pnp_find_dev(NULL,
> ISAPNP_VENDOR('N', 'I', 'C'),
> - ISAPNP_FUNCTION(ni_boards[i].
> - isapnp_id), NULL);
> + ISAPNP_FUNCTION(ni_boards[i].isapnp_id),
> + NULL);
>
> if (!isapnp_dev || !isapnp_dev->card)
> continue;
> @@ -356,4 +356,3 @@ module_comedi_driver(ni_atmio_driver);
> MODULE_AUTHOR("Comedi http://www.comedi.org");
> MODULE_DESCRIPTION("Comedi low-level driver");
> MODULE_LICENSE("GPL");
> -
Why did you also delete this last line?
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] Staging: comedi: drivers: ni_atmio.c: fixed multi-line derefernce issue
[not found] ` <CABbwmYcnDNcA70_-BhLkBcuK-77tk3BWKcvzQts6eWqu5_mMKA@mail.gmail.com>
@ 2018-03-15 18:59 ` Pratik Jain
2018-03-16 10:17 ` Ian Abbott
[not found] ` <20180315193246.GA1565@kroah.com>
1 sibling, 1 reply; 11+ messages in thread
From: Pratik Jain @ 2018-03-15 18:59 UTC (permalink / raw)
To: greg; +Cc: linux-kernel, devel, abbotti, Pratik Jain
Fixed coding style issue.
Signed-off-by: Pratik Jain <pratik.jain0509@gmail.com>
---
drivers/staging/comedi/drivers/ni_atmio.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/comedi/drivers/ni_atmio.c b/drivers/staging/comedi/drivers/ni_atmio.c
index b9e9ab548c4b..4e27a2959b64 100644
--- a/drivers/staging/comedi/drivers/ni_atmio.c
+++ b/drivers/staging/comedi/drivers/ni_atmio.c
@@ -226,8 +226,8 @@ static int ni_isapnp_find_board(struct pnp_dev **dev)
for (i = 0; i < ARRAY_SIZE(ni_boards); i++) {
isapnp_dev = pnp_find_dev(NULL,
ISAPNP_VENDOR('N', 'I', 'C'),
- ISAPNP_FUNCTION(ni_boards[i].
- isapnp_id), NULL);
+ ISAPNP_FUNCTION(ni_boards[i].isapnp_id),
+ NULL);
if (!isapnp_dev || !isapnp_dev->card)
continue;
--
2.16.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] Staging: comedi: drivers: ni_atmio.c: fixed multi-line derefernce issue
[not found] ` <20180315193246.GA1565@kroah.com>
@ 2018-03-15 19:49 ` Pratik Jain
2018-03-16 8:09 ` Dan Carpenter
0 siblings, 1 reply; 11+ messages in thread
From: Pratik Jain @ 2018-03-15 19:49 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel, devel, abbotti
Resending the email because it was sent only to Greg.
Context:
In my previous patch, I had removed an extra newline
at the end of the code.
My Reply:
It was unintentional, but does it violate any coding or
other standard?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Staging: comedi: drivers: ni_atmio.c: fixed multi-line derefernce issue
2018-03-15 19:49 ` Pratik Jain
@ 2018-03-16 8:09 ` Dan Carpenter
0 siblings, 0 replies; 11+ messages in thread
From: Dan Carpenter @ 2018-03-16 8:09 UTC (permalink / raw)
To: Pratik Jain; +Cc: Greg KH, devel, abbotti, linux-kernel
On Fri, Mar 16, 2018 at 01:19:12AM +0530, Pratik Jain wrote:
> Resending the email because it was sent only to Greg.
>
> Context:
> In my previous patch, I had removed an extra newline
> at the end of the code.
>
> My Reply:
> It was unintentional, but does it violate any coding or
> other standard?
>
No, but don't do random unrelated changes.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Staging: comedi: drivers: ni_atmio.c: fixed multi-line derefernce issue
2018-03-15 18:59 ` Pratik Jain
@ 2018-03-16 10:17 ` Ian Abbott
2018-03-16 10:25 ` Pratik Jain
2018-03-16 10:29 ` Pratik Jain
0 siblings, 2 replies; 11+ messages in thread
From: Ian Abbott @ 2018-03-16 10:17 UTC (permalink / raw)
To: Pratik Jain, greg; +Cc: linux-kernel, devel
On 15/03/2018 18:59, Pratik Jain wrote:
> Fixed coding style issue.
>
> Signed-off-by: Pratik Jain <pratik.jain0509@gmail.com>
> ---
> drivers/staging/comedi/drivers/ni_atmio.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/ni_atmio.c b/drivers/staging/comedi/drivers/ni_atmio.c
> index b9e9ab548c4b..4e27a2959b64 100644
> --- a/drivers/staging/comedi/drivers/ni_atmio.c
> +++ b/drivers/staging/comedi/drivers/ni_atmio.c
> @@ -226,8 +226,8 @@ static int ni_isapnp_find_board(struct pnp_dev **dev)
> for (i = 0; i < ARRAY_SIZE(ni_boards); i++) {
> isapnp_dev = pnp_find_dev(NULL,
> ISAPNP_VENDOR('N', 'I', 'C'),
> - ISAPNP_FUNCTION(ni_boards[i].
> - isapnp_id), NULL);
> + ISAPNP_FUNCTION(ni_boards[i].isapnp_id),
> + NULL);
>
> if (!isapnp_dev || !isapnp_dev->card)
> continue;
>
I suggest splitting the expression just after the '=' to avoid going
over 80 columns.
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=-
-=( Web: http://www.mev.co.uk/ )=-
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Staging: comedi: drivers: ni_atmio.c: fixed multi-line derefernce issue
2018-03-16 10:17 ` Ian Abbott
@ 2018-03-16 10:25 ` Pratik Jain
2018-03-16 10:29 ` Pratik Jain
1 sibling, 0 replies; 11+ messages in thread
From: Pratik Jain @ 2018-03-16 10:25 UTC (permalink / raw)
To: Ian Abbott; +Cc: Greg KH, linux-kernel, devel
[-- Attachment #1: Type: text/plain, Size: 1546 bytes --]
Yes, that can be done. But isn't 80 column limit more of a history based
convention?
On Fri, Mar 16, 2018 at 3:47 PM, Ian Abbott <abbotti@mev.co.uk> wrote:
> On 15/03/2018 18:59, Pratik Jain wrote:
>
>> Fixed coding style issue.
>>
>> Signed-off-by: Pratik Jain <pratik.jain0509@gmail.com>
>> ---
>> drivers/staging/comedi/drivers/ni_atmio.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/staging/comedi/drivers/ni_atmio.c
>> b/drivers/staging/comedi/drivers/ni_atmio.c
>> index b9e9ab548c4b..4e27a2959b64 100644
>> --- a/drivers/staging/comedi/drivers/ni_atmio.c
>> +++ b/drivers/staging/comedi/drivers/ni_atmio.c
>> @@ -226,8 +226,8 @@ static int ni_isapnp_find_board(struct pnp_dev **dev)
>> for (i = 0; i < ARRAY_SIZE(ni_boards); i++) {
>> isapnp_dev = pnp_find_dev(NULL,
>> ISAPNP_VENDOR('N', 'I', 'C'),
>> - ISAPNP_FUNCTION(ni_boards[i].
>> - isapnp_id),
>> NULL);
>> + ISAPNP_FUNCTION(ni_boards[i].
>> isapnp_id),
>> + NULL);
>> if (!isapnp_dev || !isapnp_dev->card)
>> continue;
>>
>>
> I suggest splitting the expression just after the '=' to avoid going over
> 80 columns.
>
> --
> -=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=-
> -=( Web: http://www.mev.co.uk/ )=-
>
[-- Attachment #2: Type: text/html, Size: 2542 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Staging: comedi: drivers: ni_atmio.c: fixed multi-line derefernce issue
2018-03-16 10:17 ` Ian Abbott
2018-03-16 10:25 ` Pratik Jain
@ 2018-03-16 10:29 ` Pratik Jain
2018-03-16 10:36 ` Dan Carpenter
1 sibling, 1 reply; 11+ messages in thread
From: Pratik Jain @ 2018-03-16 10:29 UTC (permalink / raw)
To: Ian Abbott; +Cc: linux-kernel, greg, devel
Yes that can be done. But isn't 80 column limit more of a
historical convention?
On Fri, Mar 16, 2018 at 10:17:28AM +0000, Ian Abbott wrote:
> On 15/03/2018 18:59, Pratik Jain wrote:
> > Fixed coding style issue.
> >
> > Signed-off-by: Pratik Jain <pratik.jain0509@gmail.com>
> > ---
> > drivers/staging/comedi/drivers/ni_atmio.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/staging/comedi/drivers/ni_atmio.c b/drivers/staging/comedi/drivers/ni_atmio.c
> > index b9e9ab548c4b..4e27a2959b64 100644
> > --- a/drivers/staging/comedi/drivers/ni_atmio.c
> > +++ b/drivers/staging/comedi/drivers/ni_atmio.c
> > @@ -226,8 +226,8 @@ static int ni_isapnp_find_board(struct pnp_dev **dev)
> > for (i = 0; i < ARRAY_SIZE(ni_boards); i++) {
> > isapnp_dev = pnp_find_dev(NULL,
> > ISAPNP_VENDOR('N', 'I', 'C'),
> > - ISAPNP_FUNCTION(ni_boards[i].
> > - isapnp_id), NULL);
> > + ISAPNP_FUNCTION(ni_boards[i].isapnp_id),
> > + NULL);
> > if (!isapnp_dev || !isapnp_dev->card)
> > continue;
> >
>
> I suggest splitting the expression just after the '=' to avoid going over 80
> columns.
>
> --
> -=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=-
> -=( Web: http://www.mev.co.uk/ )=-
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Staging: comedi: drivers: ni_atmio.c: fixed multi-line derefernce issue
2018-03-16 10:29 ` Pratik Jain
@ 2018-03-16 10:36 ` Dan Carpenter
2018-03-16 10:48 ` Pratik Jain
0 siblings, 1 reply; 11+ messages in thread
From: Dan Carpenter @ 2018-03-16 10:36 UTC (permalink / raw)
To: Pratik Jain; +Cc: devel, Ian Abbott, linux-kernel
On Fri, Mar 16, 2018 at 03:59:31PM +0530, Pratik Jain wrote:
> Yes that can be done. But isn't 80 column limit more of a
> historical convention?
>
No. It's not. We're not super strict about it but it's still a rule we
apply unless it hurts readability.
regards,
dan carpenter
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] Staging: comedi: drivers: ni_atmio.c: fixed multi-line derefernce issue
2018-03-16 10:36 ` Dan Carpenter
@ 2018-03-16 10:48 ` Pratik Jain
2018-03-16 10:55 ` Ian Abbott
0 siblings, 1 reply; 11+ messages in thread
From: Pratik Jain @ 2018-03-16 10:48 UTC (permalink / raw)
To: greg; +Cc: linux-kernel, devel, abbotti, Pratik Jain
Fixed coding style issue.
Signed-off-by: Pratik Jain <pratik.jain0509@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
---
drivers/staging/comedi/drivers/ni_atmio.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/comedi/drivers/ni_atmio.c b/drivers/staging/comedi/drivers/ni_atmio.c
index b9e9ab548c4b..2b7bfe0dd7f3 100644
--- a/drivers/staging/comedi/drivers/ni_atmio.c
+++ b/drivers/staging/comedi/drivers/ni_atmio.c
@@ -224,10 +224,11 @@ static int ni_isapnp_find_board(struct pnp_dev **dev)
int i;
for (i = 0; i < ARRAY_SIZE(ni_boards); i++) {
- isapnp_dev = pnp_find_dev(NULL,
- ISAPNP_VENDOR('N', 'I', 'C'),
- ISAPNP_FUNCTION(ni_boards[i].
- isapnp_id), NULL);
+ isapnp_dev =
+ pnp_find_dev(NULL,
+ ISAPNP_VENDOR('N', 'I', 'C'),
+ ISAPNP_FUNCTION(ni_boards[i].isapnp_id),
+ NULL);
if (!isapnp_dev || !isapnp_dev->card)
continue;
--
2.16.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] Staging: comedi: drivers: ni_atmio.c: fixed multi-line derefernce issue
2018-03-16 10:48 ` Pratik Jain
@ 2018-03-16 10:55 ` Ian Abbott
0 siblings, 0 replies; 11+ messages in thread
From: Ian Abbott @ 2018-03-16 10:55 UTC (permalink / raw)
To: Pratik Jain, greg; +Cc: linux-kernel, devel
On 16/03/2018 10:48, Pratik Jain wrote:
> Fixed coding style issue.
>
> Signed-off-by: Pratik Jain <pratik.jain0509@gmail.com>
> ---
> drivers/staging/comedi/drivers/ni_atmio.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/ni_atmio.c b/drivers/staging/comedi/drivers/ni_atmio.c
> index b9e9ab548c4b..2b7bfe0dd7f3 100644
> --- a/drivers/staging/comedi/drivers/ni_atmio.c
> +++ b/drivers/staging/comedi/drivers/ni_atmio.c
> @@ -224,10 +224,11 @@ static int ni_isapnp_find_board(struct pnp_dev **dev)
> int i;
>
> for (i = 0; i < ARRAY_SIZE(ni_boards); i++) {
> - isapnp_dev = pnp_find_dev(NULL,
> - ISAPNP_VENDOR('N', 'I', 'C'),
> - ISAPNP_FUNCTION(ni_boards[i].
> - isapnp_id), NULL);
> + isapnp_dev =
> + pnp_find_dev(NULL,
> + ISAPNP_VENDOR('N', 'I', 'C'),
> + ISAPNP_FUNCTION(ni_boards[i].isapnp_id),
> + NULL);
>
> if (!isapnp_dev || !isapnp_dev->card)
> continue;
>
Looks good, thanks!
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=-
-=( Web: http://www.mev.co.uk/ )=-
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2018-03-16 10:55 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-15 17:30 [PATCH] Staging: comedi: drivers: ni_atmio.c: fixed multi-line derefernce issue Pratik Jain
2018-03-15 17:39 ` Greg KH
[not found] ` <CABbwmYcnDNcA70_-BhLkBcuK-77tk3BWKcvzQts6eWqu5_mMKA@mail.gmail.com>
2018-03-15 18:59 ` Pratik Jain
2018-03-16 10:17 ` Ian Abbott
2018-03-16 10:25 ` Pratik Jain
2018-03-16 10:29 ` Pratik Jain
2018-03-16 10:36 ` Dan Carpenter
2018-03-16 10:48 ` Pratik Jain
2018-03-16 10:55 ` Ian Abbott
[not found] ` <20180315193246.GA1565@kroah.com>
2018-03-15 19:49 ` Pratik Jain
2018-03-16 8:09 ` 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).