Hi guys, the following rule:
@@
identifier e;
identifier dma_fn =~ "dma_(set_mask|set_coherent_mask)";
@@
- e = dma_fn(...);
- if(<+... e ...+>) {...}
can delete the code:
retval = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32));
if (retval) {
return -1;
}
But did nothing to the code:
retval = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32));
if (retval) {
retval = dma_set_coherent_mask(&pdev->dev,
DMA_BIT_MASK(32));
if (retval) {
dev_err(&pdev->dev,
"No usable DMA config, aborting\n");
goto err_alloc_pci_res_mem;
}
}
Any suggests ? thanks.
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)