Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp954264rdg; Wed, 11 Oct 2023 09:55:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFLkytAPcGrGAw78N8PbQp3wDl8wTJQtRyurA45o7wq12ONquYPac/mZQZToV3wzov10nF+ X-Received: by 2002:a05:6358:5e0f:b0:134:e549:50d6 with SMTP id q15-20020a0563585e0f00b00134e54950d6mr27926338rwn.10.1697043348866; Wed, 11 Oct 2023 09:55:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697043348; cv=none; d=google.com; s=arc-20160816; b=tusHbBsgLFrYTMV5qins8yCYCrviDIljnelnjwtvxIR8TMSXveIGU5vx5KgCs/7jA1 B+WJ7iFbJ93DPLQxA0HLheG1YFaKHcSz+W88gAl9iDXFgC2PnqSJAnjdQa9YAm1JclRl XTKEQqYeJfnAtA2PwoHPq6CB/Ih7BGDfQMCmAey64LDJ2Hx9I0oNKWxBw70qo/Lo47nz EHWw7ErpvYFZduqU6ZZg518lBGFwOASU/M64VnR3fVCU9Pd4lpHJreBVZZORscR7eSPO edLtfMc864pKUcGiBkuauHeuEcPtaqRpJF3oZGXEI1kKX1MxRVqaaV1VYGyAbsqefQ8U 9Z3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=am/KZlH9zy4ig8VJvBM5vrcaa2ZG8SmEKRY278Dbz14=; fh=Fn31UWMv6ipTTGqCqppDZwGK10Xit8vHpFDSYzJzFDU=; b=IVcV+UkJZlpwyaEEP/jC5ADtVAcrXO6mEDoZ2kaoyQgbwnaehYRXC2RFncu0U/ZLhW 9toxMfrx2ECcj3haFW08Cr7/WSROnEyqEsiX4snjT0cztE8HBIXTEmf+IAuE+tL3uzgT KT3aOMO/VHgWdpf88B4a4WzdiCvk0SHitcpB4r3VjMrHgvpCgMefH3RFgsXNKrCZwexW fhhAkMsNNG2Pvlpf8h9tEopg18vIWGC9evjEt3gTFjOk7fMJjzTCwhN7KR0twL1dLr8H wHxDWgDKBUqms5if91rFrOJ5KG6J26zIb3AFcj6hpKX/b1XC5QKzcj1Yj5J+vUpHtjpi BMyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=J+PF3dSt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id a13-20020a056a000c8d00b0068e256c6366si12700545pfv.352.2023.10.11.09.55.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 09:55:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=J+PF3dSt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id CCDA4809692E; Wed, 11 Oct 2023 09:55:31 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230113AbjJKQzL (ORCPT + 99 others); Wed, 11 Oct 2023 12:55:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232217AbjJKQzI (ORCPT ); Wed, 11 Oct 2023 12:55:08 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8804B9D; Wed, 11 Oct 2023 09:55:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697043306; x=1728579306; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=ZraWdjDkR3JP55NOUPdJDQ5etbz9Arzzx5/PgAMMdwg=; b=J+PF3dSt4W+W2hFjyt29xHqJgWmOKrgpjVawygkxq1ca9gSVSK5uhJMn 9Z/387CerVw0yrPXHZVncJ8UKhsOdb5mOWHDPhNfiKlwTdt507okkqzQd 2SGJb6Gl4hHsC4K3OoPZIx7kJUjKYOIQZLHE83NLwXdbFr3yzKXJZh/1E ri7H7ctD6mB0TLvz9y2GAgwRJNhnSsjywifzrkUp3AtL6/Rsk5pud1hEX Whnvw1xow+wTftP9qCNhFWskgWqOm4KX02M6px7EnjqzHx3rJk5VbDP4p eRT16+EjcgkWa+sRZprHXQ2koMQ955olbwTBQMgVNMvDJc5lDAUDXxHwg g==; X-IronPort-AV: E=McAfee;i="6600,9927,10860"; a="364998074" X-IronPort-AV: E=Sophos;i="6.03,216,1694761200"; d="scan'208";a="364998074" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2023 09:55:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10860"; a="870225141" X-IronPort-AV: E=Sophos;i="6.03,216,1694761200"; d="scan'208";a="870225141" Received: from unknown (HELO smile.fi.intel.com) ([10.237.72.54]) by fmsmga002.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2023 09:54:58 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.97-RC1) (envelope-from ) id 1qqcU4-00000004n1h-16MO; Wed, 11 Oct 2023 19:54:56 +0300 Date: Wed, 11 Oct 2023 19:54:55 +0300 From: Andy Shevchenko To: Bartosz Golaszewski Cc: Linus Walleij , linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Bartosz Golaszewski Subject: Re: [PATCH v2 31/62] pinctrl: remove pinctrl_gpio_request() Message-ID: References: <20231011120830.49324-1-brgl@bgdev.pl> <20231011120830.49324-32-brgl@bgdev.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231011120830.49324-32-brgl@bgdev.pl> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=2.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 11 Oct 2023 09:55:31 -0700 (PDT) X-Spam-Level: ** On Wed, Oct 11, 2023 at 02:07:59PM +0200, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > There are no more users of pinctrl_gpio_request() so remove it. My question was and still is why can't we preserve most of the code? It seems with changing a prototype to a new one and using a temporary variable will reduce the diff noise quite a lot. Another question is can we actually derive old functions from _new ones? Like foo_new(struct gpio_chip *gc, unsigned int offset) { ...real implementation... } foo(unsigned gpio) { ...something to get gpio chip and offset... foo_new(gc, offset); } ? -- With Best Regards, Andy Shevchenko