Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp4115167img; Tue, 26 Mar 2019 03:21:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqzkDIy+ATsDn031I1oO8RhhXFulKUKSR70FpkvgroWHYbt/9NOdNSeyrx4tpE24SZO258IE X-Received: by 2002:a17:902:29aa:: with SMTP id h39mr30324830plb.190.1553595665085; Tue, 26 Mar 2019 03:21:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553595665; cv=none; d=google.com; s=arc-20160816; b=tOmp2P2QbGwtbn7PsSUfqHKKMjczwsRZdoMTjzz4xoi384mO0zozSVbVB3Yb6zMpkz tetbNwXyjEfsJo+WnOveSSiYZk32pg1rKE1wlmUwAt0KrVoctKw2dphkN3/W/bN2QGE+ NlLG9Su6PgWvw50ADmDFNPqLaT/5EobHXlqSRwmKOF+lqzZsRr+w51Zw5nURZDxNHbnY MGxPkewIrrkCxdMKV2O8dLuyxVKNr2xZnWrgnk9hWv+1fWzDAHQ0ZeM8Plzam3E97S63 urqWCt1GJ7vw6zMwZPLNgbS5QVM15po55VUyVRBmB8TkxU/7KA8iedz4E8zd3zbNPyjr PNjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=VS5YW/ac03CfMYWGhGymVGf3fdGugZa4Ccup2/3STQ4=; b=ihLBuIrNCFKQh8Zkav6zIPm59DQFYxYKAOYZ7S0iqmFSPA3rGKvx3uxQD0z9Y/bpCh WjYlzA9X2xI/IAvMMGjPiTcCj9I+nLaye07blE6J95TA7yHjhA0p5my2N56Gu428DmfO ZnLfk7YX8wrzzjlhe3GMCWJ5lfBsqgXiC5Wmy3NszzN6kveVWai/CZJqKpCgclI0DLJc 3uZoouLhct4qgMKlv6hJf9mq/C93Z63r9P+d4y+/qMn5keadjtZcw8SMKF09ZhAUvdBk oYNJ9gyRxGAf2bL3bxBlrRy8NtCxUwNG6ldjZbhsjj79ndaslh1lMnrDYe8NlKhjO+w8 v8og== 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m23si10431171pgc.550.2019.03.26.03.20.49; Tue, 26 Mar 2019 03:21:05 -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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731233AbfCZKTk (ORCPT + 99 others); Tue, 26 Mar 2019 06:19:40 -0400 Received: from mga11.intel.com ([192.55.52.93]:21429 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726258AbfCZKTk (ORCPT ); Tue, 26 Mar 2019 06:19:40 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Mar 2019 03:19:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,271,1549958400"; d="scan'208";a="145311682" Received: from smile.fi.intel.com (HELO smile) ([10.237.72.86]) by orsmga002.jf.intel.com with ESMTP; 26 Mar 2019 03:19:35 -0700 Received: from andy by smile with local (Exim 4.92) (envelope-from ) id 1h8jB7-0001ER-Ln; Tue, 26 Mar 2019 12:19:33 +0200 Date: Tue, 26 Mar 2019 12:19:33 +0200 From: Andy Shevchenko To: William Breathitt Gray Cc: Lukas Wunner , linus.walleij@linaro.org, bgolaszewski@baylibre.com, akpm@linux-foundation.org, linux-gpio@vger.kernel.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux@rasmusvillemoes.dk, yamada.masahiro@socionext.com, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, geert@linux-m68k.org, preid@electromag.com.au, Arnd Bergmann Subject: Re: [PATCH v12 01/11] bitops: Introduce the for_each_set_clump8 macro Message-ID: <20190326101933.GW9224@smile.fi.intel.com> References: <9afc30a574ce3e6a86b51dd522146a1d2156dedd.1553494625.git.vilhelm.gray@gmail.com> <20190325093854.jzkkwaksxi7zvtrg@wunner.de> <20190326031422.GB3356@icarus> <20190326094345.v7l7xjvfs2scbvbv@wunner.de> <20190326100743.GA10005@icarus> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190326100743.GA10005@icarus> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 26, 2019 at 07:08:18PM +0900, William Breathitt Gray wrote: > On Tue, Mar 26, 2019 at 10:43:45AM +0100, Lukas Wunner wrote: > > On Tue, Mar 26, 2019 at 12:14:22PM +0900, William Breathitt Gray wrote: > > Why is it so complicated, does it allow passing in a start value > > that's not a multiple of 8? Do you really need that? I imagine > > a simplification is possible if that assumption can be made (and > > is spelled out in the kerneldoc). > > That's a good point. Originally, I had envisioned the possibility of > calling bitmap_get_value8/bitmap_set_value8 at odd start offsets; this > would open up the possibility of a clump landing as a split between 2 > words, thus requiring this complicated case handling code. However, I'm > not sure how often users would need this case; none of the drivers right > now require clumps at odd offsets. > > Andy, would you have any objection to restricting the start offset > values for bitmap_get_value8/bitmap_set_value8 to multiples of 8? That > would prevent the split word case, and thus allow the implementation for > those functions to be a lot simpler. No, I have no objection. -- With Best Regards, Andy Shevchenko