lkml.org 
[lkml]   [2006]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2.6.20-rc1] ib_verbs: Use explicit if-else statements to avoid errors with do-while macros
From
Date
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-12-14 07:29    [W:0.070 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site