Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4400323rdh; Tue, 28 Nov 2023 23:39:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IFlvUU+nvwWS83jpr/dv1LMV6SdtEDUoQtJuz0Q6FD9bpkG1dywp5XgoaYSKvidq70znkvU X-Received: by 2002:a05:6a20:6a07:b0:18a:6639:e331 with SMTP id p7-20020a056a206a0700b0018a6639e331mr28209094pzk.13.1701243554946; Tue, 28 Nov 2023 23:39:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701243554; cv=none; d=google.com; s=arc-20160816; b=0bj1qvzhWAiopBwRfGb/O6VX1ZAIsdyq9Av8hHL+IwMDD2U/NkTL6Nvj8aFfmylKGU rwx3siBZzM+ner8VMYWWqrKVpXM4TOXnxmCHg2GJS0tTKpuLrfTJ3+pyTmpSGwPa4O0w RiKHHyDlOv24TLXnILRWgoAUrUKMrtoysZ9/SyaD+sl/kMCXuSAbswjfnNmSQMT+BTga Jh1pSjqkuvQDCz3BjYIhiqpAvgttEuCDeDrlZLgl0ogoySPHMa85WfSgQuhvyn6SkL4E +qmJNv3hPlUi12CSSIajFSZYmiEvmdjLL58QNQwxE7rKuFJwqSWLrurfUeOpbHhnU6hQ scTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=q7cONzvX3DJ5N2tJbhtl/3F0xHVQGSzTxNADSagct+E=; fh=nuPshAILciBlNt9hm/P/Q5Q+wf+qwus5uQSaOJnBr4g=; b=G9uSBp6Svu6VNHtt9ynJFcsLtBP69vSatQmY7p3nM8Kycgzzfd2Lra7mO/qOq6yKjZ xg5aC8CmsNj1CyqidXnXKE7E4kApexP313HQ62R61KJI6HZNkYryL3gJZVhWZMRcisCc 92PpuKsm39+pO7cXP+ghCfIZyHXdnfeQGTzVTPEszXPcoetJq+KlN7biykW21Ptrwjwy aDTyePA00NBgExBNA9vv4VVF9qeV5sqNa/ZZEe+L7JziPMZETAdv7ziLbcSivFuaoEs/ GCNiaaV+iwdebVpwDJrdaIOwExPBYxWgnDF6ozs1TAIv1a5AhN1ZRGUSRjdaSBrmlXRu jrFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jO5WZpOD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id g22-20020a63f416000000b005c2122e482csi14016902pgi.700.2023.11.28.23.39.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 23:39:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jO5WZpOD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 959AC807866A; Tue, 28 Nov 2023 23:39:12 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229881AbjK2Hiu (ORCPT + 99 others); Wed, 29 Nov 2023 02:38:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229603AbjK2His (ORCPT ); Wed, 29 Nov 2023 02:38:48 -0500 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B245EE6 for ; Tue, 28 Nov 2023 23:38:54 -0800 (PST) Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-332c7d4a6a7so4235743f8f.2 for ; Tue, 28 Nov 2023 23:38:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701243533; x=1701848333; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=q7cONzvX3DJ5N2tJbhtl/3F0xHVQGSzTxNADSagct+E=; b=jO5WZpOD5NJKp2aVj/9F7Pz7r5lwf4r2/dGCPfXxghoxN1jC9vpHXYRc1Urv0ctdS5 dWnqLkq8SjMf+gvw4WbCpKTyckvtBrPi/k+2vp9jifb9rgs8T7NbaNt5ssHp5edFjZdU Q/v+ugYO1kSif3CoJVsnUyVb8SmssREzSTEuVRzvYkiYkhDUam1c0BTLP2M1WHg3MEyd xcPH8r3iK1gy05Bdxix6DJZnDmG+oYkchV2Z4PCgl7P5cFiOkwUp8u+oPtRQvHZIJ5yd 5WmaR0BiBOGkKU6LHYq8kqM5o2tq8Qn5V1UbmTLEKIoAe02230XT3ipBGoO2zzsYAShz vStg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701243533; x=1701848333; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=q7cONzvX3DJ5N2tJbhtl/3F0xHVQGSzTxNADSagct+E=; b=el9nYT1hYyftp/rhfH0S1R5sBmFi88YUOmk3W3d9EiMf/3LqlX67tcnpPQrxLGyi2w ycSsEpdYic9XtSQH+I0qgNU34vup+JEQrZYJLjLNXL1Tz+v7SYe55xJxkV8phd2f+9iu PobzbwxEitqrSIMl7I3+LhrOciQ9wCv2KT33DtaYPwf05uSfAC1WkEwTM8MHyf66Q3ga WZILpOnM3CLmnEmJlPj+bFsZQI+2CAkySys7MPibl6ohcWoqsRitfYgJIjvlDLBq2ZCk Ipu6hIuZuXazNaYYky7FO6OLV9fOixERbjgKo2GYQudxMd6UIcT6VpsriFG+EcfWpgB2 PBzA== X-Gm-Message-State: AOJu0Yys9OGrfVCwofnqISKyZoL+d9ZzV9IbiWXUDKfR+rMXwr/FEdaC OmnU69Ka1DDltw9K34FxDKfZAA== X-Received: by 2002:a5d:6a42:0:b0:332:c50f:45ae with SMTP id t2-20020a5d6a42000000b00332c50f45aemr11339918wrw.44.1701243533133; Tue, 28 Nov 2023 23:38:53 -0800 (PST) Received: from [192.168.2.107] ([79.115.63.75]) by smtp.gmail.com with ESMTPSA id j12-20020a5d464c000000b003330aede2besm4262686wrs.93.2023.11.28.23.38.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Nov 2023 23:38:52 -0800 (PST) Message-ID: <6e81a443-4e28-48fd-9bec-224d07f1682d@linaro.org> Date: Wed, 29 Nov 2023 07:38:50 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v7 1/2] spi: Unify error codes by replacing -ENOTSUPP with -EOPNOTSUPP Content-Language: en-US To: AceLan Kao , Pratyush Yadav , Michael Walle , 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 References: <20231129064311.272422-1-acelan.kao@canonical.com> From: Tudor Ambarus In-Reply-To: <20231129064311.272422-1-acelan.kao@canonical.com> Content-Type: text/plain; charset=UTF-8 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 morse.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 (morse.vger.email [0.0.0.0]); Tue, 28 Nov 2023 23:39:12 -0800 (PST) On 11/29/23 06:43, 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) > I'm fine with the low risk of breaking the MTD related user-space: Acked-by: Tudor Ambarus