Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4388362rdh; Tue, 28 Nov 2023 23:05:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IER7KeUrLCqYu83tufq91AWUS1C3pmQfbMaFR9N3nyKs8Mpsh6hBo74XQx8n8elk/6RkdwZ X-Received: by 2002:a17:90b:1e0d:b0:285:ade2:48c6 with SMTP id pg13-20020a17090b1e0d00b00285ade248c6mr12094191pjb.13.1701241557602; Tue, 28 Nov 2023 23:05:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701241557; cv=none; d=google.com; s=arc-20160816; b=eKx0FSP7CnzTua2nU/glt8jDHy8RUqM/zMI3O0fcBXDR6eUj2IzVbo7o7K6aI1cACl eZ0wKdnH1CxxvEqaD3e9lzkFzMyxMygv3DdlUJTTczQqTdkjfDlCUd8SKOsRilIskHdN wQCypgDyqZ70LlwSVEQaQBvNp13otUBSs8AgvWGYPY9RhqIAqwn63eeEfm9vu6V5dbpp 4P/d1fyq4bTyZhnil3tFd8l2tkeNcTgxwuc/3W1BDjMi5Mc8S4KzfaTfZCWAR5pB9mc0 q8gAW/2SMAv03Gah1toOwfh7ZZj6dcSs1PHBm9ocr0Xa9FZr20eHgGy19kg9k/2QjX7l 5N9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=IuFjTDg3OjZ/meWj/YkzePbwffNn54sOm4gbvRwJjtk=; fh=I/cFA2oxGr5X4toDxXXMHLD+kQ6iiTD6xXk1RW3+TqE=; b=fVUgteFjbu9oxVGPIJ7NbBf7YEfedDnFKsG+yMGx5mJLeuRmnUm3J3v+mSbHe3SMpS cd5AWf6c0gEz5UYMSC3pxhXlvcW+69E3B4kfvdSwfeDgwcdq90xAfNN/zLZmgk015Juu WVbieH41Mtf9Mbg5ht0QBRbjyLA9fEMRbhQXb5vS0zIaIfp//69braowVCgMfOdjDMPO 7u4QQBJiVxKqjm7u5qywYeLASZ9Aqd2aVaNd9JUyuA1tST1adjjUTioXt8NlEvJv+Dj/ SrH+pdlc82dR81O2n7yY2jfumShC14lCGo+G4RCkuAi2kDYJsgwxJ9l+guYnBvFuFtDv eAwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nqFzFy0e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id a7-20020a17090a854700b0027e022bd420si761472pjw.77.2023.11.28.23.05.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 23:05:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nqFzFy0e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id 3281F80C2463; Tue, 28 Nov 2023 23:05:56 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230017AbjK2HFe (ORCPT + 99 others); Wed, 29 Nov 2023 02:05:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230013AbjK2HFb (ORCPT ); Wed, 29 Nov 2023 02:05:31 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B14319AB; Tue, 28 Nov 2023 23:05:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701241537; x=1732777537; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=1qmvHwfK7iTIDc/XSt6kxSJ8+uPc6tnRGIsBlPEG/V0=; b=nqFzFy0edbCqsxdsRl6wGbYg2sjXkHm4WsouPIGOR/NU49oDUrBqZi0p OBKhbPAtRQ8L17Ch4n4MIhN28BYwQHIU5v7tRMYoovpCilPx5J3pi6Rn0 0WmfIvtRWcy5/OakgOhJqQ99ZiZ5gbd01pmekjlcEC+AuMWXxMB/IOEsk O2utbrNYfv6eEp04U63CQPjA95TyfL60IjdisP46HXToCY5RVAeECXn6V eLOxqb55aY+KDr85U1xe59gXfVZs2jutUhB41gqI6QKG0cyJ+KOuzmDXA lghSGzLETHqSleqKswX6gt/M63hEar+M5ByBwPf+o/6eQYtfcSSqKezsR Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10908"; a="391977373" X-IronPort-AV: E=Sophos;i="6.04,235,1695711600"; d="scan'208";a="391977373" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Nov 2023 23:05:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10908"; a="772585802" X-IronPort-AV: E=Sophos;i="6.04,235,1695711600"; d="scan'208";a="772585802" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga007.fm.intel.com with ESMTP; 28 Nov 2023 23:05:32 -0800 Received: by black.fi.intel.com (Postfix, from userid 1001) id 6B64023A; Wed, 29 Nov 2023 09:05:31 +0200 (EET) Date: Wed, 29 Nov 2023 09:05:31 +0200 From: Mika Westerberg To: AceLan Kao Cc: Tudor Ambarus , Pratyush Yadav , Michael Walle , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Dhruva Gole , linux-mtd@lists.infradead.org, Mark Brown , Kamal Dasu , Jonathan =?utf-8?Q?Neusch=C3=A4fer?= , Mario Kicherer , Chuanhong Guo , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v7 1/2] spi: Unify error codes by replacing -ENOTSUPP with -EOPNOTSUPP Message-ID: <20231129070531.GP1074920@black.fi.intel.com> References: <20231129064311.272422-1-acelan.kao@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20231129064311.272422-1-acelan.kao@canonical.com> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Tue, 28 Nov 2023 23:05:56 -0800 (PST) On Wed, Nov 29, 2023 at 02:43:10PM +0800, AceLan Kao wrote: > From: "Chia-Lin Kao (AceLan)" > > This commit updates the SPI subsystem, particularly affecting "SPI MEM" > drivers and core parts, by replacing the -ENOTSUPP error code with > -EOPNOTSUPP. > > The key motivations for this change are as follows: > 1. The spi-nor driver currently uses EOPNOTSUPP, whereas calls to spi-mem > might return ENOTSUPP. This update aims to unify the error reporting > within the SPI subsystem for clarity and consistency. > > 2. The use of ENOTSUPP has been flagged by checkpatch as inappropriate, > mainly being reserved for NFS-related errors. To align with kernel coding > standards and recommendations, this change is being made. > > 3. By using EOPNOTSUPP, we provide more specific context to the error, > indicating that a particular operation is not supported. This helps > differentiate from the more generic ENOTSUPP error, allowing drivers to > better handle and respond to different error scenarios. > > Risks and Considerations: > While this change is primarily intended as a code cleanup and error code > unification, there is a minor risk of breaking user-space applications > that rely on specific return codes for unsupported operations. However, > this risk is considered low, as such use-cases are unlikely to be common > or critical. Nevertheless, developers and users should be aware of this > change, especially if they have scripts or tools that specifically handle > SPI error codes. > > This commit does not introduce any functional changes to the SPI subsystem > or the affected drivers. > > Signed-off-by: Chia-Lin Kao (AceLan) Reviewed-by: Mika Westerberg