Documentation
A description of the options accepted byspatch
is available
here.
A grammar of the SmPL language is available in pdf or html. This document also contains some annotated examples.
More examples are available here.
The LWN articles about Coccinelle may provide a useful introduction: Semantic patching with Coccinelle by Valerie Aurora, and Evolutionary development of a semantic patch using Coccinelle by Wolfram Sang. Eric Leblond has also written an article about his experiences.
An introductory lecture is available here.