On Thu, Mar 02, 2006 at 11:26:13AM +0100, Pierre Ossman wrote:
> This I know. My beef is the readability of:
>
> if (do_dma)
> *dev->dma_mask = DEVICE_DMA_MASK;
> else
> *dev->dma_mask = 0;
>
> I.e. we use dma_mask even though we don't do DMA.
Not a lot we can do about the readability issue - we end up with code
like that in some layer of the MMC. If it's in mmc_queue, it might be:
u64 limit = BLK_BOUNCE_HIGH;
if (host->caps & MMC_CAP_DMA &&
host->dev->dma_mask && *host->dev->dma_mask)
limit = *host->dev->dma_mask;
which is equally as (un)readable as your code.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]