Linux SPARSE checker discussions
 help / color / mirror / Atom feed
From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: "Uwe Kleine-König" <uwe@kleine-koenig.org>
Cc: Martin KaFai Lau <kafai@fb.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Alexei Starovoitov <ast@kernel.org>,
	Randy Dunlap <rdunlap@infradead.org>,
	Linux-Sparse <linux-sparse@vger.kernel.org>,
	Arthur Fabre <afabre@cloudflare.com>
Subject: Re: sparse problem with Linux kernel v5.5
Date: Fri, 7 Feb 2020 13:43:05 +0100	[thread overview]
Message-ID: <20200207124305.islfnt5kissyv6b6@ltop.local> (raw)
In-Reply-To: <f41aa7cb-399d-277b-eda8-4173f45d7123@kleine-koenig.org>

On Fri, Feb 07, 2020 at 12:34:02PM +0100, Uwe Kleine-König wrote:
> On 2/7/20 9:29 AM, Martin KaFai Lau wrote:
> > I believe x == 1 needs an extra case since ilog2(0) won't work.
> > 
> > Since this function (map creation) is not on the fast path,
> > I currently opt for Linus's suggestion which its code is more
> > self-explanatory.
> 
> If you put my suggestion in a macro that is called for example
> 
> 	ilog2_roundup()
> 
> you might have both: easier code and self-explanation.

This is, essentially, the same as the existing order_base_2().

Best regards,
-- Luc

  reply	other threads:[~2020-02-07 12:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-06  4:49 sparse problem with Linux kernel v5.5 Randy Dunlap
2020-02-06  4:58 ` Randy Dunlap
2020-02-06  7:18 ` Linus Torvalds
2020-02-06 11:46   ` Luc Van Oostenryck
2020-02-06 18:25     ` Randy Dunlap
2020-02-06 20:06       ` Luc Van Oostenryck
2020-02-06 23:47         ` Linus Torvalds
2020-02-07  0:34           ` Martin KaFai Lau
2020-02-07 10:35             ` Luc Van Oostenryck
2020-02-07  6:34           ` Uwe Kleine-König
2020-02-07  8:29             ` Martin KaFai Lau
2020-02-07 11:34               ` Uwe Kleine-König
2020-02-07 12:43                 ` Luc Van Oostenryck [this message]
2020-02-07 10:31           ` Luc Van Oostenryck

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=20200207124305.islfnt5kissyv6b6@ltop.local \
    --to=luc.vanoostenryck@gmail.com \
    --cc=afabre@cloudflare.com \
    --cc=ast@kernel.org \
    --cc=kafai@fb.com \
    --cc=linux-sparse@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=torvalds@linux-foundation.org \
    --cc=uwe@kleine-koenig.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox