From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66FA8C433F5 for ; Tue, 5 Apr 2022 21:04:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347937AbiDEVD7 (ORCPT ); Tue, 5 Apr 2022 17:03:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1452441AbiDEPyz (ORCPT ); Tue, 5 Apr 2022 11:54:55 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 415164667A; Tue, 5 Apr 2022 07:55:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649170559; x=1680706559; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=yzWWaOe8dpgOyl28XgBsyJbkLQtzWsf2/VylB+LCjtU=; b=MOzXD47PSDevMhcLExVMIJq+DqjlAubxGDgI9F2shNxXqHNKrCCGTJEL zpJ9b/bL5oQqdLNqNEsYmIaELVRUyqW424b2v6HYMWzPx+J6PVckTqeWV kBP3UqhnBXUUZBs/7QABZjkzW4Le+QYXqrd2AmEdVn2MfRHjoLaU/jV21 JoqpV+oGCQU1mKgZm1utOkhr8CK3XX5EkFKjwKq2uAP5FhVnJ6w63vXuZ c5ah4pRdOECLi1n/BhFSmWiUJ7PZmoapZ0WT1fMwF/4W057gVW+KlaBu0 qu6SoiJFKnSNm5kCALKDWOq9S/23dJ0IoKEvIIJcx+Dat/yY4p3MNxXzh w==; X-IronPort-AV: E=McAfee;i="6200,9189,10307"; a="248282983" X-IronPort-AV: E=Sophos;i="5.90,236,1643702400"; d="scan'208";a="248282983" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Apr 2022 07:55:41 -0700 X-IronPort-AV: E=Sophos;i="5.90,236,1643702400"; d="scan'208";a="549083117" Received: from smile.fi.intel.com ([10.237.72.59]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Apr 2022 07:55:40 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.95) (envelope-from ) id 1nbkaM-00DQCd-7l; Tue, 05 Apr 2022 17:55:10 +0300 Date: Tue, 5 Apr 2022 17:55:09 +0300 From: Andy Shevchenko To: Bartosz Golaszewski Cc: "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List , Linus Walleij Subject: Re: [PATCH v1 1/3] gpiolib: Split out for_each_gpio_desc() macro Message-ID: References: <20220330145910.1946-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 05, 2022 at 02:21:42PM +0200, Bartosz Golaszewski wrote: > On Wed, Mar 30, 2022 at 4:59 PM Andy Shevchenko > wrote: ... > > -#define for_each_gpio_desc_with_flag(i, gc, desc, flag) \ > > +#define for_each_gpio_desc(i, gc, desc) \ > > While at it: how about declaring the i variable in the loop definition? It will require changes in the users, so, I will do it as a prerequisite separate change. > > for (i = 0, desc = gpiochip_get_desc(gc, i); \ > > i < gc->ngpio; \ > > - i++, desc = gpiochip_get_desc(gc, i)) \ > > + i++, desc = gpiochip_get_desc(gc, i)) -- With Best Regards, Andy Shevchenko