Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1740211lql; Wed, 13 Mar 2024 07:04:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVuJfllzvINDArmj9lvwggdzHkHtBDVJ072luXZ7WRFfNxa2Sij25eoZrWUo+EORXq7E96GHBhS7oxK4j93lgsuPypD0esf/J3Y/wk+Lg== X-Google-Smtp-Source: AGHT+IGPJ6Hf0pH3OK7svrqU4lgJy3ftGz0he60mTfJqX/4UhpdZVt17BdyqHjpgEcIZscXqIoNb X-Received: by 2002:a50:9319:0:b0:568:1bd8:a5f9 with SMTP id m25-20020a509319000000b005681bd8a5f9mr9332844eda.33.1710338668031; Wed, 13 Mar 2024 07:04:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710338668; cv=pass; d=google.com; s=arc-20160816; b=yipjIIqhrOUdU3AipbaDV6GzhT9nX0babz4JSStV6cbyQAUKwRgIarCYRQW9+lqU5v Td0O9w4IH7y9iQOUMMu+kChAzpIaKKGfNhAPd4DOinn6UAvJweTwfhXqDQQfuYddDpDI XHAg3TE5hRjL8uoBD4fiAtQgx9A9FPradMY/GwHHQSn3DPZQKWZFsxplkVyret2XGLZf nFb0vMNdgaGFi8+AGLqOvBs42qzPCzH8y2r8JK3T9DN4F1BAaS/55WkHkQlfSfVEpUJt 760VjCoRiiNGqYofRy3qLp7SOKqFePIIC/PJ9Cpk1z4qEfBqxXMxqm2PWWs6IO+1JdMS aD/A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:in-reply-to :references:to:from:cc:subject:message-id:date:dkim-signature; bh=27wXg6dwc+5854hJJ7bH4691BWl+F8uFGfIDx+CK7Gw=; fh=TmPuw202zTpdK8Ds0bDDha09uX8Ku6Ou3etx2160kKo=; b=ixAUpmK7JTlXiWFAMbNzazL+8ML1iy3PzNofnrcbSannxEzHqwME7NgMPbApplFssv sxRoR7ibX1Uq23SE6cHSbYrFc/5j3yzPCJkrh+gwWtaG9jNwBnSLR410UD9Uiqpb3Ubo G7gOgXNMc7xrA5IUYpIsn6NB5s3Vl5WWPsKkmny+xb/hEZyXxeGy0C3uUnSEOn8eSEfY kktmoJHFBhmCjp6ln7MY3Xy3v2rHyam049TBE9rpwtcRRb/TauNKVeUTAAfw0vEoPOO2 pUdKh02AINP6zcwrY495MrBUxskLfZscl/8oNSgmnqhVYPgdQ1ATmmY2nMcB8CAByt+J oMHQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TWJQupRI; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-101583-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101583-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ij24-20020a056402159800b0056833760684si4719848edb.272.2024.03.13.07.04.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 07:04:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-101583-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TWJQupRI; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-101583-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101583-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 8263D1F24F52 for ; Wed, 13 Mar 2024 14:04:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 53F184597F; Wed, 13 Mar 2024 14:04:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TWJQupRI" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 7E58641C7F for ; Wed, 13 Mar 2024 14:04:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710338645; cv=none; b=RkBucvSs2E5RaC0XyyXnG1VdRZnCJ99h1FQKBY18GyPE13loLRbhtGCixds6/3Te63IJaey+67gx1GxTH3yK1ZDylFS5/hCAifEQOzoVXYJMk6rs1m4+8Khd2QSb6igSUAJZXGdQ3+gjDjMbG1yKOUvuuRy46XUxLSmzjK3w8JM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710338645; c=relaxed/simple; bh=c6F26WYWOWPHGngG2bLzrx8m4VbcPQ7QBfWC8CH32Uc=; h=Content-Type:Date:Message-Id:Subject:Cc:From:To:References: In-Reply-To; b=Y3jHho7JPCrVY4fepS0bqA1+xb2d4i3kAhqIrJkxI/cPYk3+Zya/FWWyV14K/ANiVFvIsrlt2GZ1sVBY5cd4PsKIxVWO2rAuNjrB594IPEYKAFifrm0IlOI/zKWah4orYyWOHJaiPBmUN3DEvmFp+Xh6WTOFtJ+U6Po6kN2leug= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TWJQupRI; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B5FD8C433C7; Wed, 13 Mar 2024 14:04:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710338645; bh=c6F26WYWOWPHGngG2bLzrx8m4VbcPQ7QBfWC8CH32Uc=; h=Date:Subject:Cc:From:To:References:In-Reply-To:From; b=TWJQupRIoMDLYy8Z56ID/kiUfI6+tt/S/oJpr7erwMaWPJ+GlbRvRDuV7jZ+vNmW8 L84D1juJ/mh9/OBoyiDYlxWn9t7oAQdGo/jRyJ/oRm1l1zEXBxecSCpPYkg9MAJ+pU 64NHCHsaoggzD/OW+aAClUurZ7GUlNxJVHQ1pn3aSbQVAz3YYVf38VFf6tYwMpBubo NNGz+uzf7S+1MnHqZ0RVmVducRmBkaHBxNG6P3kZ1Pbq6MMEsoqieSyPGFkvX9lAHl /5Hli3BRxYj1+dtAo2U5BZ9jTfqNZQ7IV+ojXqvGlwvkJG3fsChRR95RPReU9TN6kb p8/TfJKxXmutQ== Content-Type: multipart/signed; boundary=fd774a84601503390b4d60fed6349c6cc9ccc01530323bbd271b951b5256; micalg=pgp-sha256; protocol="application/pgp-signature" Date: Wed, 13 Mar 2024 15:03:52 +0100 Message-Id: Subject: Re: [PATCH 2/2] mtd: core: Don't fail mtd_device_parse_register() if OTP is unsupported Cc: "Miquel Raynal" , "Richard Weinberger" , "Vignesh Raghavendra" , , , "Mika Westerberg" From: "Michael Walle" To: "Aapo Vienamo" X-Mailer: aerc 0.16.0 References: <20240307130418.3131898-1-aapo.vienamo@linux.intel.com> <20240307130418.3131898-3-aapo.vienamo@linux.intel.com> In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: --fd774a84601503390b4d60fed6349c6cc9ccc01530323bbd271b951b5256 Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Hi, On Wed Mar 13, 2024 at 2:59 PM CET, Aapo Vienamo wrote: > On Wed, Mar 13, 2024 at 10:24:13AM +0100, Michael Walle wrote: > > On Mon Mar 11, 2024 at 5:20 PM CET, Aapo Vienamo wrote: > > > On Mon, Mar 11, 2024 at 03:38:17PM +0100, Michael Walle wrote: > > > > Also, you'll print an error message for EOPNOTSUPP, although that i= s > > > > not really an error. Is that intended?=20 > > > > > > Well, when we hit this, the functionality of the SPI memory itself is > > > degraded in the sense that the OTP functionality is not available. Wh= at > > > would you suggest? > >=20 > > But it's not really an error, I mean, we are ignoring that one on > > purpose now :) I'd just guard it with "if (ret !=3D -EOPNOTSUPP)". > > To clarify, are you suggesting a modification like this to the code at > the end of mtd_otp_nvmem_add()? > > err: > nvmem_unregister(...); > if (ret !=3D EOPNOTSUPP) > return dev_err_probe(...); > return 0; Yes, either this variant, then you don't need to fix the caller or return EOPNOTSUPP but just don't print the message. -michael --fd774a84601503390b4d60fed6349c6cc9ccc01530323bbd271b951b5256 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIgEABYIADAWIQQCnWSOYTtih6UXaxvNyh2jtWxG+wUCZfGySBIcbXdhbGxlQGtl cm5lbC5vcmcACgkQzcodo7VsRvuZrgEArJM6xLpOYhTGbcQdQa1SJArVlp1t5IKr KPBIGGXA9cUA/iy1eF1dAKCAhY7cOF1DcpEEl6KNC17kS+2BT82oVJ4E =KvfU -----END PGP SIGNATURE----- --fd774a84601503390b4d60fed6349c6cc9ccc01530323bbd271b951b5256--