Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4853759ybb; Tue, 24 Mar 2020 06:34:25 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsoHHFQSDLpZ+7slXwqg27D5eXqj7JCw4ZBytVvm/80Yi8GwPU39vT2uEHyIKtHIFzILpOT X-Received: by 2002:a9d:4b98:: with SMTP id k24mr21057475otf.26.1585056865159; Tue, 24 Mar 2020 06:34:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585056865; cv=none; d=google.com; s=arc-20160816; b=ZL+sgmUQDfV8KGMLcStTTboxkgAYYZcVigg4023zqPN3C/DD2RJ5aBAWXDIb0Nw4dS wMOrUe19JXDpsFzsVTyy1yRx1a3du8kuO5K5mTbZFxM4AB/c/eqx2dvO4gySjx2PCaqR bc6Q1/MRGdnD8dB0CI+KC3em39kSElDCWmoYfQOYzVV1apxPgW1ANf+Yu1ltArSQrHeo r12BpvwGHBhz/vcW8vSm4L7vKf78swgo7iygMVIxz3neUdf46X9L7XVQTUXO0bxabUNB +T3AgXwYJHRnCAya50fKfY/Lh6sGykS2I7A0tYgLsxymgOxEsk7WHlyOIsOxO/OsUsWa A9Mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Bpi9wcbOYickD97A/VfSV3SD+iImWlhq8p2g3+3mc70=; b=Ysu6xWlebjnitqP55VkEK18mEeFcDsWHEokxWaXXh8b2rg7XYPmDFElOnmLYOoRffP qoCn9G9PcTTFiBzucFFe+31YRyHgSCWjJJfsdGTZ//tdFXsXlRxVWycaPfCxmiiXQCY2 vihIHXtcj/MSIcbhM3X98uysiDaDPzoc2AaVoJJAltdq4zlXHih+jr4qY8jUjmaFt+TY rPkYrp5X0scUYWm0XdDEbv3Lfh7f1uO8Jfo2SPq5jZ99llBg7KmdUMGigXWrEORhhTgY L+AqWcKxy+I22GchBk7/C2XVH88tPrB5OrsnQ7ohrpGjH2oObGh2QoPmyTHY+IU9x/BY qQSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vEAReR4w; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x26si8895312otq.220.2020.03.24.06.34.11; Tue, 24 Mar 2020 06:34:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vEAReR4w; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728456AbgCXNdz (ORCPT + 99 others); Tue, 24 Mar 2020 09:33:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:60910 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728249AbgCXNdz (ORCPT ); Tue, 24 Mar 2020 09:33:55 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0A81620775; Tue, 24 Mar 2020 13:33:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585056834; bh=/+bX9sUSuviQfDod9nEL4+0Dlkf7WVqWQHv9g42s2A8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vEAReR4wr7IhLnUm9SUF5+gLVTzns5yVBIbD5yCs/7qrSJIdH/sPUNdmlmlyxq+OF D+1Dz09M06satQQP6ybfku16IoKhCovu34kbyaKtz+NQDGOaoaHZFVfQDX7AO9AL6f oBeJtfMvTV4M0erPhKz0a+snRUgUfAKr9sXexijw= Date: Tue, 24 Mar 2020 14:33:52 +0100 From: Greg KH To: Srinivas Kandagatla Cc: Nicholas Johnson , linux-kernel@vger.kernel.org Subject: Re: [PATCH 5/5] nvmem: Add support for write-only instances Message-ID: <20200324133352.GA2503959@kroah.com> References: <20200323150007.7487-1-srinivas.kandagatla@linaro.org> <20200323150007.7487-6-srinivas.kandagatla@linaro.org> <20200323190505.GB632476@kroah.com> <4820047d-9a99-749c-491d-dbb91a2f5447@linaro.org> <20200324122939.GA2348009@kroah.com> <300e8095-3af4-15a2-069f-87ac7cbb83bb@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <300e8095-3af4-15a2-069f-87ac7cbb83bb@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 24, 2020 at 01:25:46PM +0000, Srinivas Kandagatla wrote: > > > On 24/03/2020 12:29, Greg KH wrote: > > > But the Idea here is : > > > We ended up with providing different options like read-only,root-only to > > > nvmem providers combined with read/write callbacks. > > > With that, there are some cases which are totally invalid, existing code > > > does very minimal check to ensure that before populating with correct > > > attributes to sysfs file. One of such case is with thunderbolt provider > > > which supports only write callback. > > > > > > With this new checks in place these flags and callbacks are correctly > > > validated, would result in correct file attributes. > > Why this crazy set of different groups? You can set the mode of a sysfs > > file in the callback for when the file is about to be created, that's so > > much simpler and is what it is for. This feels really hacky and almost > > impossible to follow:( > Thanks for the inputs, That definitely sounds much simpler to deal with. > > Am guessing you are referring to is_bin_visible callback? Yes.