Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1822176lql; Wed, 13 Mar 2024 09:03:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUj5qSuSXYdv/KmGPfnxDWn1mfv9w4cz5XpZL8f9FFqWH7HAoOfjq4UlJECtbqAjKr19p4g76DrrSpXW9U0KxM/oupb5y3oGj1FZ4UKPg== X-Google-Smtp-Source: AGHT+IG/RII2pY8/8BMbx6O27MDoaBpVIsXnJUpEcjglE8X+lQRCYSjjH6saHuVsVEz8H5SFLf+i X-Received: by 2002:a05:6a20:d496:b0:1a0:e157:9c9d with SMTP id im22-20020a056a20d49600b001a0e1579c9dmr12180710pzb.51.1710345837234; Wed, 13 Mar 2024 09:03:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710345837; cv=pass; d=google.com; s=arc-20160816; b=wYKfVklvZ1yd9qZZ+0RO7Mr9uWchKZAP8DOm9xVlkzbnUguMqEzFz7wPVq2GxJGegy jOfpdVLaiN8vki1gKAf/b5wzHltIrEMeaCuu2evpT0+oNPvzk0IyYNscqg3cYWWqGny4 623HfpcR4GZfw8hPF+9KFiKx/8bddOh58+Sy4xvEDqzE2sGUiS5FO3r9AZcH8ZbRVTOO xc2CPSePrx3SX1jMEUAJnfOjHIrvrsyeiCKz42wKFd+cB76f239Cx/OH5xi6sv5q0eLE BraW2mFNDp3JBymZhNkDNZuVb51radTADZdBJFlzxKdu8shZD55sBbFfX12/y2pKrYWU O/BA== 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=9VB6ZN9yKwTqnmp7RmhClj68Jonk4nztD3/BnsaumpM=; fh=1p3RqGZK3ik92aze6+LF62ruURsUZ9xGgoJIvJj5ezY=; b=vaW9Fu/ovQR9lDnFmyZUPRsn+9RknQ9m52VVSGp/PbYww0c6hDkE83EufZ08A72jrO C+DqwgWM13m3m7epNlTso41C4Bw7SFu+6y+MZlgyUKa8LyaUK5yHxFI5Q2zClsj2i0wy oVTAfAo/+UqGmaZYK7C0kH9yP+S8B84UPj0OH1AhiPt8lvBvZIxbOJO5J3eAXhG8h8FC kMGqxzquXxFYbI4+OJ6LbpMzxkAInsHQld5RMAuJ1AGeW3918OlmF4Uv+O84XYN7qb4X wDlwsFUMgCgONJOLbGdMGdKuTZZuHu4hIAcFrvbtW1oA1GBwFnsh/8jsTWN8sEKLmGa3 M1RQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=UZhjkAgO; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-101574-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101574-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id f18-20020a63f112000000b005e428bea40esi9362320pgi.0.2024.03.13.09.03.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 09:03:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-101574-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=UZhjkAgO; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-101574-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101574-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 2BA92B2283E for ; Wed, 13 Mar 2024 13:59:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0FF054437F; Wed, 13 Mar 2024 13:59:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="UZhjkAgO" 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 C9EC043AD1 for ; Wed, 13 Mar 2024 13:59:13 +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=1710338355; cv=none; b=U456mV7gfgim7jv2fvz2pivUSZZ0hPMnkziIVmBJTY2mH1Mk+yUs08Vg2SYH5mcZoCYp2HnJvtpLySwewqecBmuL+Kgix0rbb2TtnfXLWzdRfdVGhGzp46AVg7Bhl7BgJv7yKFIuRQsl26NTg9nrD9kKMXacciMejdk4R994XK0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710338355; c=relaxed/simple; bh=ObhAjMMSUSjidRVrJtIshpIU3PRlAw7QTAnpjAyYG3w=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=I+qW95EfiZ1NO+31gQrVp9raS6SWNcbGEsOBHN7F07uLDSr6lnFRxKkqePiaqfXsS92NVDFDiocNxh9b6SQmCFyv2uJr6dgP/XsVak2TAunWRN6/p42LWdEWGHb2ZvgFDB9SXajCE47qPiW1Ru6qA/FokP/xQs0QSla1KxriduQ= 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=UZhjkAgO; 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=1710338354; x=1741874354; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=ObhAjMMSUSjidRVrJtIshpIU3PRlAw7QTAnpjAyYG3w=; b=UZhjkAgOwnO/RVllSfmwm0sVa2cfL3oVuy5odNT+0DnBXSFs+s26ljsz cy2Z/Z4zfYq50goa4KbIH4SsNeQ6j4AeaUE035xQPsdmKyVF5858bgA/Y wXyBEJpLOxUW9puiprNSVo2STu2Z2EDG78psWLI+nrUuvQGjQv/xcx/Sd 7LzyGoaNu5NPNAJ7GSqyf+CVf+yi7ZqNO3TDID3U8l/nfBM4D66d2cH9E pHnaUI7wQ47czsFVVAJx+TREEKkWa9mIR7WDUPjG35qmtQlDHaf/VJZQd KnPH+/BIbYjFZ477cPvEezO4rODh6KGlH1/oVM40CfhB/vaE7vw/mkMam A==; X-IronPort-AV: E=McAfee;i="6600,9927,11011"; a="16253102" X-IronPort-AV: E=Sophos;i="6.07,122,1708416000"; d="scan'208";a="16253102" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Mar 2024 06:59:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,122,1708416000"; d="scan'208";a="11854200" Received: from svigh-mobl2.ger.corp.intel.com (HELO localhost) ([10.252.52.216]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Mar 2024 06:59:10 -0700 Date: Wed, 13 Mar 2024 15:59:02 +0200 From: Aapo Vienamo To: Michael Walle Cc: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Mika Westerberg Subject: Re: [PATCH 2/2] mtd: core: Don't fail mtd_device_parse_register() if OTP is unsupported Message-ID: References: <20240307130418.3131898-1-aapo.vienamo@linux.intel.com> <20240307130418.3131898-3-aapo.vienamo@linux.intel.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=us-ascii Content-Disposition: inline In-Reply-To: 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 is > > > not really an error. Is that intended? > > > > Well, when we hit this, the functionality of the SPI memory itself is > > degraded in the sense that the OTP functionality is not available. What > > would you suggest? > > 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 != -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 != EOPNOTSUPP) return dev_err_probe(...); return 0; Best, Aapo