Received: by 2002:ab2:5c0e:0:b0:1ef:a325:1205 with SMTP id i14csp209238lqk; Thu, 14 Mar 2024 00:07:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUHv6oPCBaiyK6sjTC6HWMF8nxWW/c37WyIvcusQD5luUVSpv9patVIFNzqo5crqKDERzogfZ4XFA/Qrwwp63FIi1zus71yNjrDIgNh1A== X-Google-Smtp-Source: AGHT+IHA/gbM3/FetpOQSA+2iZWxHlEFHxy+x0StmDTHsl3ZE/45DclbQaDeSl5AmCMB3c1TYKym X-Received: by 2002:a05:6402:550b:b0:565:bb25:bb7a with SMTP id fi11-20020a056402550b00b00565bb25bb7amr489841edb.24.1710400077251; Thu, 14 Mar 2024 00:07:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710400077; cv=pass; d=google.com; s=arc-20160816; b=q0T2VjCsEGCTVU75VVkMRVkm5yiCXWA/b+7lVjY5TLbvEQYSgXq213vK3ckwzhuRyO lrfFtxtABoX1fkQnHcOWYpDjUKScGUsmZ83YTbkD5eQo7Z/yJJ2kBc29uP8ckwqM53q7 5p9c/Ee6Gpy3FxyxfN0kIPyRIBbySskc3tpISjgyCJUiPVtBbtPDiNWbkl6TE+fBqkwo 8TNFrPGFN+xUmpeipCkRW5jRRFBabYsNFloy0Ih1hobUia9ajEwmaul3c06VmxbLOOq4 /a2hfYui27Ql6hNEwknPFIVGTIevggUTL/JkVDo2uwHyo5nJ+1e/nDR/ZLBg/IaDJ9IE BDpw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date:dkim-signature; bh=rEneWH/7DzaC3oT0COEpJUbF2WmAIFv5/EWar3lyv94=; fh=dtUva7izJGjL87WnKKkFJyAfmlxWQpQkbIvfJsZFJ38=; b=KxCY235t2t9VwRYoN88/FCbvyE76tXN7rGOUASEGNaZWlLH6+nWWS2GwPm3Hid87YP 949G4gbwVRgJUQvArqmSwGv26waB8b8Bvvkv+cWTO4Hiju4ZMjH6emQgMRO/NS5QsL0r wb0pstS3j5xxsNOROSA/9Bfj/dGS3e8SQMLd1ZOL5FD+YP1l6xtQeKOyGnTZF+kEZCMh 1Ey91Pj7Bv9p+E0yE/zAvqVWlSpHsa8tpYCXhOwmefl6eLzrX9uOElGeb+peYjyvq5i4 OqyPgllMoMCgKB47+xF0LiT/klIkgQkDHl+BQGErvufY6LHBrYcISkwooaTfvkiycRTh 31CQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=GU9UNOaW; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-102910-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102910-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.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 eo4-20020a056402530400b00566ff420d51si441511edb.295.2024.03.14.00.07.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Mar 2024 00:07:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-102910-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=@bootlin.com header.s=gm1 header.b=GU9UNOaW; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-102910-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102910-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.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 E203E1F215CB for ; Thu, 14 Mar 2024 07:07:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6A5B0DDAD; Thu, 14 Mar 2024 07:07:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="GU9UNOaW" Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) (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 F2B2810940; Thu, 14 Mar 2024 07:07:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.193 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710400068; cv=none; b=czla5nqsmCPNkHLSnZZ5AaVVzVGSMJIj+3pHK+dHugMrgDPgHYZhY5+IfXyditamrYY0hi82JS3gOL5F/s/mApXfV7kh+I63rC8U2q/FzjNHO0mEmRV2URKcLphuyxrU/MoFSP941Wy1dET6KfUUMWIGgrFzr964hal+GTk1qGo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710400068; c=relaxed/simple; bh=GhZ4JGryEcBc3CgKPGPXBJTWzLIzMYIYCJ6K0FhnlV4=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=rG3Nit/M7hM5EGf4EiDynY3ShAHPtAiJe/asEE/zhOrYvfL2lo08vJPpo1BYUqmTQ+8Yi0ptukIsgLY62y0L294FerOBOxyb+wDUrll/Rs4SrVWLgKw216XSWBgNRk/6a6YTU8Q0eu5bGRiosLUVEoWMFA773SNxws7Q8Kg++BA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=GU9UNOaW; arc=none smtp.client-ip=217.70.183.193 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 8C62F240004; Thu, 14 Mar 2024 07:07:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1710400057; 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=rEneWH/7DzaC3oT0COEpJUbF2WmAIFv5/EWar3lyv94=; b=GU9UNOaWkEqPxYo+/L3HhEZjNqQWXp8ibG1PjS1pmSEF/K067MuCXuiB2YG/ekL+89DMCN 1mpOPonyCkMnvOEXotQOhyFyQLPuiYZ9jkqRRQlg327pPIZBg5owwqsa2XESZ4Fhccq/cE hz+8XtxtQjy7XyD5Q3ELqcZvZ0jhH3GvkDH+y3Hh/NXqVGTwSHueDMJPn30iaZVCJhYYzC 9GUwPaJD5nD29InB4tE4oM+O4bXcx9KV3H0WwS611CNMnC2Xas6LAxvsNvkD74WuVgaNCL kFla+kdTxcDlrz6Z0Sz5MdpmuB+AvVwcHq3lIA+MYfOV/vQR/nWZIaDF3J7Liw== Date: Thu, 14 Mar 2024 08:07:35 +0100 From: Miquel Raynal To: Florian Fainelli Cc: linux-spi@vger.kernel.org, Michael Walle , Pratyush Yadav , Mark Brown , Michael Walle , "Chia-Lin Kao (AceLan)" , Mika Westerberg , linux-kernel@vger.kernel.org (open list) Subject: Re: [PATCH v2] spi: Fix error code checking in spi_mem_exec_op() Message-ID: <20240314080735.5fe5b405@xps-13> In-Reply-To: <20240313194530.3150446-1-florian.fainelli@broadcom.com> References: <20240313194530.3150446-1-florian.fainelli@broadcom.com> Organization: Bootlin X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-pc-linux-gnu) 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=US-ASCII Content-Transfer-Encoding: 7bit X-GND-Sasl: miquel.raynal@bootlin.com Hi Florian, florian.fainelli@broadcom.com wrote on Wed, 13 Mar 2024 12:45:30 -0700: > After commit cff49d58f57e ("spi: Unify error codes by replacing -ENOTSUPP with > -EOPNOTSUPP"), our SPI NOR flashes would stop probing with the following > visible in the kernel log: > > [ 2.196300] brcmstb_qspi f0440920.qspi: using bspi-mspi mode > [ 2.210295] spi-nor: probe of spi1.0 failed with error -95 > > It turns out that the check in spi_mem_exec_op() was changed to check > for -ENOTSUPP (old error code) or -EOPNOTSUPP (new error code), but this > means that for drivers that were converted, the second condition is now > true, and we stop falling through like we used to. Fix the error to > check for neither error being neither -ENOTSUPP *nor* -EOPNOTSUPP. > > Fixes: cff49d58f57e ("spi: Unify error codes by replacing -ENOTSUPP with -EOPNOTSUPP") > Reviewed-by: Michael Walle > Reviewed-by: Pratyush Yadav > Signed-off-by: Florian Fainelli Thanks for the fix! Reviewed-by: Miquel Raynal