Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp185361lqp; Thu, 4 Apr 2024 10:06:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVANogaIr9PmU4o4NBZhBvDMwlJNWwpw0RpUSICh4MydvkoDipVKO9ryRyvxD8QnLyLUb3OZoLm6hq1DQ6CuJZkOyOeIlLiDOJ8zSfOWg== X-Google-Smtp-Source: AGHT+IF18Evi2qM+xagF1NjDoMUt6Qktf42TCmVIqUBjWSmSGM48pk6mQLpOk2y6KD+pdfG+TqDF X-Received: by 2002:a17:906:16ce:b0:a4e:9d2c:5b74 with SMTP id t14-20020a17090616ce00b00a4e9d2c5b74mr2050951ejd.13.1712250362490; Thu, 04 Apr 2024 10:06:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712250362; cv=pass; d=google.com; s=arc-20160816; b=cw0P7pA2FuDxxaPZwbPhNNh+Xl265e/df6GchGBjOzNI3SWOiuAmVylYX3TkcsaxcD 6bRGqcpHSneL3YJ/jvHQCtsJVzn/N+TKqg8N/XYsXq3gu8dpYtUe5QxBk7buDaHUKVdv WeTUOC+1ujDIVi1AVE347y5X7yPsXmUhW2NprZRPTr5Y/pMEfiOgV3zuDGoIFbpmEEUL CdX2cVtrkLQu+NIL0rtKtijN4feCSDbeXDzhpcpI3vG91SkdAdKqsZFjy24HsgVa14L3 ZHTE8HSf+4H2JifYxdMVBZjy7AvpVpLmd82/pVGHUem18H9nzI/XsI5WLdXxxo13/WF7 rieg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=organization:in-reply-to:content-transfer-encoding :content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:references:message-id:subject:cc:to:from:date :dkim-signature; bh=A8M2XvCREl2y4e9SQf+vAzjfyTeVTTEgm0WArhojtEg=; fh=BZDuehAZ6lS7jpbuy0tAJ93Lem3y7TZc5n0utgMFeKA=; b=p69cLBaE2MsL+3U+0lrabqg7i0Va4zVVVr7QGW7QMXsNrfyPOVpLklUrvjaD6z+GwD S5+e2MPLT/T2dkG08r/vIfR4/MwsxeVBngBoFbqK+RAz0KncaF3CLe8u5+DpWiDZsfu3 zdNSXsYCZel2dNy2fYSal8i5EupSjy4YWKfX/Qm/SL76uepRRLX2xwuKIdrS+zYpq0Ah 06A6mQJGObJ4OVPiFir4QDzMbQiFxdpuToX+duJn94/nDIJItP/1zCKE1spYIakCLonb dsr/7oyN471s5mIeWL3nm5kRVa9uIa4Q5tgVS88YPi1Kfp0gF+yW9jTqA0S41tPR9rM2 GbPg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ERmAQndG; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-131869-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131869-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id g24-20020a1709063b1800b00a47484f15e9si7820042ejf.241.2024.04.04.10.06.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 10:06:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131869-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ERmAQndG; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-131869-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131869-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (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 am.mirrors.kernel.org (Postfix) with ESMTPS id 5ADCC1F2982D for ; Thu, 4 Apr 2024 17:05:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4A90712CDB0; Thu, 4 Apr 2024 17:05:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ERmAQndG" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) (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 538251C6BC; Thu, 4 Apr 2024 17:05:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712250314; cv=none; b=GrBSE3sxk8GguurQMl/Bwnf64uL9v9w5fMurR84zTB04AxApaXqRa0Ew3GN7kWrtzZ5TrRCDw49SenDASpqmzHAzhJ2DqkafdULMMqaZ8yEkUyqQFFbxtsFQk2KcaMj0etrJda/bsqFtoeOp+6QQYUrHYfq1+ruACzuY+ucVHe8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712250314; c=relaxed/simple; bh=ciuhxV+lxpulzdqgBI0ASX/tPUFRGPCHizIhzVA75GQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FyMzruATG6zB/uS+DMZxziQQhuOR+2ya7E4m9CxFbORgPhnLlR0wXhBZdW4vqmqTYpR5vebw6MOnHc7t/2/Go5flZs+89CMjRvctmj9zm/1KEjxKTna/t31ot4jekI/SAqQiwQMfYs77RirgpGffrzxc9oV7Hf36wddsatxiEr0= 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=ERmAQndG; arc=none smtp.client-ip=192.198.163.7 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=1712250312; x=1743786312; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=ciuhxV+lxpulzdqgBI0ASX/tPUFRGPCHizIhzVA75GQ=; b=ERmAQndGdDzEZ37USJLxIjNOOJidrSz6xozPYe+HJeV4a54cqtXGts0f PGXGlVIncBJQPcs1hBsZqLa0ZXhs8QyRKNlEivDCd8YBgfaaGcQ7C2vWr Dd4pH8v5FsezWA/5mjIDU5LdHX/TMnxq+xnzZuzCvR7VbRWWIeJEFRC60 5N2daMzVX7FFUCof8EeXuQkQNEkKm04pWM4RogTwdckZdT7u/1R8HBjm6 PV5vYipZHnp2RYBj/Y5bQK4hU0ggZHHHwb+92Kb3iEHlhAZJrJAzG4Uam 4ZYZ+rhtQgosIAR/La+WNOWkAanklD/jl07jdNk7CMQaeEyyCi/p24MBw w==; X-CSE-ConnectionGUID: p3iTTt48TzKiYiVCax8MDQ== X-CSE-MsgGUID: eXPQlIF5TLuEhKpVDDOfrg== X-IronPort-AV: E=McAfee;i="6600,9927,11034"; a="32949982" X-IronPort-AV: E=Sophos;i="6.07,179,1708416000"; d="scan'208";a="32949982" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Apr 2024 10:05:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11034"; a="915223889" X-IronPort-AV: E=Sophos;i="6.07,179,1708416000"; d="scan'208";a="915223889" 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; 04 Apr 2024 10:05:08 -0700 Received: from andy by smile with local (Exim 4.97) (envelope-from ) id 1rsQWP-00000001WTh-3noL; Thu, 04 Apr 2024 20:05:05 +0300 Date: Thu, 4 Apr 2024 20:05:05 +0300 From: Andy Shevchenko To: Linus Walleij Cc: "Peng Fan (OSS)" , brgl@bgdev.pl, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, cristian.marussi@arm.com, sudeep.holla@arm.com, Peng Fan 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 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: > > > From: Peng Fan > > > > The SCMI error value SCMI_ERR_SUPPORT maps to linux error value > > '-EOPNOTSUPP', so when dump configs, need check the error value > > EOPNOTSUPP, otherwise there will be log "ERROR READING CONFIG SETTING". > > > > Signed-off-by: Peng Fan > (...) > > ret = pin_config_get_for_pin(pctldev, pin, &config); > > /* These are legal errors */ > > - if (ret == -EINVAL || ret == -ENOTSUPP) > > + 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. 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. -- With Best Regards, Andy Shevchenko