Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp64080imm; Fri, 31 Aug 2018 17:25:50 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZz+0RVAxLmCibtwduGMHoMFbnM1NXdfsbC4vq6OGN34/YLAhqhaPILjhm8y1oxBU4jbYdH X-Received: by 2002:a65:560a:: with SMTP id l10-v6mr16698701pgs.130.1535761550182; Fri, 31 Aug 2018 17:25:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535761550; cv=none; d=google.com; s=arc-20160816; b=eYisQMp8GsPU/UQX0ptVjT1iWdQmZpUXceVj8q8iVbWx7OQ/ORSxDeLCqStA7Vgow9 Nd2h5LfxA2t5bX7RgKG5aq+lKm69+oeUm1Gt/g8L+nveu+SztsOu2txoahZhOEjDZoFd JIkIH4VvbUI305VYnrSpsXDyaeaWJGNzXQqzRLZsnTM17ApYFMqwBzeK4Agnt4QOULAe eFEmM8qRXGxdunS+7nqrOyugCeq7bs1VGwv1zPPVoEAdu32vA9/cybvoHE+KzG1dxp4b GSRWOr+o2yrgZEppfCvLtr9LgvhdWJ6CysoDC1xegpVWV1TFGtucXZFO8uDL+AHI7cR3 ro7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=G1AE0B1PpWi56Z8oJUSKJ2XEdrLHFvP5Jv03hSZnYmE=; b=ft8ZlZk9SPV7OuXXMwBES5H1HyxKVB9neLq7umwGZMDKts0Dcz1cDOiOcvcvD2OP/w Gc0ilCRmCIX3ObAmTqs8gO4wdnPsV2a2veeeT3lU8tg1U3dhpWORLPwBPRajCwtt7sq3 pHr/KG1HEA7IC7xaySWg9v0Ob/Tl60BdNBfPA7KJjce4TUg1JQq8l06h/MJ5snAO0n9Q dZk03T4zQijCJVxR59CtnRgcTXSzOv1tvj3ZQWlimgirqgQQXzBgZ5Oc+TZT2eqKTSMO 4EgXzaB9WA9pNOGiGkdJVzFOUZYuj4VuIPAbIZZbQ4pw02cjF3VtOfEHE43KRM2/EX9b ClJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@axentia.se header.s=selector1 header.b=e99KKy92; 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 15-v6si11040727pgu.205.2018.08.31.17.25.25; Fri, 31 Aug 2018 17:25:50 -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=@axentia.se header.s=selector1 header.b=e99KKy92; 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 S1727390AbeIAEda (ORCPT + 99 others); Sat, 1 Sep 2018 00:33:30 -0400 Received: from mail-eopbgr40116.outbound.protection.outlook.com ([40.107.4.116]:29776 "EHLO EUR03-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725852AbeIAEd3 (ORCPT ); Sat, 1 Sep 2018 00:33:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axentia.se; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=G1AE0B1PpWi56Z8oJUSKJ2XEdrLHFvP5Jv03hSZnYmE=; b=e99KKy92wYq1LxoXSJchAAPuQ0RNkFxDttItezxhGB9h+RHtRy6tGZqiNQArII6DMnXHUIPTH7xgfoSdDEy1zRZoCkW96tQTHc0DO4s1y+xjlXqtA2lBs9rzkSEyjh6SrIZ+ifO5r/EMYFjzV/SY4sKg3E1uVm5oracuZCZK0dY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=peda@axentia.se; Received: from [192.168.13.3] (85.226.244.23) by AM5PR0201MB2450.eurprd02.prod.outlook.com (2603:10a6:203:35::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1101.17; Sat, 1 Sep 2018 00:23:21 +0000 Subject: Re: [PATCH v6 1/4] gpiolib: Pass bitmaps, not integer arrays, to get/set array To: Janusz Krzysztofik , Linus Walleij Cc: Jonathan Corbet , Miguel Ojeda Sandonis , Peter Korsgaard , 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 References: <20180829204900.19390-1-jmkrzyszt@gmail.com> <20180831225616.29221-1-jmkrzyszt@gmail.com> <20180831225616.29221-2-jmkrzyszt@gmail.com> From: Peter Rosin Organization: Axentia Technologies AB Message-ID: <47a7e66f-8635-7131-8a0c-c26cf849fd50@axentia.se> Date: Sat, 1 Sep 2018 02:23:17 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180831225616.29221-2-jmkrzyszt@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [85.226.244.23] X-ClientProxiedBy: HE1P192CA0001.EURP192.PROD.OUTLOOK.COM (2603:10a6:3:fe::11) To AM5PR0201MB2450.eurprd02.prod.outlook.com (2603:10a6:203:35::7) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5eaa1c7c-e902-4bfe-71b6-08d60fa12118 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(7021125)(8989137)(4534165)(7022125)(4603075)(4627221)(201702281549075)(8990107)(7048125)(7024125)(7027125)(7028125)(7023125)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:AM5PR0201MB2450; X-Microsoft-Exchange-Diagnostics: 1;AM5PR0201MB2450;3:IKmo2pvzBmk09uGGnfoAHwhgbSdkf2IkBzi9nH2tQdRU/PaIJfvSBfmWB1DrbkcFClzOE4v4YP3DP/zXZYYjDwwUqhnsn6XAtvsDCkR03tpXyn3wQyLdf7ZTcG4CE93cYSe3/QuTevygowfM92PIWaHxZAMj+BJVV6fWKrtjOh90eNU9AEFQtMQpk5nNSVkl0c1XeXeFsCNrLOzGfNpdlAoyj2Qm5w1S31968+LLNdN+1uR28P4QGFQoQW6u30DM;25:kMrOXQ/qR1ludClOiw8A5aGFa1crco1tFbSERwB6B3ywvVzAPOT8jajMh9yLT+VXfwib2nt1Vz9x/dT3bE+/OkSvIBStEa6wzpQEHTJoCKly0h5tA4cmyDQBj2Oy+7SD9utIMvF3kLTVkuF0Nx9aOcuBcueF+zVMzwx3NedYF1Vckoi2MdZYEmf4K6LtVZ71VZ1wz5lQowTf74+3kgT4XQTTGYCRan3erk7V/3iKMGtRphdPfJlIBO5MTNJTBgVa3g3LaA+xl+zMejU6gHSwX2AX92/5ICSYv2HIJ7t/uKKYVSsJDJXEy33F3GfOE7mWp8H4vMw2Q8A8Py9TAtNk3g==;31:yMTQwgO8kFxXRdRa+CetZ2hcqGAFjhEJAUcMC8FESgE3WOzUNXFdhAmdeMQ3oE6NBwzQwlUSO5s2Oug2GWJckGWQO+ID6EwjGro6HQX2A3x+IGPjJSc8XJJz1+HHJfr1TyvERZ8cOTbRKQO6pEYgkUoHowpPZphhn+GsrSxDaEYu31s5P/O26/cnNScyTJ1z2zQ+/3Z04Bc6RQKdi+lfXj0A8KILdXs3Xw6/vLTnyLE= X-MS-TrafficTypeDiagnostic: AM5PR0201MB2450: X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(3231311)(944501410)(52105095)(149027)(150027)(6041310)(20161123558120)(2016111802025)(20161123562045)(20161123564045)(20161123560045)(6043046)(201708071742011)(7699016);SRVR:AM5PR0201MB2450;BCL:0;PCL:0;RULEID:;SRVR:AM5PR0201MB2450; X-Microsoft-Exchange-Diagnostics: 1;AM5PR0201MB2450;4:HupZjzpoSHZlp2z6Uflq9KahV1q1OMehSwukuwWUDBZO6qSThO63gcps3Z6wDEPQbt+7bbdBNX95q9o0zTkyJSVzyQY8N1SisHqVpJSenjSLTMRXj6owxSRbftCCZLhrdhgLp1/8vSFjTkIPiadxpwsXixtDKsnc18la18gp+65251ewuh9CriZgiXwhkrq/o66Er9kf5Off2jd/5b1mb1idmBfQn7psA+J2iU8ZAoew4/KuF8j1Web3o8+0rdjqSjDpiwYFVSuUSk8KIQ9UyQ== X-Forefront-PRVS: 0782EC617F X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6049001)(396003)(136003)(346002)(376002)(39830400003)(366004)(199004)(189003)(4326008)(478600001)(486006)(53936002)(81156014)(81166006)(2906002)(6486002)(39060400002)(97736004)(47776003)(3260700006)(6246003)(117156002)(74482002)(25786009)(36756003)(2486003)(52146003)(52116002)(76176011)(7736002)(68736007)(66066001)(36916002)(23676004)(65826007)(31686004)(31696002)(230700001)(956004)(65956001)(2616005)(6666003)(106356001)(105586002)(5660300001)(86362001)(65806001)(186003)(476003)(54906003)(77096007)(8936002)(26005)(50466002)(446003)(3846002)(8676002)(16576012)(11346002)(229853002)(53546011)(6116002)(16526019)(305945005)(110136005)(7416002)(64126003)(316002)(386003)(58126008)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:AM5PR0201MB2450;H:[192.168.13.3];FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: axentia.se does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtBTTVQUjAyMDFNQjI0NTA7MjM6bFlMdllaUy9WQWZhWEFWdDgveGdhUlpz?= =?utf-8?B?QjNGZnlZakZuUjBWSis3UHVjeW5tcmFLcGhkYnFHUExKODJVNnV0NW5pZEtG?= =?utf-8?B?UDI4b093eEpMMXhoL05pNktYMnI5emp2bkUrY2dWRzNsQVRBUmlsZzhXajhw?= =?utf-8?B?S00yQ0RWVkUyTTZJZjltZHRNUGNlZllXc2FYcWs0ckptK1lER0RNM3NMZ3kv?= =?utf-8?B?RmFBbG1jdVNiUXlXbGhCSUprZjIzQXVXbWtBRUE1d0tUSWhFU1lqU05ybjlu?= =?utf-8?B?b0lFR3NEL3U3N0ZBWHIxa20vRzk2WEs4dzd6VFR6ZUE5MjlnY1JsWU4vcnVT?= =?utf-8?B?ZERoc2ZTWVRwRE5GQXA0Q3NlWnc4TlpkaFU0VnpZZFBzTGlCSks0bGZkNFEv?= =?utf-8?B?UUF0TW54eTJkNEZNS2RkSVFCb29DYnRpTk5ycXV4WDBYMGlKNDdHY1daN0NN?= =?utf-8?B?UThEUDJNZ21VcEs3SjVIRFU0WXBqQUFpbzlrOWpKWFcranQ3OU8wQStGeG9P?= =?utf-8?B?dUxZeVBhL2pxUE9XYVcrTmUwbTNoNUJPZllhZWVKOUtYemFBb1U3NFZvSExT?= =?utf-8?B?a2ZFaytwMFJNMDFoTmVnWU9qSU9ZclVQbEs4Wkh1OFJtZ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zGgsNfz1vp0T4nSvJLu979i7UHSoIDlSV96LStSIts= X-Microsoft-Exchange-Diagnostics: 1;AM5PR0201MB2450;6:bbvVZQx7zbyVk7aH0Dn8/PtH4Bv7Z549xRyRHKnhsXlGJRyJ+hIXZJ41B8KaUh4jnRX8Ph9qMfzL7JRBbMmzALND13flRCaXJ8EKcBx6775PycHh3GaFJFC+g2y5qeBVc8Spb92Lku4SNw6J6u804GQk/V54UrxpBrsXh+cyteGpyTtHWt8sMEIOxUjQYuvLUeiQe9cf7GlO5d8VTWwd4Dd8w/takZ0x/lcm4srTNc4PZU99dmBLzSlafhpXWDhzkJAlJVMfHJux+Su6MeziOqH5+rG2uuDM88auAEEcdrmDsFT0q1r52/NP3O1t5/iDi9581a17AUof5KV4bqGrWxM2HsBMIQE1y4gYRp7mVO+6s7vpTS0315N2UwrIuk4Lsic5mlx1XOSUSIlQ7xzoDo5juXpmeOX3fnsUkSt85TSo96EezhnY92iN6LO0Cbw7fG4R2L90+xvnQXN86pon/g==;5:UjIWDFdmhv1yo9QYoPbs0697aH5uJf8q/EX5hheazF/mhCtNSnUMqd7kAQUe4KDmL92qRWrLl5ydGXBmptCNtaYfRoYIA6OGV3PW7fQYhjfsPJydjBzLhxAs7E3UaPKuN/5PsQajspS7wrj11MVb/CTamble5UJmJxn2SZwUBV0=;7:i015wiohQ6YIcudbcjunC0GI/UjA3VIZK958W/XFVCur69Dt7JUDfDGln3qnUU7XIT77UxkOgjwewIP0IHv0RH4ennJ6wzUv6793YlYMPvbGLV4a4Y6+//O9EXkiFlyjWAgA+BaFLUtvB568cyKDM0fBMVgaEpjd8Hs0E+1FTG2cPIFDjrHs1ibPUnq889CC4Mp3XzU0lZc7czi0nTOuOJBZh15fup82VRGSl3KoDYH4sxqCpxZE/gYIB/zZwXMQ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Sep 2018 00:23:21.8436 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5eaa1c7c-e902-4bfe-71b6-08d60fa12118 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4ee68585-03e1-4785-942a-df9c1871a234 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0201MB2450 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-09-01 00:56, Janusz Krzysztofik wrote: > Most users of get/set array functions iterate consecutive bits of data, > usually a single integer, while processing array of results obtained > from, or building an array of values to be passed to those functions. > Save time wasted on those iterations by changing the functions' API to > accept bitmaps. > > All current users are updated as well. > > More benefits from the change are expected as soon as planned support > for accepting/passing those bitmaps directly from/to respective GPIO > chip callbacks if applicable is implemented. > diff --git a/drivers/i2c/muxes/i2c-mux-gpio.c b/drivers/i2c/muxes/i2c-mux-gpio.c > index 401308e3d036..e28ddc20000d 100644 > --- a/drivers/i2c/muxes/i2c-mux-gpio.c > +++ b/drivers/i2c/muxes/i2c-mux-gpio.c > @@ -22,18 +22,16 @@ struct gpiomux { > struct i2c_mux_gpio_platform_data data; > unsigned gpio_base; > struct gpio_desc **gpios; > - int *values; > }; > > static void i2c_mux_gpio_set(const struct gpiomux *mux, unsigned val) > { > - int i; > - > - for (i = 0; i < mux->data.n_gpios; i++) > - mux->values[i] = (val >> i) & 1; > + DECLARE_BITMAP(value_bitmap, mux->data.n_gpios); Picking a random driver for this comment, it applies to many of them. I think this creates a VLA? Can't you, for the bit-count, just go with BITS_PER_TYPE(unsigned)? Or whatever is appropriate for the driver in question. Also, I find that where you use DECLARE_BITMAP, the _bitmap suffix is just noise and I would very much like to zap it. Cheers, Peter > + > + *value_bitmap = val; > > gpiod_set_array_value_cansleep(mux->data.n_gpios, > - mux->gpios, mux->values); > + mux->gpios, value_bitmap); > } > > static int i2c_mux_gpio_select(struct i2c_mux_core *muxc, u32 chan) > @@ -182,15 +180,13 @@ static int i2c_mux_gpio_probe(struct platform_device *pdev) > return -EPROBE_DEFER; > > muxc = i2c_mux_alloc(parent, &pdev->dev, mux->data.n_values, > - mux->data.n_gpios * sizeof(*mux->gpios) + > - mux->data.n_gpios * sizeof(*mux->values), 0, > + mux->data.n_gpios * sizeof(*mux->gpios), 0, > i2c_mux_gpio_select, NULL); > if (!muxc) { > ret = -ENOMEM; > goto alloc_failed; > } > mux->gpios = muxc->priv; > - mux->values = (int *)(mux->gpios + mux->data.n_gpios); > muxc->priv = mux; > > platform_set_drvdata(pdev, muxc);