Staging: comedi: drivers: ni_atmio.c: fixed multi-line derefernce issue
PATCH 1/1 Staging: comedi: drivers: ni_atmio.c: fixed multi-line derefernce issue
Fixed coding style issue.
--- drivers/staging/comedi/drivers/ni_atmio.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/staging/comedi/drivers/ni_atmio.c +2 -3
@@ -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" ); -
Signature · 1 line
2.16.2
Quoted 23 lines · Pratik Jain
Fixed coding style issue.
Signed-off-by Pratik Jain <[email protected]>--- drivers/staging/comedi/drivers/ni_atmio.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/staging/comedi/drivers/ni_atmio.c +2
-2@@ -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 ;
drivers/staging/comedi/drivers/ni_atmio.c module_comedi_driver(ni_atmio_driver); · line 359
Quoted 4 lines
drivers/staging/comedi/drivers/ni_atmio.c +0
-1@@ -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?
A message that is not in the archive (sent off-list or not yet received): CABbwmYcnDNcA70_-BhLkBcuK-77tk3BWKcvzQts6eWqu5_mMKA@mail.gmail.com
PATCH 1/1 Staging: comedi: drivers: ni_atmio.c: fixed multi-line derefernce issue
Fixed coding style issue.
--- drivers/staging/comedi/drivers/ni_atmio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/comedi/drivers/ni_atmio.c +2 -2
@@ -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 ;
Signature · 1 line
2.16.2
Quoted 13 lines · Pratik Jain
Fixed coding style issue.
Signed-off-by Pratik Jain <[email protected]>--- drivers/staging/comedi/drivers/ni_atmio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/staging/comedi/drivers/ni_atmio.c +0
-0
drivers/staging/comedi/drivers/ni_atmio.c static int ni_isapnp_find_board(struct pnp_dev **dev) · line 233
Quoted 10 lines
drivers/staging/comedi/drivers/ni_atmio.c +2
-2@@ -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.
Signature · 2 lines
-=( Ian Abbott @ MEV Ltd. E-mail: <[email protected]> )=- -=( Web: http://www.mev.co.uk/ )=-
Yes, that can be done. But isn't 80 column limit more of a history based convention?
Quoted 35 lines · Ian Abbott
Quoted 23 lines · Pratik Jain
Fixed coding style issue.
Signed-off-by Pratik Jain <[email protected]>--- drivers/staging/comedi/drivers/ni_atmio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/staging/comedi/drivers/ni_atmio.c +2
-2@@ -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)Quoted 3 lines
continue;I suggest splitting the expression just after the '=' to avoid going over 80 columns.
--
-=( Ian Abbott @ MEV Ltd. E-mail: <[email protected]> )=-
-=( Web: http://www.mev.co.uk/ )=-
Yes that can be done. But isn't 80 column limit more of a historical convention?
Quoted 30 lines · Ian Abbott
Quoted 12 lines · Pratik Jain
Fixed coding style issue.
Signed-off-by Pratik Jain <[email protected]>--- drivers/staging/comedi/drivers/ni_atmio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/staging/comedi/drivers/ni_atmio.c +0
-0drivers/staging/comedi/drivers/ni_atmio.c static int ni_isapnp_find_board(struct pnp_dev **dev) · line 233
Quoted 10 lines
drivers/staging/comedi/drivers/ni_atmio.c +2
-2@@ -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.
Signature · 2 lines
-=( Ian Abbott @ MEV Ltd. E-mail: <[email protected]> )=- -=( Web: http://www.mev.co.uk/ )=-
Quoted 3 lines · Pratik Jain
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
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 1/1 Staging: comedi: drivers: ni_atmio.c: fixed multi-line derefernce issue
Fixed coding style issue.
--- drivers/staging/comedi/drivers/ni_atmio.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/staging/comedi/drivers/ni_atmio.c +5 -4
@@ -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 ;
Signature · 1 line
2.16.2
Quoted 18 lines · Pratik Jain
Fixed coding style issue.
Signed-off-by Pratik Jain <[email protected]>--- drivers/staging/comedi/drivers/ni_atmio.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)drivers/staging/comedi/drivers/ni_atmio.c +0
-2@@ -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'),
drivers/staging/comedi/drivers/ni_atmio.c static int ni_isapnp_find_board(struct pnp_dev **dev) · line 234
Quoted 10 lines
drivers/staging/comedi/drivers/ni_atmio.c +5
-2-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!
Signature · 2 lines
-=( Ian Abbott @ MEV Ltd. E-mail: <[email protected]> )=- -=( Web: http://www.mev.co.uk/ )=-
A message that is not in the archive (sent off-list or not yet received): [email protected]
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?
Quoted 10 lines · Pratik Jain
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