Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp6865861imm; Tue, 24 Jul 2018 04:37:48 -0700 (PDT) X-Google-Smtp-Source: AAOMgpekkznn7RbQGLTGY+MGHTzTJXkCQGP/5fFHoZ8lEOK+E8l0Isdo614cLSTG5husOQd6fu9o X-Received: by 2002:a17:902:243:: with SMTP id 61-v6mr16470318plc.301.1532432268891; Tue, 24 Jul 2018 04:37:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532432268; cv=none; d=google.com; s=arc-20160816; b=kJMOGMbr20nrc1zGDzy00dhKgyqaaP95Qma14RAwbmeEVtlQ+2FYLpjbC66v0+iLBM YdLpQ/UfipPeAvZCdAjnhMajhfjhLZHyv/D2/trq2ow0SCVciD97P79UcsTxpm/RC2T+ 5r626jcLyhJfIwSJtBUbryG7QeMc+z7SZIRvpq5lmGniMwIQAYZ6WI3kbdZJMWn+jrdN DQCDn0MXGaZhG83dxa6+OjHv5nUzzdt3yR7Um05ZaTtcjU2jjJFv5TyAKJ3uLQUdtyRN fre6YhSwvQ849nWluR2K9LoHY/zTdNQDcCdbMSbVyU4AewpDqhkvkT2ii0ZbVFSnQ2vr ivVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:date:cc:to:from:subject :message-id:arc-authentication-results; bh=p2MVidglQ6CVNE+w2rFjQICNz5IrDSAi12gr7rfoT7w=; b=RlBlzaKpqhXUhXso1NrpeD5aF6S1KoHCRg2s+9x1QEZw5+GDLc0m3c2rDF1VYW5+eR JROMfvtvjrn06zG08FG9U9RIHEJMXKZd+uB++AlLJj6/c0MxH2z+FBhDmNlDr3WTuEQS FK5lsoZmyTscvMXYRdN2YVjclMlJG8oMbtvFpk46gqdPHRDTRpf7yNHF1e968nffReXQ Lc968vhlcVtS5HSGW0gkvmPosMTAyXsxx5ZA/JXyZv+WnQ9kcx+kNQEsp1ft/KIOvoed bhMrx0c8chbpcnXM/+NS7q9XtgPmJzNIX6RYdsxTSH7EuUJ1bLLvmSxP4jtGCnHZew5W xNiw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d128-v6si11358935pfc.211.2018.07.24.04.37.33; Tue, 24 Jul 2018 04:37:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388287AbeGXMmC (ORCPT + 99 others); Tue, 24 Jul 2018 08:42:02 -0400 Received: from mga06.intel.com ([134.134.136.31]:52808 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388172AbeGXMmB (ORCPT ); Tue, 24 Jul 2018 08:42:01 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jul 2018 04:35:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,397,1526367600"; d="scan'208";a="77378535" Received: from smile.fi.intel.com (HELO smile) ([10.237.72.86]) by orsmga002.jf.intel.com with ESMTP; 24 Jul 2018 04:35:53 -0700 Message-ID: <2310fa540b9e5db3b94f4917ecae76dce2a2ca65.camel@linux.intel.com> Subject: Re: [PATCH v4 0/5] bitmap: Introduce alloc/free helpers From: Andy Shevchenko To: Andy Shevchenko Cc: Alasdair Kergon , Mike Snitzer , device-mapper development , Shaohua Li , linux-raid@vger.kernel.org, Dmitry Torokhov , linux-input , Andrew Morton , Yury Norov , Linux Kernel Mailing List , Mika Westerberg , Joe Perches Date: Tue, 24 Jul 2018 14:35:53 +0300 In-Reply-To: References: <20180630201750.2588-1-andriy.shevchenko@linux.intel.com> Organization: Intel Finland Oy Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.1-2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2018-07-05 at 00:30 +0300, Andy Shevchenko wrote: > On Sat, Jun 30, 2018 at 11:17 PM, Andy Shevchenko > wrote: > > A lot of code is using allocation of bitmaps using BITS_PER_LONG() > > macro and > > sizeof(unsigned long) operator. The readability suffers because of > > this. > > > > The series introduces three helpers, i.e. bitmap_alloc(), > > bitmap_zalloc() and > > bitmap_free(), to make it more cleaner. > > > > Dmitry, it seems we are all set now and if you have no objections > against this version, it would be nice to see it in your tree followed > by upstream. Gentle ping! > > > Patches 1 and 2 are preparatory to avoid namespace collisions > > between > > bitmap API and DM / MD bitmap. No functional changes intended. > > > > Patch 3 introduces new helpers. > > > > Patches 4 and 5 is just an example how to use new helpers. Locally I > > have > > like dozen of them against different subsystems and drivers. > > > > Taking above into consideration it might make sense to have > > an immutable branch for this cycle. > > > > Ideally it would go through Input subsystem, thus, needs an Ack > > from MD / DM maintainer(s). > > > > Since v3: > > - split DM part and do rename accordingly (Mike) > > - explain better in the commit message why we can't make helpers as > > inliners (Dmitry, Andrew) > > - drop applied orphaned patch > > > > Since v2: > > - fix compilation issue in MD bitmap code > > - elaborate changes in commit message of patch 5 > > > > Since v1: > > - added namespace fix patch against MD bitmap API > > - moved functions to lib/bitmap.c to avoid circular dependencies > > - appended Dmitry's tags > > > > Andy Shevchenko (5): > > dm: Avoid namespace collision with bitmap API > > md: Avoid namespace collision with bitmap API > > bitmap: Add bitmap_alloc(), bitmap_zalloc() and bitmap_free() > > Input: gpio-keys - Switch to bitmap_zalloc() > > Input: evdev - Switch to bitmap API > > > > drivers/input/evdev.c | 16 +- > > drivers/input/keyboard/gpio_keys.c | 8 +- > > drivers/md/dm-raid.c | 6 +- > > drivers/md/md-bitmap.c | 305 +++++++++---- > > ----- > > drivers/md/md-bitmap.h | 60 ++-- > > drivers/md/md-cluster.c | 18 +- > > drivers/md/md.c | 44 +-- > > .../md/persistent-data/dm-space-map-common.c | 20 +- > > drivers/md/raid1.c | 35 +- > > drivers/md/raid10.c | 52 ++- > > drivers/md/raid5-cache.c | 8 +- > > drivers/md/raid5.c | 44 +-- > > include/linux/bitmap.h | 8 + > > lib/bitmap.c | 19 ++ > > 14 files changed, 326 insertions(+), 317 deletions(-) > > > > -- > > 2.18.0 > > > > > -- Andy Shevchenko Intel Finland Oy