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:	Wed, 13 Dec 2006 22:16:35 -0800
From:	Roland Dreier <rdreier@...co.com>
To:	Ben Collins <ben.collins@...ntu.com>
Cc:	Linus Torvalds <torvalds@...l.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2.6.20-rc1] ib_verbs: Use explicit if-else statements to avoid errors with do-while macros

I see Linus already took this, which is fine... blame me for merging
this without fixing my cross-compile testbed.

Anyway:

 >  static inline int ib_dma_mapping_error(struct ib_device *dev, u64 dma_addr)
 >  {
 > -	return dev->dma_ops ?
 > -		dev->dma_ops->mapping_error(dev, dma_addr) :
 > -		dma_mapping_error(dma_addr);
 > +	if (dev->dma_ops)
 > +		return dev->dma_ops->mapping_error(dev, dma_addr);
 > +	return dma_mapping_error(dma_addr);

This stuff wasn't needed, was it?  It's only the wrappers around void
functions that can't use ?: I would think... surely any trivial macro
replacement for a dma API function that returns a value must evaluate
to something like (0) that is safe to use in this context.

 - R.
-
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