Received: by 2002:a05:7412:2a8a:b0:fc:a2b0:25d7 with SMTP id u10csp191312rdh; Wed, 7 Feb 2024 01:38:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IG+nXZg7jLYYxb91Ox6wJDN5OtUmGFNEI1MQBfk2eLr9kBt7VYMFnQ0MYlx92eW/Y8K6EEf X-Received: by 2002:a2e:3819:0:b0:2d0:cb3d:29e4 with SMTP id f25-20020a2e3819000000b002d0cb3d29e4mr675163lja.41.1707298738910; Wed, 07 Feb 2024 01:38:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707298738; cv=pass; d=google.com; s=arc-20160816; b=SfouCe9SgWJqlS0Khh5xQbZPNdg+tw+TSqrDqQaTJLRxwnWnDxZuHhnwdKLt91xYGA sMpk2QoywQP/nUKnYCGyZKurfpBUtszCwAdZom/GutlSYXS4yLGQu0HKV4uGzPpN541r eoyA+j2CVDSZJZ1bbF+J+TPVBbwir6TLyYWY5sSwB8AwUPqUyS88oDMZ+YZ93KH7lSnO 2hdZb420A5Y8K8nIpLc3WrLrewBfoasFNsiqYsVjZuW0CpgvQJa7FifEZqxA9TFn1Go+ ZiVQXlVR0SBDWWhUXdvtWzpxFR6wzbTcH2yHTz7P7/qszYDYKy3Vdt7cx4uqOE6JbyJv tosQ== 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=e2S7nDBweVQ71thm0zjsu1HxkmP3g9zBVVmT/5pWluU=; fh=df+yE1H7I9j0h1m/ZaZPU29ES+CLUKHZy69o4qhViik=; b=TGB7xm1FSiLscQdXxOaIpMy+vF4fIh62HpqndFn5Vqy3WFquPzD4pvf1xMtoe1dAVn 5s1OkDvUerXrIVWijzuACOcdHB+IGM6Nd/nKg/UAMHc7Hl4wGI1jvZz8Wlk+rydMrbtQ ThK5mrSJ0Jr1J22rB0oQZMKBZHGK40a8bbVEFz8LHRKRB9jWF6MrfwZd7dmKrPtHZ+dg jM9ipu8NjnvQrH7ydBzY8bS4GHJZfIlUE1+qka3Dqnf3Yp2iEiPbTx+X0cMTtmL3kvNr KH+AaISwqh+AULipsezW6w+siE9WNI18Dy79Ag8SnESwwqKCbRu8hSeI8FIG+KS9+zxA 6G7g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=q0tCTZHz; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-56227-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56227-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org X-Forwarded-Encrypted: i=2; AJvYcCW6Hz0zgpP7SVJfprXMJEwdLs3sMk9TOMQuHAZaAgGsBbf2IBLrT8S/oswgPdYmlTA6djhAriA+utwJhJEB66nZg3pQWJQgfF7zmINh1Q== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id g10-20020a17090613ca00b00a3816e1bcccsi659143ejc.780.2024.02.07.01.38.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 01:38:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-56227-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=@linuxfoundation.org header.s=korg header.b=q0tCTZHz; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-56227-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56227-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.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 A128F1F2A207 for ; Wed, 7 Feb 2024 09:38:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AB9D222EFD; Wed, 7 Feb 2024 09:34:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="q0tCTZHz" 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 9D9AA21A19; Wed, 7 Feb 2024 09:34:08 +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=1707298448; cv=none; b=t0nLnPPeN8ySq7vo4miutr/iaCFitPRzUcy+IFrVs2drRXdrkDQnJ5pUpfqJo2n+vQ0eNt+LcqYUU/tCDVb/XpNCL74VBPsP7w9WIDYrZFk56RxcEthCARACF68sTOYi9mPdZ0NdPffpjwKVnMV2WrHe5AaG+hxjQ7m964ElAQ0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707298448; c=relaxed/simple; bh=9R+OqVqHBHqXShJWLZL21KpJxHNGYryJFB0/wiYofsQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Mpc7nvWd8gxkRVMZMnKfzpz3ro5ADC8LHcUuxrKuhx15H+miSn8ciqR0memSUPupnD84w+2mPNHQ9TUJoA9qmVpPrIFXWlrM1T2SvsC+GeDdPV9T+v4jquroYP/FYCekmYEYtcFn+7fzTVUUhHBBex4h9kvAPIVfjXVQWN5X3HI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=q0tCTZHz; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 426F5C4166B; Wed, 7 Feb 2024 09:34:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1707298447; bh=9R+OqVqHBHqXShJWLZL21KpJxHNGYryJFB0/wiYofsQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=q0tCTZHzfz4ufqkHQuwMlNf6iCoTUGviJZAWNr6pCgQC721qmFl8AHu5w0SiUlwYJ /0/LkZWcqYDVffT+HArmOxVz5S9KqFTAd/S9Q84jwsj1/OfDRFVetlBd32odP0F800 5Cp0BzeUAIswopiMKi4qo7acj20qKrzg7i7kB8FQ= Date: Wed, 7 Feb 2024 09:34:02 +0000 From: Greg Kroah-Hartman To: Joy Chakraborty Cc: Srinivas Kandagatla , Rob Herring , Nicolas Saenz Julienne , linux-kernel@vger.kernel.org, manugautam@google.com, stable@vger.kernel.org Subject: Re: [PATCH v2] nvmem: rmem: Fix return value of rmem_read() Message-ID: <2024020734-curliness-licking-44c1@gregkh> References: <20240206042408.224138-1-joychakr@google.com> <2024020647-submarine-lucid-ea7b@gregkh> <2024020637-handpick-pamphlet-bacb@gregkh> 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 Tue, Feb 06, 2024 at 05:22:15PM +0530, Joy Chakraborty wrote: > > > Userspace will see a false error with nvmem cell reads from > > > nvmem_cell_attr_read() in current code, which should be fixed on > > > returning 0 for success. > > > > So maybe fix this all up to allow the read to return the actual amount > > read? That feels more "correct" to me. > > > > If I change the behavior of the nvmem_reg_read_t callback to negative > for error and number of bytes actually read for success then, other > than the core driver I would also have to change all the > nvmem-provider drivers. > Is it okay to do so ? Sure, why not? That seems like the correct fix to me, right? thanks, greg k-h