All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jesse Brandeburg <jesse.brandeburg@intel.com>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: <tglx@linutronix.de>, <mingo@redhat.com>, <bp@alien8.de>,
	<x86@kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux@rasmusvillemoes.dk>, <dan.j.williams@intel.com>,
	<peterz@infradead.org>
Subject: Re: [PATCH v3 2/2] lib: make a test module with set/clear bit
Date: Fri, 21 Feb 2020 15:16:11 -0800	[thread overview]
Message-ID: <20200221151611.00003b17@intel.com> (raw)
In-Reply-To: <20200221102518.GM10400@smile.fi.intel.com>

On Fri, 21 Feb 2020 12:25:18 +0200 Andy wrote:
> On Thu, Feb 20, 2020 at 03:21:55PM -0800, Jesse Brandeburg wrote:
> > Test some bit clears/sets to make sure assembly doesn't change, and
> > that the set_bit and clear_bit functions work and don't cause sparse
> > warnings.
> > 
> > Instruct Kbuild to build this file with extra warning level -Wextra,
> > to catch new issues, and also doesn't hurt to build with C=1.
> > 
> > This was used to test changes to arch/x86/include/asm/bitops.h.
> > 
> > In particular, sparse (C=1) was very concerned when the last bit
> > before a natural boundary, like 7, or 31, was being tested, as this
> > causes sign extension (0xffffff7f) for instance when clearing bit 7.
> > 
> > Recommended usage:
> > make defconfig
> > scripts/config -m CONFIG_TEST_BITOPS
> > make modules_prepare
> > make C=1 W=1 lib/test_bitops.ko
> > objdump -S -d lib/test_bitops.ko  
> 
> Thanks!
> One comments below, after addressing:
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>

Thanks!

> 	BITOPS_LAST = 255,
> 	BITOPS_LENGTH = 256
> 
> and...
> 
> static DECLARE_BITMAP(g_bitmap, BITOPS_LENGTH);

Fixed in v4

  reply	other threads:[~2020-02-21 23:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-20 23:21 [PATCH v3 1/2] x86: fix bitops.h warning with a moved cast Jesse Brandeburg
2020-02-20 23:21 ` [PATCH v3 2/2] lib: make a test module with set/clear bit Jesse Brandeburg
2020-02-21 10:25   ` Andy Shevchenko
2020-02-21 23:16     ` Jesse Brandeburg [this message]
2020-02-21 10:21 ` [PATCH v3 1/2] x86: fix bitops.h warning with a moved cast Andy Shevchenko
2020-02-21 15:33 ` David Laight

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=20200221151611.00003b17@intel.com \
    --to=jesse.brandeburg@intel.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=bp@alien8.de \
    --cc=dan.j.williams@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=x86@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.