Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4419412rdh; Wed, 29 Nov 2023 00:28:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IGQTFtQDXkKMIag4zUXGZJGndIQw3IGAmHTy15OKlotd9Pz7oqNQ9n7n9nQFPM3FmegiShA X-Received: by 2002:a05:6a00:2909:b0:68c:69ca:2786 with SMTP id cg9-20020a056a00290900b0068c69ca2786mr17764387pfb.34.1701246539026; Wed, 29 Nov 2023 00:28:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701246539; cv=none; d=google.com; s=arc-20160816; b=gzaSJZuHC5EJjAYmfRWsIOIfW1TV160nwM4ViTFfCt+ZBoUCe6qDWgo6JjY+hzsH0f X8YYWBP8211d8DpXPGGZS5vGZ9DXdPZjRnEMDb91F6WWqF3UeQq4BbI9P/oULWZ2D85f vyNHXLTNxKipX7IJgBpRGcU/zQlR3Rko+SM/rBZINnYBWzMwTqFVThsBzH2ZQoG5i83I RkQs0b0xD5hVs+iYCsUMdg93Pew3P37Iq3yMQH+hNITatkf4AEujNWlUlyjGcnXpfG7N FYe4SkSHg264HaCjsebBHc27aU3vTeL8mOfDRIJ836U5pL0uN0OAoXjl81JBowHX2Rf4 edpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:references :in-reply-to:subject:cc:to:from:date:mime-version:dkim-signature; bh=wMoiMytgcumkKFLAJMoH9xk3ngRLwqpyXtXaQaRIiJo=; fh=Sz22lV+BWDZkxHxWeZa5Y6dlbkl7zTyz5QS4b3bDY/k=; b=IaqDocQZHEGLyoX+hnMWLdDOJWLrgB7Ysjz9xNl3fIiYQ+C7RKSQmhsE9/zJaGfICg IIWWEf9/yPr47yuPThOnUBQwwSHhv92Qsn1XSiHJ4PylysuoVa62I9/tEelfAsnjfZc3 XGNvP420Bo2ez+HuUNqrhs27e0mdl1zT1c7Zdx+6vXOrXNejd0ECp2sB5gmPiT9VhTob TjWo8tZTGKaojWUJc9BOZQNqJG9gQ8ki2LJW3+qP+lJaZ9otGlpmsfGVu8y07Af9UjkV 1Qso/Ow8cJKrO4mBk2vFSvyQq7QbiHfVhZ5rmRdiNsictZL+ToR15jVZpW/oR/BaHaEu Pwwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2022082101 header.b=P3LJ36Ug; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id s21-20020a656915000000b005c1e78daf17si13776716pgq.485.2023.11.29.00.28.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 00:28:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2022082101 header.b=P3LJ36Ug; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 654848046A32; Wed, 29 Nov 2023 00:28:56 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230311AbjK2I22 (ORCPT + 99 others); Wed, 29 Nov 2023 03:28:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230194AbjK2I21 (ORCPT ); Wed, 29 Nov 2023 03:28:27 -0500 Received: from mail.3ffe.de (0001.3ffe.de [159.69.201.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3CB083; Wed, 29 Nov 2023 00:28:33 -0800 (PST) Received: from 3ffe.de (0001.3ffe.de [IPv6:2a01:4f8:c0c:9d57::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.3ffe.de (Postfix) with ESMTPSA id 929098F6; Wed, 29 Nov 2023 09:28:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2022082101; t=1701246511; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wMoiMytgcumkKFLAJMoH9xk3ngRLwqpyXtXaQaRIiJo=; b=P3LJ36UgS3LTJz586QgMxNz+q8Zz5Jpc8V5Of21zhc66kfZa5NxxMfdJ4nip+EmgEISHRm DhaYhLa/U1u/oodhbGxToYg3iySiW9OGaoG1X/w40DD/3JXupBPJNsKpC8ggAp26ZzHPDC 73FlP8zIjaYPkBgyybzBvUMUjc7hUSGgG7VduDW6RSvYok6ewKiTFX44NUxBeelxFdbk/F G/e4Aji9+6gx/bDN+l/36LDWDHnds2WBc07PIhBa4vX3el/fa/OGzrUmlrkljpjNrHztPF gxrxrAOp3XG6jV0AyrdkE+PwPVuSeA3aE/esK7cpRhQTUfsJeiWNzr+R+MuxXg== MIME-Version: 1.0 Date: Wed, 29 Nov 2023 09:28:31 +0100 From: Michael Walle To: AceLan Kao Cc: Tudor Ambarus , Pratyush Yadav , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Mika Westerberg , Dhruva Gole , linux-mtd@lists.infradead.org, Mark Brown , Kamal Dasu , =?UTF-8?Q?Jonathan_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 In-Reply-To: <20231129064311.272422-1-acelan.kao@canonical.com> References: <20231129064311.272422-1-acelan.kao@canonical.com> Message-ID: <60dec3dd502baab260da06fe01453c5d@walle.cc> X-Sender: michael@walle.cc Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email 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 (agentk.vger.email [0.0.0.0]); Wed, 29 Nov 2023 00:28:56 -0800 (PST) > 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) Acked-by: Michael Walle -michael