Re: kernel/module: Delete an error message for a failed memory allocation in add_module_usage()

From: Joe Perches
Date: Thu Oct 19 2017 - 07:45:46 EST


On Thu, 2017-10-19 at 13:35 +0200, SF Markus Elfring wrote:
> > > > > Omit an extra message for a memory allocation failure in this function.
> > > > >
> > > > > This issue was detected by using the Coccinelle software.
[]
> > > Do you see any need that I should extend subsequent commit messages
> > > for this software transformation pattern?
> >
> > Add a description of _why_ this is being done.
> >
> > Something like:
> >
> > "because there is a dump_stack() done on allocation failures
> > without __GFP_JNOWARN"
>
> How do you think about to convert such a description into a special format
> for further reference documentation?

I think it's a bad idea if it's a "special" format.

Always write _why_ some code is being changed.

People could read the commit descriptions and would not need
to take extra time to lookup external references.

Maybe add something like
"see (commit <foo> or <file>)" for additional details"