Received: by 2002:ab2:5c0e:0:b0:1ef:a325:1205 with SMTP id i14csp179765lqk; Wed, 13 Mar 2024 22:42:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVSXOgpZCNG2S5vM32lSlGH8W5obMQ3IvjKKXawrJ9OJBRZZqc3U8aqaC06d23MEkJBU+SyffEutNL6GbKGXLVhJo8I2IMe9rDCQ0wNgw== X-Google-Smtp-Source: AGHT+IH1uzy/0Snmu42aNzN4cnDnfsSRxvmzMFbI5GMG1H9lp+j+J0pjPkZKB3cv5ezGHOdXO6HV X-Received: by 2002:a05:6a21:398d:b0:1a3:4092:935f with SMTP id ad13-20020a056a21398d00b001a34092935fmr596409pzc.46.1710394920240; Wed, 13 Mar 2024 22:42:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710394920; cv=pass; d=google.com; s=arc-20160816; b=t+QCL7G6EzreDpm3pMdMMfHviIIm5Ect6Vh8QnPgS3MePoRvsRIA38/+cQYnVI7YwJ HWwN2zuqOAZ2eKGidpO6pV2EsHmHBdprh9f/RQC8h41SGwR9CMkKHRvCu+NUGm31gT7m P9tHw64bC0l+B2Hwi86WzZMB0nOPwtYdEFeMwVKrzcyIg2BGgwoSw2h0M6ORZZpmv69y jNx6Knwp7W8C2NHoym9jV5XTjil59f7O7fXzQKkaEk8dLKGf6aIu6IDHCRyYntcL01Cn lX9S2TUfuUCVJVTQMXCK85ZAj54Fqf49+k7z99nzb8XQjvirMoJZlWsgCApgqP3plhFE ktyQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=i2BtltxnL97xWhWy74L3zGkCK9rqcFeZUV5OpQa/3cc=; fh=Alnp3q9KAHWA0YbDVMICkmPM44npvGeu8JklcyomLJk=; b=C9cV3yMBpyDBT1eZKYZylLlNxYkVAd8w1FoJSaq18B1ivZmUVj/OqDWHvmA6UGd97b p5IX9YpJAlhdL36YxPNGfGQyBkr0HkF5MYZ5GkIVebasGVZsh1vls66TGf6is8L+/RWX q82U08mY/iIrI4DSDcgcGw+U/mqxJOAzsHYwyKPoSeQcGvdf1i5YcxWaEfKW6aNFq8zp SMrF0p7BPvuqc121BEADfmA92tmUYaP7yh3TOUlGgZ1Rz58JV0bjj1f383s971A1dzrm 6Ex3heUZ8H52ougshlzZF89kNgSGPI2ebVnWGliWffKzfPcZEB4iKGHKrwPPDMbMbZNx YN0w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=WfPlvvFD; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-102791-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102791-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d14-20020aa7868e000000b006e6b57ecdbdsi801192pfo.82.2024.03.13.22.42.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 22:42:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-102791-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=WfPlvvFD; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-102791-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102791-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id E768728507F for ; Thu, 14 Mar 2024 05:41:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A9178C15D; Thu, 14 Mar 2024 05:41:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="WfPlvvFD" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) (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 D9D08DDA7; Thu, 14 Mar 2024 05:41:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710394911; cv=none; b=rG2KcGx1FyDOxcQJosnxUY1y5UENbaj+Sq7Urp2jkkyqKKH/sX4SX4moU98u48DKMr5+mk60d7PCzpkgxEJu0Wy/LNdZIhHQ4bBVMLx6EC+J3yqlnQsKNIOxu7ojKk9UBINJ7UwGYutDYU2EslQ+rbueJSGEGlZz4+2My4U10+Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710394911; c=relaxed/simple; bh=YwFID4EBBHMtdrqO3+xJw7DhnfNbIClbammWskEzMkA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=mIQT9HoFx5RUsImH/OLTyIfUFtxrRTRU4uuoudJ9hO/hm6VR4f8otM37PBzuMju71VDp5Q8E/wJKlPGghvSwWHvXDGaXxUjOQgZmkeJ9FwbImYY4kdOUGskL1GGyyw4ey58BttBCbxshvRcnrTcMsQG1u1nw25atRfp2lw72OOo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=WfPlvvFD; arc=none smtp.client-ip=198.175.65.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710394910; x=1741930910; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=YwFID4EBBHMtdrqO3+xJw7DhnfNbIClbammWskEzMkA=; b=WfPlvvFDFC38ZP7QabJZdydqV2oQIUUOWN60LISiwxG8cdgrOCjNvJHj F52j4CC9SFLm/1k3FZFz6M751Jy1dK6EqJ+Jnibhv8jkUEyKZ62BnSzrC 4yL90NfvEuktT2VK13brAxMYcowe3pijbCWTp85kOD9BQz7089NjdNTlg LdbybPz9WWkTtYMyaE2imwnrqW5QNJV+o60+YR3Bn1foZc/O/aZoWoner V3zwYAenqkYjryJv4+Ap1zY/CXUeUtFe7NjT8N7dyVjDxAqM+YrIIpLfW z0c3nnEWvFHVBtCjhmXAGoFOz2BTXmiQUtEmRoRI7aMOUiTEnaHkJGWLX A==; X-IronPort-AV: E=McAfee;i="6600,9927,11012"; a="16352345" X-IronPort-AV: E=Sophos;i="6.07,124,1708416000"; d="scan'208";a="16352345" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Mar 2024 22:41:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11012"; a="937055356" X-IronPort-AV: E=Sophos;i="6.07,124,1708416000"; d="scan'208";a="937055356" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 13 Mar 2024 22:41:46 -0700 Received: by black.fi.intel.com (Postfix, from userid 1001) id 94B9DFBD; Thu, 14 Mar 2024 07:41:45 +0200 (EET) Date: Thu, 14 Mar 2024 07:41:45 +0200 From: Mika Westerberg To: Florian Fainelli Cc: linux-spi@vger.kernel.org, Michael Walle , Pratyush Yadav , Mark Brown , Michael Walle , "Chia-Lin Kao (AceLan)" , Miquel Raynal , open list Subject: Re: [PATCH v2] spi: Fix error code checking in spi_mem_exec_op() Message-ID: <20240314054145.GM112498@black.fi.intel.com> References: <20240313194530.3150446-1-florian.fainelli@broadcom.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 In-Reply-To: <20240313194530.3150446-1-florian.fainelli@broadcom.com> On Wed, Mar 13, 2024 at 12:45:30PM -0700, Florian Fainelli wrote: > 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 Reviewed-by: Mika Westerberg