All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: smatch@vger.kernel.org
Subject: Re: [PATCH] check_ida_alloc: Add a new check to spot invalid conversion from ida_simple_get()
Date: Fri, 10 Jun 2022 13:25:03 +0300	[thread overview]
Message-ID: <20220610102503.GC2146@kadam> (raw)
In-Reply-To: <0a738352f2bc12e9bce553e03fdec48ffb237899.1654806710.git.christophe.jaillet@wanadoo.fr>

On Thu, Jun 09, 2022 at 10:33:40PM +0200, Christophe JAILLET wrote:
> The 'max' parameter of ida_alloc_max() and ida_alloc_range() is not
> interpreted as it was in the deprecated ida_simple_get().
> 
> The 'max' value in the new functions is inclusive but it was exclusive
> before. So, in older code, this parameter was often a power of 2, such as
> 1 << 16, so that the maximum possible value was 0xffff.
> 
> Now a power of 2 value is spurious.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> Most of the code is stolen from smatch_power_of_two.c
> ---

Thanks, applied!

regards,
dan carpenter

      reply	other threads:[~2022-06-10 10:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-09 20:33 [PATCH] check_ida_alloc: Add a new check to spot invalid conversion from ida_simple_get() Christophe JAILLET
2022-06-10 10:25 ` Dan Carpenter [this message]

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=20220610102503.GC2146@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=smatch@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.