Re: cocci script hints request

2021-04-13 Thread Fabio Aiuto
On Tue, Apr 13, 2021 at 11:56:20AM +0200, Julia Lawall wrote: > > > On Tue, 13 Apr 2021, Fabio Aiuto wrote: > > > Hi, > > > > I would like to improve the following coccinelle script: > > > > @@ > > expression a, fmt; > > expression list var_args; > > @@ > > > > - DBG_871X_LEVEL(a, fmt,

Re: cocci script hints request

2021-04-13 Thread Julia Lawall
On Tue, 13 Apr 2021, Fabio Aiuto wrote: > Hi, > > I would like to improve the following coccinelle script: > > @@ > expression a, fmt; > expression list var_args; > @@ > > - DBG_871X_LEVEL(a, fmt, var_args); > + printk(fmt, var_args); > > I would replace the DBG_871X_LEVEL macro

Re: cocci script hints request

2021-04-13 Thread Greg KH
On Tue, Apr 13, 2021 at 11:24:56AM +0200, Fabio Aiuto wrote: > On Tue, Apr 13, 2021 at 11:11:38AM +0200, Greg KH wrote: > > On Tue, Apr 13, 2021 at 11:04:01AM +0200, Fabio Aiuto wrote: > > > Hi, > > > > > > I would like to improve the following coccinelle script: > > > > > > @@ > > > expression

Re: cocci script hints request

2021-04-13 Thread Fabio Aiuto
On Tue, Apr 13, 2021 at 11:11:38AM +0200, Greg KH wrote: > On Tue, Apr 13, 2021 at 11:04:01AM +0200, Fabio Aiuto wrote: > > Hi, > > > > I would like to improve the following coccinelle script: > > > > @@ > > expression a, fmt; > > expression list var_args; > > @@ > > > > -

Re: cocci script hints request

2021-04-13 Thread Greg KH
On Tue, Apr 13, 2021 at 11:04:01AM +0200, Fabio Aiuto wrote: > Hi, > > I would like to improve the following coccinelle script: > > @@ > expression a, fmt; > expression list var_args; > @@ > > - DBG_871X_LEVEL(a, fmt, var_args); > + printk(fmt, var_args); > > I would replace the

cocci script hints request

2021-04-13 Thread Fabio Aiuto
Hi, I would like to improve the following coccinelle script: @@ expression a, fmt; expression list var_args; @@ - DBG_871X_LEVEL(a, fmt, var_args); + printk(fmt, var_args); I would replace the DBG_871X_LEVEL macro with printk, but I can't find a way to add KERN_* constant prefix