Re: Best practice for embedded code samles? [Was: drm/drv: Use // for comments in example code]

2019-08-14 Thread Jani Nikula
On Tue, 13 Aug 2019, Jonathan Corbet wrote: > On Sun, 11 Aug 2019 23:32:15 +0200 > Sam Ravnborg wrote: > >> I wonder if there is a better way to embed a code sample >> than reverting to // style comments. >> >> As the kernel do not like // comments we should try to avoid them in >> examples. >

Re: Best practice for embedded code samles? [Was: drm/drv: Use // for comments in example code]

2019-08-13 Thread Jonathan Corbet
On Sun, 11 Aug 2019 23:32:15 +0200 Sam Ravnborg wrote: > I wonder if there is a better way to embed a code sample > than reverting to // style comments. > > As the kernel do not like // comments we should try to avoid them in > examples. If you're embedding a code sample *into a code comment*

Best practice for embedded code samles? [Was: drm/drv: Use // for comments in example code]

2019-08-11 Thread Sam Ravnborg
On Thu, Aug 08, 2019 at 06:36:28PM +0200, Jonathan Neuschäfer wrote: > This improves Sphinx output in two ways: > > - It avoids an unmatched single-quote ('), about which Sphinx complained: > > /.../Documentation/gpu/drm-internals.rst:298: > WARNING: Could not lex literal_block as "c".