qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/5] coccinelle: use DIV_ROUND_UP


From: Marc-André Lureau
Subject: Re: [Qemu-devel] [PATCH 2/5] coccinelle: use DIV_ROUND_UP
Date: Thu, 08 Jun 2017 07:37:20 +0000

Hi

On Thu, Jun 8, 2017 at 1:50 AM Eric Blake <address@hidden> wrote:

> On 06/07/2017 02:46 AM, Marc-André Lureau wrote:
> > The coccinelle/round.cocci script doesn't catch hard coded values.
> >
> > I used the following script over qemu code base:
> >
> > (
> > - ((e1) + 3) / (4)
> > + DIV_ROUND_UP(e1,4)
>
> As in 1/5, can't you also write a search for ((e1) + (e2) - 1) / e2, to
> cover non-constant divisions?
>

That one is covered by scripts/coccinelle/round.cocci

I can merge my script there, but I would need to spend some time to clean
it up (help welcome).

-- 
Marc-André Lureau


reply via email to

[Prev in Thread] Current Thread [Next in Thread]