Received: by 2002:ab2:5182:0:b0:1f4:61d5:3ad4 with SMTP id x2csp28030lqi; Fri, 5 Apr 2024 08:55:51 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU62OKL+UBRCJj7TPFkHd+Lc4NrQFw3UP9mgM52usDxvwB7wR6239d4jP/DFKZRDTvmfNf9tyshu1XDpvjoJRbnqw8hAfyV5AONVZsCQw== X-Google-Smtp-Source: AGHT+IEldBLoIS80I+3i6pvlmaLNQoxZblAA3g73MEwZkn7QEu3E+wh9TByXZ/phC3Gh2xJ05iW3 X-Received: by 2002:a05:6871:7997:b0:22e:a2fc:afaf with SMTP id pb23-20020a056871799700b0022ea2fcafafmr1937404oac.49.1712332550831; Fri, 05 Apr 2024 08:55:50 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id q2-20020a05620a038200b0078be5a96997si2092916qkm.509.2024.04.05.08.55.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 08:55:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-133301-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=BHl3hekz; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-133301-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133301-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 865BD1C215B1 for ; Fri, 5 Apr 2024 15:55:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1E159171062; Fri, 5 Apr 2024 15:55:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=intel.com header.i=@intel.com header.b="BHl3hekz" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 72A2616F82C; Fri, 5 Apr 2024 15:55:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.21 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712332542; cv=none; b=eFoXixmfVvtVDRe2QbAvU04kSak0FNwYNnHsBU1VYJ6yDlhCYTaHfwS67TPZh5zkflA9n0ZmtR91viPCuopWb3dao73vzrbIjYRSsbu84Oc4vZ/QyTaKKEpSnzt0gF01CZvxHKXXO8Hky1IhpwUaZtnE3wsT7U3B0U4cRvbn7YI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712332542; c=relaxed/simple; bh=IeVzIxhCDd7OCAhIrOHOjZa0aKtNab8CgE1Nq2v+tZw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VKsv+NF82I91n5xWS3Xv9rtAZTszFTx07T8cCFFLWHMXARm2Bqev+KVAW7Pzw8vT9z3ei74BKOGG7rtdkehvvmfgXPp1ndyB5Yhk10/cjbsyGe61np0iI1gw+jpxPO0oQSP2G2bgaJf/6yz6dllxCHeZChcl+cdrU+Ev6YTwmZw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=BHl3hekz; arc=none smtp.client-ip=198.175.65.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712332541; x=1743868541; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=IeVzIxhCDd7OCAhIrOHOjZa0aKtNab8CgE1Nq2v+tZw=; b=BHl3hekzSokXBnfM70zu+gSqWvnbIB20fNVGBzK/oAN1nIkQicXwZ04/ 9lWIe7jy+cAoMdr1+xsVYJGyl0gk15qkng+28KEfDi90hcNEruWMgBF9u eAUVOUsytETeJcj7M8Y4aFCKQ55Wwfoiw9Ae9gHsTt4V/ji7DJh05sr2R MSpUCDKqEox1GdAcrQD4sYSxOI6htF1Zgjae+BUudLeu8kzwMVwlg+ClB R6tNv+IdGVN2cg55NI5vharzmUbL128Zf68jHPJLl6EZukgAAA24sSnUh zfGKQZfEuGVI/fE1DbIBpUL3GuoYGEv/+G9M7e5fuwnijrQWnKzRRu0TO w==; X-CSE-ConnectionGUID: Hw6Q36LQQnGtwM/usVSjJw== X-CSE-MsgGUID: SG1P5OhUT/aqlTuWebhBsQ== X-IronPort-AV: E=McAfee;i="6600,9927,11035"; a="7568603" X-IronPort-AV: E=Sophos;i="6.07,181,1708416000"; d="scan'208";a="7568603" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Apr 2024 08:55:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11035"; a="915257712" X-IronPort-AV: E=Sophos;i="6.07,181,1708416000"; d="scan'208";a="915257712" Received: from smile.fi.intel.com (HELO smile) ([10.237.72.54]) by fmsmga002.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Apr 2024 08:55:37 -0700 Received: from andy by smile with local (Exim 4.97) (envelope-from ) id 1rslug-00000001n9M-2yqb; Fri, 05 Apr 2024 18:55:34 +0300 Date: Fri, 5 Apr 2024 18:55:34 +0300 From: Andy Shevchenko To: Sudeep Holla Cc: Peng Fan , Linus Walleij , "Peng Fan (OSS)" , "brgl@bgdev.pl" , "linux-gpio@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "cristian.marussi@arm.com" Subject: Re: [PATCH] pinctrl: pinconf-generic: check error value EOPNOTSUPP Message-ID: References: <20240401141031.3106216-1-peng.fan@oss.nxp.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 On Fri, Apr 05, 2024 at 04:47:19PM +0100, Sudeep Holla wrote: > On Fri, Apr 05, 2024 at 06:38:04PM +0300, Andy Shevchenko wrote: > > On Fri, Apr 05, 2024 at 02:13:28AM +0000, Peng Fan wrote: > > > > On Thu, Apr 04, 2024 at 01:44:50PM +0200, Linus Walleij wrote: > > > > > On Mon, Apr 1, 2024 at 4:02 PM Peng Fan (OSS) > > > > wrote: .. > > > > This check opens a Pandora box. > > > > > > > > FWIW, it just like dozen or so drivers that needs to be fixed, I prefer to have > > > > them being moved to ENOTSUPP, rather this patch. > > > > > > I see many patches convert to use EOPNOTSUPP by checking git log. > > > > How is that related? You mean for GPIO/pin control drivers? > > > > > And checkpatch.pl reports warning for using ENOTSUPP. > > > > checkpatch has false-positives, this is just one of them. > > Fair enough. > > > > BTW: is there any issue if using EOPNOTSUPP here? > > > > Yes. we don't want to be inconsistent. Using both in one subsystem is asking > > for troubles. If you want EOPNOTSUPP, please convert *all* users and drop > > ENOTSUPP completely (series out of ~100+ patches I believe :-), which probably > > will be not welcome). > > Well, I don't agree with that 100% now since this is GPIO/pinmux sub-system > practice only. git grep -lw ENOTSUPP utterly disagrees with you. > What if we change the source/root error cause(SCMI) in this > case and keep GPIO/pinmux happy today but tomorrow when this needs to be > used in some other subsystem which uses EOPNOTSUPP by default/consistently. This is different case. For that we may shadow error codes with explicit comments. > Now how do we address that then, hence I mentioned I am not 100% in agreement > now while I was before knowing that this is GPIO/pinmux strategy. > > I don't know how to proceed now ????. KISS principle? There are only 10+ drivers to fix (I showed a rough list) to use ENOTSUPP instead of 100s+ otherwise. -- With Best Regards, Andy Shevchenko