Messages in this thread | | | Date | Mon, 20 Mar 2023 14:10:33 -0700 | From | Ira Weiny <> | Subject | Re: [PATCH] Staging: nvec: Change container_of macro to an inline function. |
| |
Sumitra Sharma wrote: > On Sat, Mar 18, 2023 at 06:14:50PM +0100, Julia Lawall wrote: > > > > > > On Sat, 18 Mar 2023, Sumitra Sharma wrote: > > > > > The macro has the drawback that one cannot determine > > > what type it applies to by looking at the definition. > > > Hence this macro definition is not type-safe. > > > > > > The inline function gives the same benefits as the > > > macro and only accepts the specific type of arguments. > > > Use static because the definition only requires it to be > > > visible in the current file. > > > > Sumitra, > > > > The subject line and log message could be a little less generic. For the > > subject line, one has the impression that you are changing the definition > > of container_of itself. > > > > The log message is also a bit wordy. Something like the following would > > be more concise and still present the issue: > > > > Okay. I will focus more on writing better patch subject and description.
Sumitra,
I can't tell for sure via email if you are getting discouraged. But if you are don't feel bad. Writing good commit messages is hard.
That said, I see a couple of build errors from 0day on this patch. Do use the tools to correct things like that before submitting.
Ira
| |