Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp101004imm; Tue, 16 Oct 2018 18:54:43 -0700 (PDT) X-Google-Smtp-Source: ACcGV60vrsHy51jYRLZbnec4vWEUZLmACRmHdEmoL16p9UqvmaI/+H3A+L03biuxlIQb3ugyyNLw X-Received: by 2002:a63:3747:: with SMTP id g7-v6mr23145729pgn.59.1539741283843; Tue, 16 Oct 2018 18:54:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539741283; cv=none; d=google.com; s=arc-20160816; b=WvBfOxqjXE22eGmbM5fdrMieH0QZjuiqvgXiNxkFjfmuOsP0DxS8pMUj9hCWVbCgES riqRq7M/rRU4y1SQsLNuvcosLwgL7hIVfinsDazy+FIDIL/onuB8eU0qijp117k0jZuN Y/PnI5NH1SypCtVwScuFYhICgYl6yz4Wg3jPVAqyk0p7D6gpCK4Jsbc7moTCWx70jQnW HEB1fYHEiRQy8gEIqCLs0NmcLa0Z0iWwqogCJ9OMgRFWt1myQzfEqKhut9xQ0ZawZGZu 9+l24HNIgDbS53Im7RNtoUKcbg0aLuSYCG5YlVrz5l1RStP9y20SgVsMulmizBW5bkC2 9ZhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=7o98vukBRqAgaV6Sc6XvYqpoeGVSYwk/d2AI7zlLOKg=; b=QxsCM+ZOfIDWUC0EdBzPYbryEzu5AVqrTj2UNiFuqIhN+tPnaT0dqYHZg6rLTmU96p VMuyT/zT6k3XO+3p9oQWO2jjDtl3QUv9C3ySUOzbLG9N+EWtKP5mS10Ouwo1feApIwdU SUtZeQ8Wb/kCNjYyIZ0yvcw3KoR6XW/jTSDB2gsScGmFcyxAX3x0f0XMI763M9qFUpNS 3c1T4OWt5EVwzplrVyhg4vgWVhP5qn8O/lqGDhwbeHWJwTTWurBCj/lLOoNkJNRbScfJ tRxbk3z7O05pFvSr9QYtmtJlEVno3HZzX9fHRPdyo2F+5XS/RbcpxYogN/1FydACsDmd UsVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Y1ZMczT5; 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=pass (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 m28-v6si16831499pfk.56.2018.10.16.18.54.26; Tue, 16 Oct 2018 18:54:43 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Y1ZMczT5; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727178AbeJQJrV (ORCPT + 99 others); Wed, 17 Oct 2018 05:47:21 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:45926 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726210AbeJQJrV (ORCPT ); Wed, 17 Oct 2018 05:47:21 -0400 Received: by mail-pf1-f194.google.com with SMTP id u12-v6so12339533pfn.12; Tue, 16 Oct 2018 18:54:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=7o98vukBRqAgaV6Sc6XvYqpoeGVSYwk/d2AI7zlLOKg=; b=Y1ZMczT5UskJC5SrPr5C3ZQxCC53qj1wAXMV3Q4sbVDgzAUly0nuTzbvg5gHGtUEh3 i1DxRB/PHyuELRoobqGIT9dmU1iRvtHBiLGBsIg5y91qQhK2+YR1780IiV1TrIwA9yUL CxgkQ0xnA56hds+c/aOrvfaYtJeLysIRFfkeJ4GsjKijxBR5CpBdegoILH4rVwU3jHII vfz5SzkCpWylgOBIrCo2K7TRoq5jRoPIysm4FdzAMdd3/E+QIRCUTl+4VR11slaz5CNM sleDtRcddHHyLz3oq8hjBpH/ulXD+5wl+tcGQC95/s8ygh9NC1e/PHGDri6sLOQsXZGx kYrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=7o98vukBRqAgaV6Sc6XvYqpoeGVSYwk/d2AI7zlLOKg=; b=QjP730Exa4zDHb5xcOD5dL1RE2PYvOKG8Y7ssM0v27KtLcbDAcboDCsf3Cf/Q4+vRw uxxIl7boDw0eBlX9XifARL0x0hVgS8FkartEwmWmidAXhjtSmzMkGKvxQaqDVS+p3yT0 cG2XcDB1maFtuQZpZA7LIjnEU7NwEDskWUK0fnMvc+UwjfBxvYo7BMhG9Fdzrlq3+pLd yuFIEbzwm+UdHqsF7g1627hulD5yjTrUbCNGLORSGrrowKt3PquA5RnS2CO8mN4zH/Iz 8XeU5mi/7CxrVIU1d67VBjQm+xKMLP8lGWBpRUv9bW2neKmVYXbDivLuKLXvtUr0pM8i cMyA== X-Gm-Message-State: ABuFfoi1QoHc/tPwG7EoK9I1A+HTv9zXAaIdaB7wooRR1OmpJbrAY83T EQpyyzFF/rLbjglE9uSOrO0= X-Received: by 2002:a63:40c2:: with SMTP id n185-v6mr22850648pga.116.1539741244577; Tue, 16 Oct 2018 18:54:04 -0700 (PDT) Received: from icarus ([2001:268:c0a4:1899:c8a2:53ea:c386:fc53]) by smtp.gmail.com with ESMTPSA id p4-v6sm20180523pfg.188.2018.10.16.18.54.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Oct 2018 18:54:03 -0700 (PDT) Date: Wed, 17 Oct 2018 10:54:02 +0900 From: William Breathitt Gray To: Rasmus Villemoes Cc: linus.walleij@linaro.org, akpm@linux-foundation.org, linux-gpio@vger.kernel.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, andriy.shevchenko@linux.intel.com Subject: Re: [RESEND PATCH v4 3/8] gpio: 104-dio-48e: Utilize for_each_set_clump macro Message-ID: <20181017015402.GA3307@icarus> References: <5906381114b14d5b0359510a1d23accbd239eaa5.1538441919.git.vilhelm.gray@gmail.com> <822be05b-092b-41c2-3c31-8981acd5cb9e@rasmusvillemoes.dk> <20181014041933.GA7335@icarus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: 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 Mon, Oct 15, 2018 at 01:59:33PM +0200, Rasmus Villemoes wrote: > On 2018-10-14 06:19, William Breathitt Gray wrote: > > > a bit value of 0 in the > > bits array does not necessarily mean the input was not requested, but > > may instead mean that the value at the input is 0; > > sure enough, but... > > > therefore, the caller > > must keep track of the requested inputs rather than try to deduce them > > from the values in the bits array. > > ...I don't agree that this logically follows. A caller might reasonably > expect not to find any bits set in positions other than those in mask. A > simple example would be caller that just tried to ask "are any of > _these_ inputs set"; it would be reasonable to implement that using > bitmap_empty() on the returned bitset, without first having to mask by > the mask he passed in. > > Rasmus I see your point. It would be good to keep the behavior consistent with what would be expected by the user -- and adding an additional AND operation at the end to mask away the unrequested bits should not really affect the performance to a discernible degree -- so I'll submit a patchset implementing the mask for these drivers some time this weekend. William Breathitt Gray