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]
Message-ID: <1259689585.21388.32.camel@Joe-Laptop.home>
Date:	Tue, 01 Dec 2009 09:46:25 -0800
From:	Joe Perches <joe@...ches.com>
To:	Marcin Slusarz <marcin.slusarz@...il.com>
Cc:	Stephen Hemminger <shemminger@...tta.com>,
	David Miller <davem@...emloft.net>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drivers/block/floppy.c: stylistic cleanups

On Tue, 2009-12-01 at 18:36 +0100, Marcin Slusarz wrote: 
> On Mon, Nov 30, 2009 at 08:13:40PM -0800, Joe Perches wrote:
> > +#define CALL(x)		do { if ((x) == -EINTR) return -EINTR; } while (0)
> > +#define ECALL(x)	do { if ((ret = (x))) return ret; } while (0)
> > +#define _WAIT(x, i)	CALL(ret = wait_til_done((x), i))
> > +#define WAIT(x)		_WAIT((x), interruptible)
> > +#define IWAIT(x)	_WAIT((x), 1)
> 
> why not remove these macros too? (probably in a seperate patch)
> macros which hide "return" are very annoying...

Hence the "still ugly".  I agree these aren't good.

> > +#define LOCK_FDC(drive, interruptible)	    \
> > +	if (lock_fdc(drive, interruptible)) \
> > +		return -EINTR;
> 
> another annoying macro

True. 
  
> > +	if (UNIT(current_drive) < 0) {
> > +		reset_fdc();
> > +		return;
> > +	}
> >  }
> 
> unneeded return

> >  	 * installing the new fdutils package */
> > -	if (cmd == CDROMEJECT ||	/* CD-ROM eject */
> > -	    cmd == 0x6470 /* SunOS floppy eject */ ) {
> > +	if (cmd == CDROMEJECT || cmd == 0x6470) {
> 
> please add descriptive constant

Patches are apparently welcomed by Stephen.
Don't wait for me, I'll catch up.

cheers, Joe

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ