Messages in this thread | | | Date | Sat, 7 Feb 2015 13:24:36 +0300 | From | Dan Carpenter <> | Subject | Re: [PATCH 1/1] drivers/base: Remove unnecessary OOM message |
| |
Facts: 1) None of these four error messages will ever be printed. http://lwn.net/Articles/627419/ 2) These messages are a waste of RAM.
Debatable: 1) These messages are bad style and distracting. Simple code is better. 2) The normal OOM message is enough to find which allocation failed.
Not everbody, but a lot of people write these kinds of error messages with their brain on auto-pilot because they think they *should* do it. It's quite common to do things like printk("dev is NULL. %s", dev->name);. I'm happy for this checkpatch warning because it hopefully bumps people out of mindless mode and makes them think about error messages.
regards, dan carpenter
| |