From: julia.lawall@lip6.fr (Julia Lawall)
To: cocci@systeme.lip6.fr
Subject: [Cocci] coccinelle and bitmask arithmetic (was: Re: [patch] TTY: synclink, small cleanup in dtr_rts())
Date: Tue, 29 Jan 2013 18:49:02 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.02.1301291847070.3339@hadrien> (raw)
In-Reply-To: <1359475998.4196.26.camel@joe-AO722>
How about the following (from today's linux-next). They appear to be
trying to do the same calculation, once with + and once with |.
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;
}
julia
next prev parent reply other threads:[~2013-01-29 17:49 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20130127194039.GA18787@elgon.mountain>
[not found] ` <1359317078.14406.12.camel@joe-AO722>
[not found] ` <20130127201947.GO16282@mwanda>
[not found] ` <9561.1359474916@turing-police.cc.vt.edu>
2013-01-29 16:13 ` [Cocci] coccinelle and bitmask arithmetic (was: Re: [patch] TTY: synclink, small cleanup in dtr_rts()) Joe Perches
2013-01-29 16:19 ` Julia Lawall
2013-01-29 16:31 ` Joe Perches
2013-01-29 17:30 ` Dan Carpenter
2013-01-29 17:42 ` Dan Carpenter
2013-01-29 17:49 ` Julia Lawall [this message]
2013-01-29 18:03 ` Joe Perches
2013-01-30 8:21 ` [Cocci] coccinelle and bitmask arithmetic walter harms
2013-01-30 8:29 ` Joe Perches
2013-01-30 11:14 ` Russell King - ARM Linux
2013-01-30 11:21 ` Julia Lawall
2013-01-30 11:35 ` Russell King - ARM Linux
2013-01-30 16:53 ` Joe Perches
2013-01-30 18:23 ` Russell King - ARM Linux
2013-01-29 18:38 ` [Cocci] coccinelle and bitmask arithmetic (was: Re: [patch] TTY: synclink, small cleanup in dtr_rts()) Julia Lawall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.02.1301291847070.3339@hadrien \
--to=julia.lawall@lip6.fr \
--cc=cocci@systeme.lip6.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox