Skip to contentSkip to conversation

staging: mt29f_spinand: Replacing pr_info with dev_info after the call to devm_kzalloc

PATCH Greg KH 1 participant 1 message Mar 11, 2016 1 message not in the archive

lore
Share & tools
lore

Greg KH

author
#1 lore raw
In reply to a message not in the archive
Quoted 12 lines · pooja.shamili

The function devm_kzalloc has a first argument of type struct device *. This is the type of argument required by printing functions such as dev_info, dev_err, etc. Thus, functions like pr_info should not normally be used after a call to devm_kzalloc. Thus, all pr_info occurances are replaced with dev_info function calls.

This was done using Coccinelle, the patch being:
@@
expression E1,E2;
expression list args;
@@

Quoted 8 lines

E1 = devm_kzalloc(E2, ...);
<...
- pr_info(
+ dev_info(E2,
args);
...>

I need a "real" name here, and in the From: line please.

thanks,

greg k-h