Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3648702pxb; Mon, 24 Jan 2022 14:23:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJz7RS/jggKdTg53OVCumZnzy6wnndepdIFDY1z4HfZGGgIuF54FTSUaRhMJfZ03LnnlB7zQ X-Received: by 2002:a62:1884:0:b0:4c1:3c05:3170 with SMTP id 126-20020a621884000000b004c13c053170mr15944029pfy.78.1643063011343; Mon, 24 Jan 2022 14:23:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643063011; cv=none; d=google.com; s=arc-20160816; b=ZC9q+uv6r4YSeVAA1NFySQxPXLi9qN3EhE0Fqzi7/LkPlQZjXiiXOddloEQ2mdj8BB cxq7XcfkuoH0gpZgLuwp3cjx56HJXxDJ9ZkIdsFwzviDHUvS6BvD5rn6j55BRDYgZMak 1IjlQ8ya5vOl2UTd5t4BS3MRUvC3PW+Bx5fznYH5sniuA+AaQsc00HC0AEAdsb0Enimx 8sp5XpBv62hV/Q4c/Lf2g73/WiGur0TD3CJgHaF6mMfWzqW5LOVhXuzBNZMCzcDQQ8jb eErAe8tWk5xbiSwDAFYsSeXon+egVzQKvAfLFy2z6OdcJ/f4+LgmeHNAuN00Trv018HC V2lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ejZxxfL8PYNBKW0TLL9McX9RYeC8QCIonSHBPxks1XM=; b=q3DoiIBgkuL2MupimhejDXAR3jIfMsKhv57aMaznKBIaXFkJalYf1tous8In+/8CrI yXdgMWRokepsN7FeUzl5iwFncnEEWc91Nnwr0Wt90aU8MPooFqUS04XyQKYs2HbPTxuq yyOXbeJchbUehwAuPwkCLIWUV3CfmY3ud72oIsltuktpYWMtNyxQex/ddmc+lOABfKiS yliAZuVyD4pYgaVy4jSFOzOgvk5yie7J8Uor7sp/SHXfbb7CwEdUDTpbB+jfG6snIl4C We0AaLaT/XJx4CmJh5ihv34UrIm5soYfHv2Lnc2DufpOJiaTYw6in7+lCik2ryopmqYB nxBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Wi5gInQV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t11si10685989pgi.545.2022.01.24.14.23.19; Mon, 24 Jan 2022 14:23:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Wi5gInQV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1582020AbiAXWNZ (ORCPT + 99 others); Mon, 24 Jan 2022 17:13:25 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:51250 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1453615AbiAXVad (ORCPT ); Mon, 24 Jan 2022 16:30:33 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1337361028; Mon, 24 Jan 2022 21:30:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DDE51C340E4; Mon, 24 Jan 2022 21:30:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643059830; bh=Zy5v5fLQBLXnARGxYzyL5FpJcmsXb0/iPQFT4iszAW4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Wi5gInQVql5hu8dVh8s4mWxKPbz26p+IkeKKnU4Tcx/onmCfaEymZjWzhCb+6rRbt WSzz74wtWmV5/RmVHXDkMTFmzHVshVG7obztzKR3Xv/rZxiQC0x6N5s3GEjga3STEv 9LTmCQa8pLmstfENj2XWOqBHEhSa2A6KWXQGbJhE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Gilles BULOZ , Srinivas Kandagatla , Sasha Levin Subject: [PATCH 5.16 0748/1039] nvmem: core: set size for sysfs bin file Date: Mon, 24 Jan 2022 19:42:17 +0100 Message-Id: <20220124184150.476108873@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Srinivas Kandagatla [ Upstream commit 86192251033308bb42f1e9813c962989d8ed07ec ] For some reason we never set the size for nvmem sysfs binary file. Set this. Reported-by: Gilles BULOZ Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20211130133909.6154-1-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/nvmem/core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index e765d3d0542e5..23a38dcf0fc4d 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -312,6 +312,8 @@ static umode_t nvmem_bin_attr_is_visible(struct kobject *kobj, struct device *dev = kobj_to_dev(kobj); struct nvmem_device *nvmem = to_nvmem_device(dev); + attr->size = nvmem->size; + return nvmem_bin_attr_get_umode(nvmem); } -- 2.34.1