Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3333410imm; Sun, 29 Jul 2018 16:20:31 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcSOg9NIh88Qv7VlTJWnnH2PJe5ESSqHZ8JgPitsKn+p9Dqdto1TxrylCnO8sQsS1UmTnIX X-Received: by 2002:a62:455b:: with SMTP id s88-v6mr15480272pfa.203.1532906431340; Sun, 29 Jul 2018 16:20:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532906431; cv=none; d=google.com; s=arc-20160816; b=J46zzh1EXoDPimJMI4Eaa8/r2Ay34nKIZyUZC61YWfjiW2gUbh38IS8307IOUdDjyR ySHLR0J897GBzWIYHwQfro5RmpZ0aw3xH6Sf67ppXdElEWF9raR2oj803S8Pjp+4EEII jdFNfn3CbTShqI1GR43k/El9BIv7GkJF/5dV1iHjx5eeon3w+tPBltAV8BRy1W5SxY3Q EX7sfqXr6OOppZ3zK3ufsixEFbv5lgbebDANk7Pg4vjjXNtSYji1U1LlBvbY9KxRgVhl 6kD4IkUwMearVw832n7T9QtpdRY8Kbs8xvztz5F5RqtrbU3TjVG4CEo2OhcuMlYR9fqs yx9Q== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=IdDEKRB0ryqDLBENxiGMOFKljcdNGyIgLAS089jbb2E=; b=yVZnogfzwfK6aIz9jV7UStlVERj1a25m9YC6UGkkdm+ljmMB+FoDmkFJRT+9u0J+l1 fCviU1ZW8V/9c0xP/jBuryUqd0Zhx5P8ZTLO2/6Z3np6hcT+DGbZLNC+joLBIr0vH/T/ rvCp1D9VjExs2jT7N5mApezyODCm1LD+18U8Wolmz3WVPiRM5RHfyQeQVyg8JIIKleJX VfLklba5bcPZjFu8moynx+YEuIgFOoNg0ioFcFQTT5X1BxBpIts1+7ClSocWBJJUR7qu qDyVwqdwMV1+u116bSORYU82cyvZtC1U0KXUM0um0lIftM4y1qOcqoaSDGN5ksecdKNC 2h1Q== 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 z4-v6si9131950pgf.193.2018.07.29.16.19.37; Sun, 29 Jul 2018 16:20:31 -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 S1731549AbeG2WsP (ORCPT + 99 others); Sun, 29 Jul 2018 18:48:15 -0400 Received: from mail.bootlin.com ([62.4.15.54]:42690 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726712AbeG2WsP (ORCPT ); Sun, 29 Jul 2018 18:48:15 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id D2892207AC; Sun, 29 Jul 2018 23:16:19 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from bbrezillon (91-160-177-164.subs.proxad.net [91.160.177.164]) by mail.bootlin.com (Postfix) with ESMTPSA id 5EC77206EE; Sun, 29 Jul 2018 23:16:19 +0200 (CEST) Date: Sun, 29 Jul 2018 23:16:19 +0200 From: Boris Brezillon To: Linus Walleij Cc: Janusz Krzysztofik , =?UTF-8?B?TWlxdcOobA==?= Raynal , ext Tony Lindgren , Aaro Koskinen , Grygorii Strashko , Santosh Shilimkar , Kevin Hilman , Richard Weinberger , David Woodhouse , Brian Norris , Mark Vasut , linux-mtd@lists.infradead.org, Linux ARM , Linux-OMAP , "open list:GPIO SUBSYSTEM" , "linux-kernel@vger.kernel.org" , Artem Bityutskiy Subject: Re: [RFC PATCH 7/8] mtd: rawnand: ams-delta: Check sanity of data GPIO resource Message-ID: <20180729231422.0264f971@bbrezillon> In-Reply-To: References: <20180718235710.18242-1-jmkrzyszt@gmail.com> <20180718235710.18242-8-jmkrzyszt@gmail.com> <20180719084447.239a1b92@bbrezillon> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 29 Jul 2018 22:36:49 +0200 Linus Walleij wrote: > On Thu, Jul 19, 2018 at 8:44 AM Boris Brezillon > wrote: > > > I guess you'd prefer to have the pin values in a bitmap instead of an > > array of integers. That's probably something you can discuss with > > Linus, see if he would accept to change the prototype of > > gpiod_get_raw_array_value(). > > I am not so smart as to see the overall effects but if what > you're saying is that we shouldn't have designed these functions > and callbacks using arrays of integers (or longs) and instead > pass bitmaps, you may be just right. It intuitively sounds better. Maybe, maybe not. Only an real evaluation of where the overhead is can tell us. So I'd suggest trying to use the existing interface and doing the int_array -> u8 conversion in the NAND driver first, and see how much moving to a bitmap imprsoves things. > But I'm not good with bitmaps. > > We would have to refactor the world though. I checked and, AFAICT, there are no external users of this API (only core code is using those funcs, for ioctls I guess). Anyway, I think we should wait for real numbers before we consider doing this change (It's not unusual to get this sort of things wrong).