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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4550BC433EF for ; Mon, 8 Nov 2021 09:28:07 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0FC936120D for ; Mon, 8 Nov 2021 09:28:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0FC936120D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cSXPPsgq7fF7ajj7Ad76+6HN7f7EZ4jmuVxItccTZaY=; b=0dlgKFYVvpoDwq hbvJ7H0pVD1L2wsR2I7mabkfIg5PtCNOulMO9vjsHlVeMog5ViwRu/vXmy6zslZfdCz3+S2kEp2E4 4rLnFQZH/m1LpcxJ1q3sVFATHavJmVGEZb+lLoz4ddc7jqMVB2OV2PPQ6Bru2N46ghm8U9AATLPPC 1H7w84Xie4tJzdJrOkgaJTF6NaJhvE7dXmo02t9XDpCkztYgO8qbQF/MGGL+NEv5bbJxPxD6gHX4n Xw3vH3ZI5fcH9ka9cc+D6NsAvFBdeXl/LJtDeOPk7DR12rDQCfylUAXAcfGhhLk6cYzZxlsge3pAf gaw2wZWbVacoq7ZCGtyg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mk0v7-00FrGl-2E; Mon, 08 Nov 2021 09:26:29 +0000 Received: from mga18.intel.com ([134.134.136.126]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mk0v3-00FrGJ-7D; Mon, 08 Nov 2021 09:26:26 +0000 X-IronPort-AV: E=McAfee;i="6200,9189,10161"; a="219095475" X-IronPort-AV: E=Sophos;i="5.87,218,1631602800"; d="scan'208";a="219095475" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Nov 2021 01:26:23 -0800 X-IronPort-AV: E=Sophos;i="5.87,218,1631602800"; d="scan'208";a="499814430" Received: from smile.fi.intel.com ([10.237.72.184]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Nov 2021 01:26:18 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.95) (envelope-from ) id 1mk0ui-004cSx-N0; Mon, 08 Nov 2021 11:26:04 +0200 Date: Mon, 8 Nov 2021 11:26:04 +0200 From: Andy Shevchenko To: Joe Perches Cc: Bartosz Golaszewski , Jianqun Xu , Linus Walleij , Sai Krishna Potthuri , Andrew Morton , "linux-gpio@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-rockchip@lists.infradead.org" , Bamvor Jian Zhang , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Heiko Stuebner , Patrice Chotard , Michal Simek , Andy Shevchenko Subject: Re: [PATCH v1 14/19] pinctrl: st: Use temporary variable for struct device Message-ID: References: <20211105124242.27288-1-andriy.shevchenko@linux.intel.com> <20211105124242.27288-14-andriy.shevchenko@linux.intel.com> <4b3f1ee1179dd6d4b010cb110b38d26e7d91c19f.camel@perches.com> <103d7321a2d18e44fb8c01483b1197766aff645a.camel@perches.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <103d7321a2d18e44fb8c01483b1197766aff645a.camel@perches.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211108_012625_329918_6B6E9385 X-CRM114-Status: GOOD ( 22.43 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, Nov 06, 2021 at 01:28:17AM -0700, Joe Perches wrote: > On Sat, 2021-11-06 at 10:07 +0200, Andy Shevchenko wrote: > > On Saturday, November 6, 2021, Joe Perches wrote: > > > On Fri, 2021-11-05 at 14:42 +0200, Andy Shevchenko wrote: ... > > > > - new_map = devm_kcalloc(pctldev->dev, > > > > - map_num, sizeof(*new_map), GFP_KERNEL); > > > > + new_map = devm_kcalloc(dev, map_num, sizeof(*new_map), GFP_KERNEL); > > > > > > Are pctldev->dev and dev the same pointer? > > > > Seems so. > > OK. > > > https://elixir.bootlin.com/linux/latest/source/drivers/pinctrl/core.c#L2015 > > > > > It seems they are not. > > > > Can you elaborate, please? > From code shape, you assign dev to info->dev rather than pctldev->dev Yes. And they are the same. TBH these three drivers seem to be written by copy'n'paste method where the first one, whichever it was, is simply messy and buggy. The extra redundant parameter (often struct platform_device) is passed to zillions of functions when at the same time info structure already has pointer to struct device is the easiest one to notice. And I believe so on, so on... > I also believe this single 19 patch series would be better as > multiple patch series. I'm fine with either, but I would like to hear from Linus about what he wishes as the maintainer. You know that we don't add code without users? So that's why my motive to send it in full. > IMO: the strarray variants introduction and use should be a separate > patchset from the rest. It will add unnecessary churn. Yeah, I have planned to send just that, but then it took more and more cleanups and I have to stop at some point, the code there is bad (historically or by other reasons, dunno). -- With Best Regards, Andy Shevchenko _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel