Re: [PATCH 1/1] drivers/base: Remove unnecessary OOM message

From: Dan Carpenter
Date: Sat Feb 07 2015 - 05:25:23 EST


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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/