Received: by 2002:ab2:5182:0:b0:1f4:61d5:3ad4 with SMTP id x2csp25395lqi; Fri, 5 Apr 2024 08:50:36 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWzA0O03KN0EnkxT3MvMBesPmXG8amlpPxUb65Sr7ffGp9rAqoP2CLM31YO5KWmNmA1TjpJWh0kP7yV+SSwr7G1hAq47o/3tV8CBML2lQ== X-Google-Smtp-Source: AGHT+IGwS4LC4W5L5EkjLpxNy+7kh12gh5+ypoaOz+0j7b/eq8Pq98bdQE2+KHLUnCGtzrRwxTc7 X-Received: by 2002:a05:6a20:daa2:b0:1a3:6dbb:f072 with SMTP id iy34-20020a056a20daa200b001a36dbbf072mr2192750pzb.8.1712332235952; Fri, 05 Apr 2024 08:50:35 -0700 (PDT) Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id l9-20020a63f309000000b005e2b17c97efsi1574226pgh.28.2024.04.05.08.50.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 08:50:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-133271-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=JtnnTpbp; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-133271-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133271-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id C399DB2641F for ; Fri, 5 Apr 2024 15:39:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9116B16FF36; Fri, 5 Apr 2024 15:39:36 +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="JtnnTpbp" 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 0548D16F8E7; Fri, 5 Apr 2024 15:39:33 +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=1712331575; cv=none; b=EdQnkxD/z6FyaFyXpGGItlUIURQXhdf0d+9qTjWc3xmduzNheJPXB54ImoelNyiCf4NZvNTCAQxDbOAwssnDBa1M3SxEXPfUIj8ikq4ISOD9qPBCzxmDM/aK8pcK/vmTzHefWuXfkMU2vIlu7KLZXIUuBHf/wi9mxFBTL2lGIBg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712331575; c=relaxed/simple; bh=9a5wWcb4/mZbxlW/jWQh98jPjoVQcPSfchAefa9YY+I=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=TG2Yhx6vahYkNsMWDScrzg5yieJ49Bq9UmMph2ZpPkMSFP/nGMLVCt02U/5s6S5SvGz06jIuep5mnzkoxA5WNi1jItqR2EJb9XqectSWLzQz41mWpwfpCWnxIXhfpjralgHnLqbymJa3td/TxOc04BOcpUs5rJvuatFOTql9nb8= 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=JtnnTpbp; 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=1712331574; x=1743867574; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=9a5wWcb4/mZbxlW/jWQh98jPjoVQcPSfchAefa9YY+I=; b=JtnnTpbp5ObqP8r0KiHgmTeQdP0lFywsvQqjmQx7UP5Xj+Zans6DiIXS 2mcoN1oV0Lh3qs50Iz98gnJJAG4q7bvQyt582KvtpnKHZvWVmMUl9XYqj N4yWnXI4M1O1Xbz0kc1uTTxnqk3KgNlP/32CQ2gAMIXAYNmzo9rWYl3JY cJJMnlBYXw9uBEJnKJHzcBxwJndv83lB3+AJTFcXP3hAJtgl5gP1CmJkL hIbCS7/Lz9YX+0DLJNgkjdMFctJ11kCfSgrzBBOZi8RvmUSHr52Xg0Jie IreXqg4trtU3SYCh8Okol7jxodqOkG5WQmELv9FjTaAtfITOFH3fp+iYd w==; X-CSE-ConnectionGUID: hQCzJQIHTc+4865UYCegVw== X-CSE-MsgGUID: 3qRpq0aPT3q/w47JB4dPxw== X-IronPort-AV: E=McAfee;i="6600,9927,11035"; a="7565967" X-IronPort-AV: E=Sophos;i="6.07,181,1708416000"; d="scan'208";a="7565967" 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:39:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11035"; a="915257320" X-IronPort-AV: E=Sophos;i="6.07,181,1708416000"; d="scan'208";a="915257320" 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:39:31 -0700 Received: from andy by smile with local (Exim 4.97) (envelope-from ) id 1rslf6-00000001mvK-3A78; Fri, 05 Apr 2024 18:39:28 +0300 Date: Fri, 5 Apr 2024 18:39:28 +0300 From: Andy Shevchenko To: Sudeep Holla Cc: Linus Walleij , Peng Fan , "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 10:46:04AM +0100, Sudeep Holla 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: .. > > > > > + if (ret == -EINVAL || ret == -ENOTSUPP || ret == > > > > > + -EOPNOTSUPP) > > > > > > > > TBH it's a bit odd to call an in-kernel API such as > > > > pin_config_get_for_pin() and get -EOPNOTSUPP back. But it's not like I care > > > a lot, so patch applied. > > > > > > Hmm... I would like actually to get this being consistent. The documentation > > > explicitly says that in-kernel APIs uses Linux error code and not POSIX one. > > > > Would you please share me the documentation? > > +1, I am interested in knowing more about this as I wasn't aware of this. See my previous reply. > > > 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. > > > > And checkpatch.pl reports warning for using ENOTSUPP. > > Exactly, I do remember changing ENOTSUPP to EOPNOTSUPP based on checkpatch > suggestion. Sometimes suggestions can be wrong. Checkpatch is famous for false-positives as it's a dumb tool, it can't know about everything. > So either the checkpatch.pl or the document you are referring > is inconsistent and needs fixing either way. True. -- With Best Regards, Andy Shevchenko