Re: [PATCH] staging: comedi: das800: fix request_irq() warn

2021-03-18 Thread Tong Zhang
Thank you all,
I fixed the commit log and resent as v2.
Thanks,
- Tong

On Wed, Mar 17, 2021 at 8:48 AM Ian Abbott  wrote:
>
> On 16/03/2021 22:42, Tong Zhang wrote:
> > request_irq() wont accept a name which contains slash so we need to
> > repalce it with something else -- otherwise it will trigger a warning
> > and the entry in /proc/irq/ will not be created
> > since the .name might be used by userspace and we don't want to break
> > userspace, so we are changing the parameters passed to request_irq()
> >
> > Suggested-by: Ian Abbott 
> > Signed-off-by: Tong Zhang 
> > ---
> >   drivers/staging/comedi/drivers/das800.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/comedi/drivers/das800.c 
> > b/drivers/staging/comedi/drivers/das800.c
> > index 2881808d6606..bc08324f422f 100644
> > --- a/drivers/staging/comedi/drivers/das800.c
> > +++ b/drivers/staging/comedi/drivers/das800.c
> > @@ -668,7 +668,7 @@ static int das800_attach(struct comedi_device *dev, 
> > struct comedi_devconfig *it)
> >   dev->board_name = board->name;
> >
> >   if (irq > 1 && irq <= 7) {
> > - ret = request_irq(irq, das800_interrupt, 0, dev->board_name,
> > + ret = request_irq(irq, das800_interrupt, 0, "das800",
> > dev);
> >   if (ret == 0)
> >   dev->irq = irq;
> >
>
> Looks good (apart from the minor spelling niggle spotted by Dan
> Carpenter), thanks!
>
> Reviewed-by: Ian Abbott 
>
> --
> -=( Ian Abbott  || MEV Ltd. is a company  )=-
> -=( registered in England & Wales.  Regd. number: 02862268.  )=-
> -=( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=-
> -=( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. || www.mev.co.uk )=-


Re: [PATCH] staging: comedi: das800: fix request_irq() warn

2021-03-17 Thread Tong Zhang
Thanks for sharing those best practices, Dan.
I was wondering if there is a spelling checker for git.


Re: [PATCH] staging: comedi: das800: fix request_irq() warn

2021-03-17 Thread Ian Abbott

On 16/03/2021 22:42, Tong Zhang wrote:

request_irq() wont accept a name which contains slash so we need to
repalce it with something else -- otherwise it will trigger a warning
and the entry in /proc/irq/ will not be created
since the .name might be used by userspace and we don't want to break
userspace, so we are changing the parameters passed to request_irq()

Suggested-by: Ian Abbott 
Signed-off-by: Tong Zhang 
---
  drivers/staging/comedi/drivers/das800.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/drivers/das800.c 
b/drivers/staging/comedi/drivers/das800.c
index 2881808d6606..bc08324f422f 100644
--- a/drivers/staging/comedi/drivers/das800.c
+++ b/drivers/staging/comedi/drivers/das800.c
@@ -668,7 +668,7 @@ static int das800_attach(struct comedi_device *dev, struct 
comedi_devconfig *it)
dev->board_name = board->name;
  
  	if (irq > 1 && irq <= 7) {

-   ret = request_irq(irq, das800_interrupt, 0, dev->board_name,
+   ret = request_irq(irq, das800_interrupt, 0, "das800",
  dev);
if (ret == 0)
dev->irq = irq;



Looks good (apart from the minor spelling niggle spotted by Dan 
Carpenter), thanks!


Reviewed-by: Ian Abbott 

--
-=( Ian Abbott  || MEV Ltd. is a company  )=-
-=( registered in England & Wales.  Regd. number: 02862268.  )=-
-=( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=-
-=( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. || www.mev.co.uk )=-


Re: [PATCH] staging: comedi: das800: fix request_irq() warn

2021-03-17 Thread Dan Carpenter
On Wed, Mar 17, 2021 at 01:55:40AM -0400, Tong Zhang wrote:
> Thanks for pointing that out.
> Yes you are right there is a mistake.
> I am a human. Human make mistakes. Therefore I make mistakes.
> 

Yep.  We all make mistakes.  One thing to do is if you make a mistake
then check to see if anyone else has made a similar mistake.

git grep repalce

If enough people make that specific mistake then consider adding it to
the list of commonly mispelled words:  scripts/spelling.txt
I looked through the logs and it looks like someone mispells it once a
year so it's probably not common enough to worry about.

regards,
dan carpenter



Re: [PATCH] staging: comedi: das800: fix request_irq() warn

2021-03-16 Thread Dan Carpenter
On Tue, Mar 16, 2021 at 06:42:26PM -0400, Tong Zhang wrote:
> request_irq() wont accept a name which contains slash so we need to
> repalce it with something else -- otherwise it will trigger a warning
  ^^^
I don't normally comment on spelling mistakes in the commit message but
you're copy and pasting "repalce" over and over...

> and the entry in /proc/irq/ will not be created
> since the .name might be used by userspace and we don't want to break
> userspace, so we are changing the parameters passed to request_irq()


regards,
dan carpenter



[PATCH] staging: comedi: das800: fix request_irq() warn

2021-03-16 Thread Tong Zhang
request_irq() wont accept a name which contains slash so we need to
repalce it with something else -- otherwise it will trigger a warning
and the entry in /proc/irq/ will not be created
since the .name might be used by userspace and we don't want to break
userspace, so we are changing the parameters passed to request_irq()

Suggested-by: Ian Abbott 
Signed-off-by: Tong Zhang 
---
 drivers/staging/comedi/drivers/das800.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/drivers/das800.c 
b/drivers/staging/comedi/drivers/das800.c
index 2881808d6606..bc08324f422f 100644
--- a/drivers/staging/comedi/drivers/das800.c
+++ b/drivers/staging/comedi/drivers/das800.c
@@ -668,7 +668,7 @@ static int das800_attach(struct comedi_device *dev, struct 
comedi_devconfig *it)
dev->board_name = board->name;
 
if (irq > 1 && irq <= 7) {
-   ret = request_irq(irq, das800_interrupt, 0, dev->board_name,
+   ret = request_irq(irq, das800_interrupt, 0, "das800",
  dev);
if (ret == 0)
dev->irq = irq;
-- 
2.25.1