lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 17 Feb 2018 21:27:53 +0100
From:   Marcus Folkesson <marcus.folkesson@...il.com>
To:     Jerry Hoemann <jerry.hoemann@....com>
Cc:     Guenter Roeck <linux@...ck-us.net>, wim@...ux-watchdog.org,
        linux-watchdog@...r.kernel.org, linux-kernel@...r.kernel.org,
        rwright@....com, maurice.a.saldivar@....com, mingo@...nel.org
Subject: Re: [v3,04/11] watchdog/hpwdt: white space changes

On Sat, Feb 17, 2018 at 12:32:08PM -0700, Jerry Hoemann wrote:
> On Sat, Feb 17, 2018 at 08:17:34AM -0800, Guenter Roeck wrote:
> > On Thu, Feb 15, 2018 at 04:43:53PM -0700, Jerry Hoemann wrote:
> > > Minor white space changes and some name clean up.
> > > 
> > > Signed-off-by: Jerry Hoemann <jerry.hoemann@....com>
> > > ---
> > >  MODULE_DEVICE_TABLE(pci, hpwdt_devices);
> > >  
> > > @@ -102,7 +100,7 @@ static int hpwdt_time_left(void)
> > >  	return TICKS_TO_SECS(ioread16(hpwdt_timer_reg));
> > >  }
> > >  
> > > -#ifdef CONFIG_HPWDT_NMI_DECODING
> > > +#ifdef CONFIG_HPWDT_NMI_DECODING	/* { */
> > >  static int hpwdt_my_nmi(void)
> > >  {
> > >  	return ioread8(hpwdt_nmistat) & 0x6;
> > > @@ -133,7 +131,7 @@ static int hpwdt_pretimeout(unsigned int ulReason, struct pt_regs *regs)
> > >  
> > >  	return NMI_HANDLED;
> > >  }
> > > -#endif /* CONFIG_HPWDT_NMI_DECODING */
> > > +#endif					/* } */
> > 
> > I disagree with those changes. While I don't object to adding the '{'
> > per se, I find it very useful to have the 'CONFIG_HPWDT_NMI_DECODING'
> > with an endif to be able to associate it with the matching #ifdef.

Well, it does not follow our coding style.

Documentation/process/coding-style.rst:

	At the end of any non-trivial #if or #ifdef block (more than a few lines),
	place a comment after the #endif on the same line, noting the conditional
	expression used.  For instance:

	.. code-block:: c

		#ifdef CONFIG_SOMETHING
		...
		#endif /* CONFIG_SOMETHING */

> 
> The matching /* { */ and /* } */ allow for quickly the finding of the
> matching ifdef/endif.
> 
> In the "vim" editor, the command '%' will take one from one curly paren to its
> matching curly paren...

'%' in vim let you jump between matching ifdef/endif as well.

> 
> There is a similar sequence for emacs.
> 
> > 
> > Deferring to Wim.
> > 
> > Guenter
> > 
> 
> -- 
> 
> -----------------------------------------------------------------------------
> Jerry Hoemann                  Software Engineer   Hewlett Packard Enterprise
> -----------------------------------------------------------------------------

Thanks,
Marcus Folkesson

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ