All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Syed Nayyar Waris <syednwaris@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	William Breathitt Gray <vilhelm.gray@gmail.com>,
	Michal Simek <michal.simek@xilinx.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Robert Richter <rrichter@marvell.com>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	"Zhang, Rui" <rui.zhang@intel.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Amit Kucheria <amit.kucheria@verdurent.com>,
	Linux-Arch <linux-arch@vger.kernel.org>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-arm Mailing List <linux-arm-kernel@lists.infradead.org>,
	Linux PM <linux-pm@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] bitmap: Modify bitmap_set_value() to check bitmap length
Date: Sun, 13 Dec 2020 16:55:56 +0200	[thread overview]
Message-ID: <CAHp75Vef2WDjD=DkoTV13Akk9yxwbF1oJH-=O4Kg_uxtY1qOdQ@mail.gmail.com> (raw)
In-Reply-To: <20268bfeb500ad8819e3a11aa1bea27eade4fd39.1607765147.git.syednwaris@gmail.com>

On Sun, Dec 13, 2020 at 4:24 PM Syed Nayyar Waris <syednwaris@gmail.com> wrote:
>
> Add explicit check to see if the value being written into the bitmap
> does not fall outside the bitmap.
> The situation that it is falling outside would never be possible in the
> code because the boundaries are required to be correct before the
> function is called. The responsibility is on the caller for ensuring the
> boundaries are correct.
> The code change is simply to silence the GCC warning messages
> because GCC is not aware that the boundaries have already been checked.
> As such, we're better off using __builtin_unreachable() here because we
> can avoid the latency of the conditional check entirely.
>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Syed Nayyar Waris <syednwaris@gmail.com>
> Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
>
> lib/test_bitmap.c: Modify for_each_set_clump test
>
> Modify the test where bitmap_set_value() is called. bitmap_set_value()
> now takes an extra bitmap-width as second argument and the width of
> value is now present as the fourth argument.
>
> Signed-off-by: Syed Nayyar Waris <syednwaris@gmail.com>
>
> gpio: xilinx: Modify bitmap_set_value() calls
>
> Modify the bitmap_set_value() calls. bitmap_set_value()
> now takes an extra bitmap width as second argument and the width of
> value is now present as the fourth argument.
>
> Cc: Michal Simek <michal.simek@xilinx.com>
> Signed-off-by: Syed Nayyar Waris <syednwaris@gmail.com>

Commit message here definitely needs more work.
First of all, it's now quite awkward to see this squashed stuff like this.
Second, it misses the warning examples it's talking about.
Third, it repeats some tags.
Fourth, it misses the Fixes tag.

Please, redone it correctly (one commit message with clear purpose and
example of warnings followed by Fixes tag) and resend a v3.

You may mention in the cover letter that this is squashed of three
patches from v1 (and give a link to lore.kernel.org).

-- 
With Best Regards,
Andy Shevchenko

WARNING: multiple messages have this Message-ID (diff)
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Syed Nayyar Waris <syednwaris@gmail.com>
Cc: Linux-Arch <linux-arch@vger.kernel.org>,
	Amit Kucheria <amit.kucheria@verdurent.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Michal Simek <michal.simek@xilinx.com>,
	William Breathitt Gray <vilhelm.gray@gmail.com>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	Robert Richter <rrichter@marvell.com>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	Linux PM <linux-pm@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	"Zhang, Rui" <rui.zhang@intel.com>,
	linux-arm Mailing List <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2 1/2] bitmap: Modify bitmap_set_value() to check bitmap length
Date: Sun, 13 Dec 2020 16:55:56 +0200	[thread overview]
Message-ID: <CAHp75Vef2WDjD=DkoTV13Akk9yxwbF1oJH-=O4Kg_uxtY1qOdQ@mail.gmail.com> (raw)
In-Reply-To: <20268bfeb500ad8819e3a11aa1bea27eade4fd39.1607765147.git.syednwaris@gmail.com>

On Sun, Dec 13, 2020 at 4:24 PM Syed Nayyar Waris <syednwaris@gmail.com> wrote:
>
> Add explicit check to see if the value being written into the bitmap
> does not fall outside the bitmap.
> The situation that it is falling outside would never be possible in the
> code because the boundaries are required to be correct before the
> function is called. The responsibility is on the caller for ensuring the
> boundaries are correct.
> The code change is simply to silence the GCC warning messages
> because GCC is not aware that the boundaries have already been checked.
> As such, we're better off using __builtin_unreachable() here because we
> can avoid the latency of the conditional check entirely.
>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Syed Nayyar Waris <syednwaris@gmail.com>
> Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
>
> lib/test_bitmap.c: Modify for_each_set_clump test
>
> Modify the test where bitmap_set_value() is called. bitmap_set_value()
> now takes an extra bitmap-width as second argument and the width of
> value is now present as the fourth argument.
>
> Signed-off-by: Syed Nayyar Waris <syednwaris@gmail.com>
>
> gpio: xilinx: Modify bitmap_set_value() calls
>
> Modify the bitmap_set_value() calls. bitmap_set_value()
> now takes an extra bitmap width as second argument and the width of
> value is now present as the fourth argument.
>
> Cc: Michal Simek <michal.simek@xilinx.com>
> Signed-off-by: Syed Nayyar Waris <syednwaris@gmail.com>

Commit message here definitely needs more work.
First of all, it's now quite awkward to see this squashed stuff like this.
Second, it misses the warning examples it's talking about.
Third, it repeats some tags.
Fourth, it misses the Fixes tag.

Please, redone it correctly (one commit message with clear purpose and
example of warnings followed by Fixes tag) and resend a v3.

You may mention in the cover letter that this is squashed of three
patches from v1 (and give a link to lore.kernel.org).

-- 
With Best Regards,
Andy Shevchenko

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2020-12-13 14:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-12  9:33 [PATCH v2 0/2] Modify bitmap_set_value() to suppress compiler warning Syed Nayyar Waris
2020-12-12  9:33 ` Syed Nayyar Waris
2020-12-12  9:34 ` [PATCH v2 1/2] bitmap: Modify bitmap_set_value() to check bitmap length Syed Nayyar Waris
2020-12-12  9:34   ` Syed Nayyar Waris
2020-12-12 15:56   ` kernel test robot
2020-12-12 17:05   ` kernel test robot
2020-12-13 14:55   ` Andy Shevchenko [this message]
2020-12-13 14:55     ` Andy Shevchenko
2020-12-12  9:34 ` [PATCH v2 2/2] gpio: xilinx: Add extra check if sum of widths exceed 64 Syed Nayyar Waris
2020-12-12  9:34   ` Syed Nayyar Waris

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='CAHp75Vef2WDjD=DkoTV13Akk9yxwbF1oJH-=O4Kg_uxtY1qOdQ@mail.gmail.com' \
    --to=andy.shevchenko@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=amit.kucheria@verdurent.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=arnd@arndb.de \
    --cc=bgolaszewski@baylibre.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=rrichter@marvell.com \
    --cc=rui.zhang@intel.com \
    --cc=syednwaris@gmail.com \
    --cc=vilhelm.gray@gmail.com \
    --cc=yamada.masahiro@socionext.com \
    /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.