As a continuation to my last post, I will continuetalking about the interesting scripts in Coccinellery.
simplify_ioremap_resource.cocci is a script that detects case where there is error handling for a platform_get_resource call just before a call to devm_ioremap_resource. This error handling is not required and should be removed. This, this and this are example patches that have been added to the kernel already.
simple_kzalloc.cocci finds cases where kmalloc and memset 0 are used since they can be replaced by a direct call to kzalloc. After using this script Julia suggested finding more functions like these where memset and the function call can be replaced by a direct function call. For example: vmalloc/vzalloc is a similar case and a patch accepted for this case.
moduleparam.cocci is a script to find cases where both module.h and moduleparam.h are included. module.h contains a call to moduleparam.h making the call to it redundant and useless. These are some accepted patches for the same: one and two.
export_static.cocci finds cases where a static function is being exported which is not possible. Sadly could not find any cases to submit patches on.