How to change long C comment lines for a single statement
Hi,
How to change long C comment lines for a single statement or a C header define as per linux kernel coding style.
E.g.
abc (xyz(), "str"); /* This is example function call with a long line comment */
which is okay:
abc (xyz(), "str"); /* This is example function call with a
long line comment */
abc (xyz(), "str"); /* This is example function call with a
long line comment */
abc (xyz(), "str"); /* This is example function call with a long line comment */ abc (xyz(), "str"); /* * This is example function call with a * long line comment */ abc (xyz(), "str"); /* * This is example function call with a * long line comment */
Regards,
Veera
Quoted 17 lines · R Veera Kumar
Hi,
How to change long C comment lines for a single statement or a C header define as per linux kernel coding style.
E.g.
abc (
xyz(), "str"); /* This is example function call with a long line comment */which is okay:
abc (
xyz(), "str"); /* This is example function call with a
long line comment */abc (
xyz(), "str"); /* This is example function call with a
long line comment */
Quoted 13 lines
abc (xyz(), "str"); /* This is example function call with a long line comment */ abc (xyz(), "str"); /* * This is example function call with a * long line comment */ abc (xyz(), "str"); /* * This is example function call with a * long line comment */
I haven't done an extensive study on the question, but intuitively putting the comment before the call would mke sense.
julia
Quoted 17 lines · R Veera Kumar
Hi,
How to change long C comment lines for a single statement or a C header define as per linux kernel coding style.
E.g.
abc (
xyz(), "str"); /* This is example function call with a long line comment */which is okay:
abc (
xyz(), "str"); /* This is example function call with a
long line comment */abc (
xyz(), "str"); /* This is example function call with a
long line comment */
Quoted 13 lines
abc (xyz(), "str"); /* This is example function call with a long line comment */ abc (xyz(), "str"); /* * This is example function call with a * long line comment */ abc (xyz(), "str"); /* * This is example function call with a * long line comment */
None of those is the "best" way, that would be:
/* This is example function call with a long line comment */ abc (xyz(), "str");
There are hundreds of thousands of examples of this in the kernel source tree to look at for inspiration :)
thanks,
greg k-h