Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp998398imm; Sun, 2 Sep 2018 06:23:43 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb5TCFcdgfCkyOea9u4BtfeWgEXNxDSCxVB6dLjRqkt1BbF2cZwZEKC6joBe+LKMtl1ZsZ7 X-Received: by 2002:a65:49cc:: with SMTP id t12-v6mr22224155pgs.27.1535894622976; Sun, 02 Sep 2018 06:23:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535894622; cv=none; d=google.com; s=arc-20160816; b=CShAIdl6pDE5JwIw+66oVkEIcsDVR0E+m6rI60+mvbil+Vg+mLvFLaQQbnUzCRc57G tKhjcodBcgYk856Lji+5Rj8GhAHOFgez7yUJ50SHIk71W+DeKgitaf18MxzmEn7JeUKH 4/hKCf70+BebJt7wXc87LWjJHi70iAPOe9uJY3/9DrX1v2fVkIFI4TG57BsyrkfEB4dl oTYJOIJfyA7yP3dJ/VBBUXGxX956B96IUCF8NXfanzteJyyP5nmkVH6qPIwpljOvwHSS io/U29b/n9IzbvF3JPNToZpAYZEM8zAHD2YmiQcDUHG1bvHybjn3FQRp9fv/ClvdNmNl yXrQ== 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:arc-authentication-results; bh=4Ri9mzhNeAy8Tg6xX3QmrE8wSagAJUEvRE84Q54U5Ow=; b=kt6hvES+Y0GshUEsIRB45nYi30tCcjAVPrU3m56nRoKO3IhnEVIPgn9dykEwmkXXd+ JGFrQvyrofuo3XxUlfv0fnr28biC//sKA7A/4SNqOhD0nubR6lToChT8bVtu9qBYZJss 9LGKh23wfT7htirTVl3dRFmXrfxj4kHIfLCOkeDeyc0H/H/7tCpbuQ/DE5RWm+heHIsZ ng8TqXP7EegVBsWKOPIOZyEUk7OxE3j0DklFcY1uytk08v9sktjd8SxsIlV3u7kKQRmZ T/O4HJU9a4Ijwj9ueM6hS/F9gK4eL0PAuWVEuOcvWJNrQtOotzKHNHNMJzXxSiKEIDzQ /Nbg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 5-v6si14884960pgf.18.2018.09.02.06.23.28; Sun, 02 Sep 2018 06:23:42 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730209AbeIBRht (ORCPT + 99 others); Sun, 2 Sep 2018 13:37:49 -0400 Received: from bmailout2.hostsharing.net ([83.223.90.240]:50073 "EHLO bmailout2.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729179AbeIBRhr (ORCPT ); Sun, 2 Sep 2018 13:37:47 -0400 Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified)) by bmailout2.hostsharing.net (Postfix) with ESMTPS id 4D5C62800B3C5; Sun, 2 Sep 2018 15:21:55 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id E630C248B; Sun, 2 Sep 2018 15:21:54 +0200 (CEST) Date: Sun, 2 Sep 2018 15:21:54 +0200 From: Lukas Wunner To: Janusz Krzysztofik Cc: Linus Walleij , Jonathan Corbet , Miguel Ojeda Sandonis , Peter Korsgaard , Peter Rosin , Ulf Hansson , Andrew Lunn , Florian Fainelli , "David S. Miller" , Dominik Brodowski , Greg Kroah-Hartman , Kishon Vijay Abraham I , Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Hartmut Knaack , Peter Meerwald-Stadler , Jiri Slaby , Willy Tarreau , Geert Uytterhoeven , linux-doc@vger.kernel.org, linux-i2c@vger.kernel.org, linux-mmc@vger.kernel.org, netdev@vger.kernel.org, linux-iio@vger.kernel.org, devel@driverdev.osuosl.org, linux-serial@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Sebastien Bourdelin , Rojhalat Ibrahim , Russell King , Tony Lindgren , Yegor Yefremov , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Subject: Re: [PATCH v7 1/4] gpiolib: Pass bitmaps, not integer arrays, to get/set array Message-ID: <20180902132154.aishrx5shpvjrm2x@wunner.de> References: <20180831225616.29221-1-jmkrzyszt@gmail.com> <20180902120144.6855-1-jmkrzyszt@gmail.com> <20180902120144.6855-2-jmkrzyszt@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180902120144.6855-2-jmkrzyszt@gmail.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Sep 02, 2018 at 02:01:41PM +0200, Janusz Krzysztofik wrote: > @@ -461,7 +461,7 @@ static long linehandle_ioctl(struct file *filep, unsigned int cmd, > > /* Clamp all values to [0,1] */ > for (i = 0; i < lh->numdescs; i++) > - vals[i] = !!ghd.values[i]; > + __assign_bit(i, vals, !!ghd.values[i]); The "!!" becomes unnecessary and can be removed, same for the code comment above. > /** > * gpiod_get_array_value() - read values from an array of GPIOs > - * @array_size: number of elements in the descriptor / value arrays > + * @array_size: number of elements in the descriptor array / value bitmap > * @desc_array: array of GPIO descriptors whose values will be read > - * @value_array: array to store the read values > + * @value_bitnap: bitmap to store the read values Typo, s/bitnap/bitmap/ Otherwise LGTM.