Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp6959507imm; Wed, 27 Jun 2018 17:02:08 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLL9JQbEJPPF9icM52NDe42MN0JfIo0AHKHDTMlL+n+xYh9sQQKHhvNbbYuzE3qHc1FhLtL X-Received: by 2002:a65:418b:: with SMTP id a11-v6mr6889930pgq.118.1530144127956; Wed, 27 Jun 2018 17:02:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530144127; cv=none; d=google.com; s=arc-20160816; b=c2KPl/ULwgbw08F7NoyMQ44dbA5+bQPDaTTFlIVSD/T5D+lfI22/kujdsKY83Af9Jq nDTFliJ3btXwNybrOQwng8CQjfopf1nPw9mLSRJGHd7ubs96WpA1oxllQeyC+tVFNT5b m//sGJ6LuErL6dBoq5x6mTn8cMwDl0ssnUkIhT/fp8hJyFT3GHwqbjNLJSwBu2vfwOig 1IpPoufwCLvycjTVFEttQI/VZDzOeBMBQ6vFnln+ClHkyYmuL5CIr9T87EFy6cvaGZr1 kz0OXOpvAA94G02uxLDBElzPuvRZ3GnWO6Qe4dQcTRavCMhj9L5oJuJ4tMyOXvVojbQc Co9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=exljcUJDBqIXCaPTpAqCskaGWFmcbsRKkSM4gW5W5mw=; b=I1qUBMqGmEhsysjghzrPKvMy8qbC85YT/vWV3eiXCFGcWfjmHk7JrxM7tbULlOFX+9 X0lu49EjzEoLy90wbwTyBQQdnSncbLvJzT4/hJnXDOl44b7lixX27lZQTFBMKeRhntHj Vgp8mCwGPVYGH2LpxWLRvxCaXIXnL7dYMqnmbF/gZ+HoAlkUxcG9xVqkrx4Ja/9+jA5/ e5UjqsHTzckV39iEZNpOzQJueikXgHnYYrH7GNrj4/NlThY66n0ZA/WpoAWF5SGYozYJ 53I2dEKrDLokYB+wyZ/2myG4U1aJoL6rDZ5RqSV6ZdOybyYTMvTDYsseU4+vJMQUxhjM 6U8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="jkShh/J8"; 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 194-v6si4688446pgf.651.2018.06.27.17.01.53; Wed, 27 Jun 2018 17:02:07 -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="jkShh/J8"; 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 S1751740AbeF1ABE (ORCPT + 99 others); Wed, 27 Jun 2018 20:01:04 -0400 Received: from mail-ua0-f196.google.com ([209.85.217.196]:35228 "EHLO mail-ua0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751172AbeF1ABB (ORCPT ); Wed, 27 Jun 2018 20:01:01 -0400 Received: by mail-ua0-f196.google.com with SMTP id g6-v6so2410914uam.2; Wed, 27 Jun 2018 17:01:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=exljcUJDBqIXCaPTpAqCskaGWFmcbsRKkSM4gW5W5mw=; b=jkShh/J89VNuaGv6CC7onDea3y/ZI5V4RAOlNxZ4B9VxhI8JIX1H+LQGUikm40i3vL sFGsH4lXUaf46aEUqbUTLhxaI0Fwyw5XIR7tt7XebmrV/ERzpSAMnzx+6LvM3CelRtCY O8iE7TMWxOzwPVMBVVwnBWz0dfZdAePFSUpzl7NSj95dCpY1fUoyKu2GEh2A7CSSxwNy xtr1Frn6b33bmJtLpB+DV6nYB5jotVTisHPcGqv7GhQjeS77FRtkA4a6G5NWIC80gmrD s6knEcgb1lUMItleWD/u/AKIk8gPMBN2gZ9Ex4GrGMvLV+gO92xtYEytClVAtEDQRyHY vw0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=exljcUJDBqIXCaPTpAqCskaGWFmcbsRKkSM4gW5W5mw=; b=uUj9BymCe/emxptMG6ILqKML5u4AJZXivfMCpiZG3abIRk0EsI2JRebki+ogObSQvr xg/zf+dnDun2JltKXip0NNHHGX7ISsXzwtWEe8iyo+URwSue9NB804pBaVBAxqYTRF5l nr3PskqAVz5DtnVLPvJBb1x5Ey1Z577ul8DPkcnBnevu3IzFSqWM/FaXL0S0+q3AY8u5 kWAH4iZTKZAX6qqYEHeY2I+KwRJDV1McG2LeL5/M8j7gl7SuThVWwyt1RCxvezix/vlw HQZequR8VI+aTxiXu+6K1o+hQh026PNtSLhzycHD8ZtHSK+BSPP27j5LvKNQg6H8KAzq er9A== X-Gm-Message-State: APt69E0tx9vTnTN+ZPrli/5/DJDzc5rO0ZXbI6s7rSUGgKp3mhMVODaX 0s1+FJhMzGjvKa6+cjfKwgcNdKProFcjlZMe8NdzC9Vg X-Received: by 2002:ab0:1446:: with SMTP id c6-v6mr5189175uae.12.1530144060655; Wed, 27 Jun 2018 17:01:00 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a67:8b02:0:0:0:0:0 with HTTP; Wed, 27 Jun 2018 17:00:58 -0700 (PDT) In-Reply-To: <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> <8bf36e4025b6ec5198a668edda6bcbef3b06e97b.camel@perches.com> From: Andy Shevchenko Date: Thu, 28 Jun 2018 03:00:58 +0300 Message-ID: Subject: Re: [PATCH v5 09/10] gpio: Add a driver for Cadence I3C GPIO expander To: Joe Perches Cc: Boris Brezillon , 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 , Ian Campbell , Kumar Gala , devicetree , Linux Kernel Mailing List , Vitor Soares , Geert Uytterhoeven , Linus Walleij , Xiang Lin , "open list:GPIO SUBSYSTEM" , Sekhar Nori , Przemyslaw Gaj , Marc Zyngier Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 28, 2018 at 1:54 AM, Joe Perches wrote: > 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 IIRC in the original code kmalloc(x*y) is used. >> 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 Huh?! bitmap operations are working against unsigned long *. one long is also a bitmap. So, that coccinelle scripts must be fixed accordingly. -- With Best Regards, Andy Shevchenko