Received: by 2002:ab2:5182:0:b0:1f4:61d5:3ad4 with SMTP id x2csp48451lqi; Fri, 5 Apr 2024 09:23:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXc7BDlHHDjYOlXJ7gKHW2jLHmzi972GN2BpxJh7DzT7cZg2wwjH7WlKYj68VOPxDaDLKdu3rdRiqu6WluRrvRCNawwOBKrt+9ezP4oQg== X-Google-Smtp-Source: AGHT+IG9ku+oRCfvHh+lKuTDF7OIjaRb49WoYPzC0Tk6/Wj1l6/H4Sz79j09VagDh0DQ0NOxVNiv X-Received: by 2002:a05:6a20:1581:b0:1a3:6ec2:d23b with SMTP id h1-20020a056a20158100b001a36ec2d23bmr2336020pzj.15.1712334218656; Fri, 05 Apr 2024 09:23:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712334218; cv=pass; d=google.com; s=arc-20160816; b=v+S917371p5TlDSkoAblPxfODn6gB02W/kYYuBjGm/r2FXnckOQjMIkktpy5YBm4PL NC2q87jdYKuvVqkwdZxCmmezwrClwzPwMfyk9qEVj+4jGFLFawGSpZbmF5v0qqxWIIRS kD5Fzi+/of136Iq/TlRd9bCcYe6SBLx4fYxoS/jrmo79sQJtTKeR+xJLYgSI/j2ruS+W S1pGa6TNqvNu/p6Cu9po5eV8LjkY0pgiCcRhkbUL6uow6qkQWthvl/3csRZX+faY30Ew J9tMJNRKItPWWpgRc+9h9ohIkUfoIeaanFSu+U9JcFS9r26VknzZIfG3VuPAEckwX3Hz +waQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=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; bh=WyhCKwMl1GlKJJc574Q/N7iHHdBToWHGrsy3116S6jk=; fh=ueziPbMXzncSHDm6g1xL0x8RJ9YORmoDHWxreTc3eX8=; b=vtcPY4MtDyaUi1xitAatRtDOF0W5WekF2twV9QKdk6XOp5tnEwaDS8Kyd8ehnzfct+ Tt6eUQnBYWMS6uVX3XdxndWRL1zC9qBl1VAvURH1pBzKBgGfP+ctVKDERT8iE+dXNStf pWZdvSISBTyPM7bBnt4r60c8+k7wQJYidQph/IGSIy+WLmMXdEpW1u8vOViUBMJA8DSq RcTQJbUvPU8y/VeY486pDdLLMvRsolLm+culXqKDOHf6UQmNQdCP1XRb23z0t/RdDs56 0HOexeNhgWL0Y7YoUImNeM3tjodVbRJtOwIvrKa4bgP3YZ/z9qTGYAF1yAQBbCuRWPsE gyJA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-133309-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133309-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id c22-20020a63d156000000b005df58c84bfesi1602598pgj.506.2024.04.05.09.23.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 09:23:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-133309-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; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-133309-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133309-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.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 DC95BB227B9 for ; Fri, 5 Apr 2024 16:07:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7D981171074; Fri, 5 Apr 2024 16:07:08 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 90DFE16FF4B; Fri, 5 Apr 2024 16:07:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712333228; cv=none; b=HAg/woXQGGOu35PtMgNzTJurDrIgEHo3nD2UJtd6AlBsReHoURdplEbRuV7UcEGMOu7CAIjFux/HzqD49uadzsauRvdeD/jqVp6q0F8qigf3AeUBHoEKu13wUz+vM8DaKhmJWykoGY88f+rVzGLwuCs/m0+p7JspLuCI8LnAWzA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712333228; c=relaxed/simple; bh=9qVgXbGbN6ujtySIPhcvDBQPt7o17WIPa/+XgWBHJek=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ckQNjMeyYpuBMhmBVu3/z58sMZN2P0P8Wlkeiz9YJFUJjCrsRj11Gqv2hR5X0p2vPQ9GZyFaVxst6HDSbQLexnDnwwyZnTQIGips79joFuhfBiVM+yWFoGBURpvfmZdJgaFEXL1l4/wbftmSzaA0skFW9T3SQbMvADcvO1oNruI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8A1C6FEC; Fri, 5 Apr 2024 09:07:35 -0700 (PDT) Received: from bogus (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A79673F64C; Fri, 5 Apr 2024 09:07:03 -0700 (PDT) Date: Fri, 5 Apr 2024 17:07:00 +0100 From: Sudeep Holla To: Andy Shevchenko Cc: Peng Fan , Linus Walleij , "Peng Fan (OSS)" , Sudeep Holla , "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: On Fri, Apr 05, 2024 at 06:55:34PM +0300, Andy Shevchenko wrote: > On Fri, Apr 05, 2024 at 04:47:19PM +0100, Sudeep Holla wrote: > > > > 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. > /me more confused. Though I haven't dig deeper to chech how many of these EOPNOTSUPP uses are intended for userspace. $git grep -lw ENOTSUPP | wc -l 713 git grep -lw EOPNOTSUPP | wc -l 2946 > > 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. > Sure as along as that is acceptable. > > 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. > Again I assume you are referring to just GPIO/pinmux subsystem right. As the number of occurrence of EOPNOTSUPP in the kernel overall is quite large. I was thinking of changing the SCMI error map from EOPNOTSUPP to ENOTSUPP, but for now I think it is better to just handle the mapping in the pinmux part of SCMI that pinmux subsystem interacts with. In future if more subsystem expect ENOTSUPP, then we can change it. I hope this aligns with KISS principle as we are just fixing for the case that is know to cause issue rather than changing all probably regressing and then having to fix them all. Thanks for the time and explanation. -- Regards, Sudeep