Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755285AbeAJNVi (ORCPT + 1 other); Wed, 10 Jan 2018 08:21:38 -0500 Received: from mga11.intel.com ([192.55.52.93]:41667 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754982AbeAJNVg (ORCPT ); Wed, 10 Jan 2018 08:21:36 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,340,1511856000"; d="scan'208";a="18975566" Message-ID: <1515590223.7000.853.camel@linux.intel.com> Subject: Re: [PATCH v1 4/4] bitmap: Make bitmap_fill() and bitmap_zero() consistent From: Andy Shevchenko To: Yury Norov Cc: Andrew Morton , linux-kernel@vger.kernel.org, Rasmus Villemoes , Randy Dunlap Date: Wed, 10 Jan 2018 15:17:03 +0200 In-Reply-To: <20180110084938.ggb3x4pq5suprnne@yury-thinkpad> References: <20180109172430.87452-1-andriy.shevchenko@linux.intel.com> <20180109172430.87452-4-andriy.shevchenko@linux.intel.com> <20180110084938.ggb3x4pq5suprnne@yury-thinkpad> Organization: Intel Finland Oy Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.3-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Wed, 2018-01-10 at 11:49 +0300, Yury Norov wrote: > On Tue, Jan 09, 2018 at 07:24:30PM +0200, Andy Shevchenko wrote: > > Behaviour of bitmap_fill() differs from bitmap_zero() in a way > > how bits behind bitmap are handed. bitmap_zero() clears entire > > bitmap > > by unsigned long boundary, while bitmap_fill() mimics bitmap_set(). > > > > Here we change bitmap_fill() behaviour to be consistent with > > bitmap_zero() > > and add a note to documentation. > > > > The change might reveal some bugs in the code where unused bits > > handled > > differently and in such cases bitmap_set() has to be used. > > There is only 51 users of bitmap_fill() in the kernel, including > tests. If you propose this change, I think you'd check them all > manually. Some of them might require 5 minutes to check while others (especially in the areas I don't know much about) 5+ hours. I rely on Rasmus assumption that there _were_ bugs, though they assumed to be fixed by now. In any case I'm ready to take responsibility of possible breakage and fully into provide fixes by demand. > Sorry that. I lost your thought here. What did you mean by this? > > Also, there's tools/include/linux/bitmap.h which has a copy of > bitmap_fill(), and should be consistent with main kernel sources. tools is independent, although quite related, project to the kernel itself. They will decide by themselves how to proceed, I suppose. At least what I see in the history of changes in the tools/ they usually follow the changes in main library after while. Thanks for review! -- Andy Shevchenko Intel Finland Oy