From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Perches Subject: Re: [PATCH v5 09/10] gpio: Add a driver for Cadence I3C GPIO expander Date: Wed, 27 Jun 2018 15:54:21 -0700 Message-ID: <8bf36e4025b6ec5198a668edda6bcbef3b06e97b.camel@perches.com> References: <20180622104930.32050-1-boris.brezillon@bootlin.com> <20180622104930.32050-10-boris.brezillon@bootlin.com> <20180626215648.1472b96e@bbrezillon> <20180626234638.076fb816@bbrezillon> <20180627213617.51e10712@bbrezillon> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20180627213617.51e10712@bbrezillon> Sender: linux-kernel-owner@vger.kernel.org To: Boris Brezillon , Andy Shevchenko Cc: Wolfram Sang , linux-i2c , Jonathan Corbet , Linux Documentation List , Greg Kroah-Hartman , Arnd Bergmann , Przemyslaw Sroka , Arkadiusz Golec , Alan Douglas , Bartosz Folta , Damian Kos , Alicja Jurasik-Urbaniak , Cyprian Wronka , Suresh Punnoose , Rafal Ciepiela , Thomas Petazzoni , Nishanth Menon , Rob Herring , Pawel Moll , Mark Rutland List-Id: devicetree@vger.kernel.org On Wed, 2018-06-27 at 21:36 +0200, Boris Brezillon wrote: > I mean, kzalloc() is not deprecated AFAIK and I don't really see the > benefit of using kmalloc_array(), but if that makes you happy, let's go > for kmalloc_array(). kcalloc > I do run checkpatch --strict and fix most of the thing reported except > those hurting readability. I don't remember seeing checkpatch complain > about kzalloc() usage, and I guess it's not smart enough to detect that > for_each_bit_set() can be used to replace the "for() if (BIT(x) & val)" > pattern. That would not an appropriate conversion suggestion in any case. coccinelle could at least look at whether or not x is allocated as a bitmap via DECLARE_BITMAP or bitmap_alloc