On Fri, 27 Jul 2018, Timur Tabi wrote:
> On Thu, Jul 26, 2018 at 5:54 PM, Julia Lawall <[email protected]> wrote:
>
> > @script:python s@
> > c << r.c;
> > c2;
> > @@
> > coccinelle.c2 = "desired change in c with extra double quotes on the
> > outside"
>
> Ok, I almost have it working. It seems to trigger some of the time.
>
> @script:python s@
> c << r.c;
> c2;
> @@
> if c.startswith('"NVRM: '):
> coccinelle.c2 = '"' + c[7:];
> else:
> coccinelle.c2 = c;
>
> So this works:
>
> - DBG_PRINTF((DBG_MODULE_OS, DBG_LEVEL_ERRORS,
> - "NVRM: failed to blacklist GPU: 0x%x\n", rmStatus));
> + NV_PRINTF(LEVEL_ERROR, "failed to blacklist GPU: 0x%x\n",
> + rmStatus);
>
> But this didn't:
>
> - DBG_PRINTF((DBG_MODULE_OS, DBG_LEVEL_ERRORS,
> - "NVRM: fifoGetUserdBar1MapInfo failed, bailing out of
> RmInitAdapter\n"));
> + NV_PRINTF(LEVEL_ERROR,
> + "NVRM: fifoGetUserdBar1MapInfo failed, bailing out
> of RmInitAdapter\n");
Do you know what the problem is? If not, please send the complete
semantic patch and an appropriate .c file so that I can test it.
thanks,
julia
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci