lkml.org 
[lkml]   [2013]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: coccinelle and bitmask arithmetic (was: Re: [patch] TTY: synclink, small cleanup in dtr_rts())
From
Date
On Tue, 2013-01-29 at 18:49 +0100, Julia Lawall wrote:
> How about the following (from today's linux-next). They appear to be
> trying to do the same calculation, once with + and once with |.

(cc'ing the original developer and Russell King)

Likely the it8152_pci_platform_notify uses should use +

> arch/arm/common/it8152.c
>
> int dma_set_coherent_mask(struct device *dev, u64 mask)
> {
> if (mask >= PHYS_OFFSET + SZ_64M - 1)
> return 0;
>
> return -EIO;
> }
>
> static int it8152_pci_platform_notify(struct device *dev)
> {
> if (dev->bus == &pci_bus_type) {
> if (dev->dma_mask)
> *dev->dma_mask = (SZ_64M - 1) | PHYS_OFFSET;
> dev->coherent_dma_mask = (SZ_64M - 1) | PHYS_OFFSET;
> dmabounce_register_dev(dev, 2048, 4096, it8152_needs_bounce);
> }
> return 0;
> }




\
 
 \ /
  Last update: 2013-01-29 19:41    [W:0.311 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site