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 33036C4167B for ; Wed, 29 Nov 2023 14:23:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232627AbjK2OXW (ORCPT ); Wed, 29 Nov 2023 09:23:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230467AbjK2OXV (ORCPT ); Wed, 29 Nov 2023 09:23:21 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90A13BF; Wed, 29 Nov 2023 06:23:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701267806; x=1732803806; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=i+nKxtVOoA7/2O3dUI5Zs5QSN68782gToG5E1Dn3b/0=; b=BMam2tcOO7h7oYN+AXqv09Imrcb5qRWJip2vCyzoFbrkdf0dOZ57fhyi qOYejD14LUMrcAoBtfPyB/68/9onfdmk1F7r5stuyYmWz0ywSCQS/ZghT EFrPb16XGVADMEYh3/5D9xjsBp645I3ManhdfYu50JAKrID3v483lbLJn CG8rxV4i8IhKsvkMxY5cknnQVPOKDlZIv6KaZxPgrR2pDi8Fv0BIuVWtm PApNeYFyMEH7AkacJmC6TY8C423Yq30UyA9zDoQreAwD3vDAkXzvzzxMp rrf7JC0u90sNWSJ7OqK/+kkFm0sJo9XEocyuFajzGXl8cnBmgfP8TmPWL g==; X-IronPort-AV: E=McAfee;i="6600,9927,10909"; a="424313715" X-IronPort-AV: E=Sophos;i="6.04,235,1695711600"; d="scan'208";a="424313715" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2023 06:23:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10909"; a="1100543308" X-IronPort-AV: E=Sophos;i="6.04,235,1695711600"; d="scan'208";a="1100543308" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga005.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2023 06:23:17 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1r8LT7-00000000SaA-0d82; Wed, 29 Nov 2023 16:23:13 +0200 Date: Wed, 29 Nov 2023 16:23:12 +0200 From: Andy Shevchenko To: Geert Uytterhoeven Cc: Linus Walleij , Bartosz Golaszewski , Rasmus Villemoes , Jonathan =?iso-8859-1?Q?Neusch=E4fer?= , Krzysztof Kozlowski , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Biju Das , Claudiu Beznea , Jianlong Huang , linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, openbmc@lists.ozlabs.org, linux-mips@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Ray Jui , Scott Branden , Broadcom internal kernel review list , Dong Aisheng , Fabio Estevam , Shawn Guo , Jacky Bai , Pengutronix Kernel Team , Sascha Hauer , NXP Linux Team , Sean Wang , Paul Cercueil , Lakshmi Sowjanya D , Andy Gross , Bjorn Andersson , Konrad Dybcio , Emil Renner Berthing , Hal Feng Subject: Re: [PATCH v3 06/22] pinctrl: core: Make pins const in struct group_desc Message-ID: References: <20231128200155.438722-1-andriy.shevchenko@linux.intel.com> <20231128200155.438722-7-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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 Wed, Nov 29, 2023 at 03:41:55PM +0200, Andy Shevchenko wrote: > On Wed, Nov 29, 2023 at 12:21:45PM +0100, Geert Uytterhoeven wrote: > > On Tue, Nov 28, 2023 at 9:04 PM Andy Shevchenko > > wrote: > > > It's unclear why it's not a const from day 1. Make the pins member > > > const in struct group_desc. Update necessary APIs. ... > > > int pinctrl_generic_add_group(struct pinctrl_dev *pctldev, const char *name, > > > - int *gpins, int ngpins, void *data); > > > + const int *pins, int num_pins, void *data); > > > > > > int pinctrl_generic_remove_group(struct pinctrl_dev *pctldev, > > > unsigned int group_selector); > > > > Probably this is also the right moment to change all of these to arrays > > of unsigned ints? Else you will have mixed int/unsigned int after > > "[PATCH v3 13/22] pinctrl: core: Embed struct pingroup into struct > > group_desc", and purely unsigned int after "[PATCH v3 22/22] pinctrl: > > core: Remove unused members from struct group_desc". > > Hmm... Can it be done later? > > I can, of course try to change the parameter here to be unsigned, but it most > likely fail the build for those drivers means need more patches, more delay to > this series. > > Linus? On the first glance updating API here does not fail the build. Lemme incorporate this into v4. Meanwhile the drivers I left untouched, it might be separate changes to convert from int to const unsigned int. -- With Best Regards, Andy Shevchenko