Subject: [PATCH 1/2] staging : Comedi : comedi_fops : Fixed the return error, code
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 22 lines · Santhosh Pai
From
9ea09e194d6ccdd0b229b408df1c86b43b1fdd7dMon Sep 17 00:00:00 2001
From: santhosh pai <[email protected]>
Date: Mon, 22 Jun 2015 23:26:33 +0530
Subject: [PATCH 2/2] staging : Comedi :comedi_fops: Fixed the return error
code
try_module_getfails when the reference count of the module is not allowed to be incremented ,and hence-ENXIOis returned indicating no device or address.Signed-off-by santhosh pai <[email protected]>--- drivers/staging/comedi/comedi_fops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/comedi/comedi_fops.c +0
-0
drivers/staging/comedi/comedi_fops.c static int comedi_open(struct inode *inode, struct file *file) · line 2612
Quoted 8 lines
drivers/staging/comedi/comedi_fops.c +1
-1@@ -2606,7 +2606,7 @@ static int comedi_open(struct inode *inode, struct file *file) }if (dev->attached && dev->use_count ==0 ) {if (!try_module_get (dev->driver->module)) { - rc = -EPERM ; + rc = -ENXIO ; goto out; }if (dev->open) {
The patch itself is okay, but all the stuff around the patch is a bit weird, such as:
1. all those email headers in the commit message
2. useless indentation in the commit message
3. subject line in commit message says "PATCH 2/2", but email subject line says "PATCH 1/2"
4. stray comma in email subject line
5. spaces before colon in subject lines
This is taking too long, so I'll post a cleaned-up version.
Signature · 2 lines
-=( Ian Abbott @ MEV Ltd. E-mail: <[email protected]> )=- -=( Web: http://www.mev.co.uk/ )=-
Quoted 38 lines · Ian Abbott
Quoted 31 lines · Santhosh Pai
From
9ea09e194d6ccdd0b229b408df1c86b43b1fdd7dMon Sep 17 00:00:00 2001
From: santhosh pai <[email protected]>
Date: Mon, 22 Jun 2015 23:26:33 +0530
Subject: [PATCH 2/2] staging : Comedi :comedi_fops: Fixed the return error
code
try_module_getfails when the reference count of the module is not allowed to be incremented ,and hence-ENXIOis returned indicating no device or address.Signed-off-by santhosh pai <[email protected]>--- drivers/staging/comedi/comedi_fops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/comedi/comedi_fops.c +1
-1@@ -2606,7 +2606,7 @@ static int comedi_open(struct inode *inode, struct file *file) }if (dev->attached && dev->use_count ==0 ) {if (!try_module_get (dev->driver->module)) { - rc = -EPERM ; + rc = -ENXIO ; goto out; }Quoted 2 lines
if (dev->open) {The patch itself is okay, but all the stuff around the patch is a bit weird, such as:
Quoted 6 lines
1. all those email headers in the commit message
2. useless indentation in the commit message
3. subject line in commit message says "PATCH 2/2", but email subject line says "PATCH 1/2"
4. stray comma in email subject line
5. spaces before colon in subject lines
Actually, the patch doesn't apply, because it's on top of your other patch that changed -ENOSYS to -EPERM.
Quoted 3 lines
This is taking too long, so I'll post a cleaned-up version.
I'll combine your two changes to the error return value into a single patch.
Signature · 2 lines
-=( Ian Abbott @ MEV Ltd. E-mail: <[email protected]> )=- -=( Web: http://www.mev.co.uk/ )=-
PATCH 1/1 staging: Comedi: comedi_fops: Fixed the return error code
From: Santhosh Pai <[email protected]>
From: Santhosh Pai <[email protected]>
This patch fixes the checkpatch.pl warning:
WARNING: ENOSYS means 'invalid syscall nr' and nothing else
try_module_get fails when the reference count of the module is not allowed to be incremented ,and hence -ENXIO is returned indicating no device or address.
[IA - combined two of santhosh's changes to the error return value!]
--- drivers/staging/comedi/comedi_fops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/comedi/comedi_fops.c +1 -1
@@ -2606,7 +2606,7 @@ static int comedi_open(struct inode *inode, struct file *file) }if (dev->attached && dev->use_count ==0 ) {if (!try_module_get (dev->driver->module)) { - rc = -ENOSYS ; + rc = -ENXIO ; goto out; }if (dev->open) {
Signature · 1 line
2.1.4
Re: [PATCH] staging: Comedi: comedi_fops: Fixed the return error code
Quoted 3 lines · Ian Abbott
From: Santhosh Pai <[email protected]>
From: Santhosh Pai <[email protected]>
Oops. I managed to screw it up as well. I'll repost it.
Signature · 2 lines
-=( Ian Abbott @ MEV Ltd. E-mail: <[email protected]> )=- -=( Web: http://www.mev.co.uk/ )=-
PATCH 1/1 staging: Comedi: comedi_fops: Fixed the return error code
In reply to Ian AbbottFrom: Santhosh Pai <[email protected]>
This patch fixes the checkpatch.pl warning:
WARNING: ENOSYS means 'invalid syscall nr' and nothing else
try_module_get fails when the reference count of the module is not allowed to be incremented ,and hence -ENXIO is returned indicating no device or address.
[IA - combined two of santhosh's changes to the error return value!]
--- drivers/staging/comedi/comedi_fops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/comedi/comedi_fops.c +1 -1
@@ -2606,7 +2606,7 @@ static int comedi_open(struct inode *inode, struct file *file) }if (dev->attached && dev->use_count ==0 ) {if (!try_module_get (dev->driver->module)) { - rc = -ENOSYS ; + rc = -ENXIO ; goto out; }if (dev->open) {
Signature · 1 line
2.1.4