Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2705049imm; Mon, 10 Sep 2018 05:23:54 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZKnfe5Vefkv+kKxkNYd167zv2JnfEHS7QJuDhXUe1zkGa2nWZO3rMWyMa9x/WuqafrE12t X-Received: by 2002:a63:f26:: with SMTP id e38-v6mr21900732pgl.354.1536582234655; Mon, 10 Sep 2018 05:23:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536582234; cv=none; d=google.com; s=arc-20160816; b=qRka7XsZLHgkYlGGUT5DJBP83xNh00orr5XI+EKQJZOljbLvzWmwIV5TJLCekZgb8K 1SHia885gjVP1T6itjnDnbB/VenvFspWtPpRnkZrYhHtlrH+sDN1CkuJN1Uvfa+VKrb9 Gsh6NbgAmXfEAzMH7WmumhMxNBTAYOGHFESBvH4+NyNX7+K4P4iQUmmZfKPgXRdluIzl 8H55qDdAnV+8M9pmMLflVpmKSOpHSJ5TxHtgnEyPwKFEXdQJ2YFVU0sZDNE/mUWJ1uVQ 1GgA+/OdofkBbHfgGyNo+k3fvVMkw3wLDdOWFB8eDRxAKP4P+UFlGLlHZDzenJu0do29 SESg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature; bh=Mf6DqvmUfKAc7mU/7xtqv8OovyajSHs0clSkHHl6pTM=; b=WLQh8UDUtLw5BO3UOlN9c4091yRJmDi3PxyjWtZW7hWBKVJJRhZPAYMcPzErKfsXCS EWdweav9Q8WUl5vSRP23k2WncEu9mjIPUJIgHfFbN5ZY/sEQV5UehhEvzxTMhmj2IHZV rVJl9BjCMgVgZCZ0Pwi/LYMZGtLP7uXvFoj9i7xmb6XS0RK2q14JPjf1PEz/h3GGK3cp 8DX0kGC8YB6P0ngJIbUEVnTHXoqR2qhLMuJfliAARmrcLzSs2k8N9Vddx2UBvb8WYnVY kGPmQFbH93bRd6r7//TTdcMrozP95ze55u4cYb1e4+CtMG0GtI/xGT0FFWZJbegl6/pG bRMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b="iV3/kKIJ"; 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 g205-v6si17478480pfb.294.2018.09.10.05.23.39; Mon, 10 Sep 2018 05:23:54 -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=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b="iV3/kKIJ"; 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 S1728560AbeIJRQP (ORCPT + 99 others); Mon, 10 Sep 2018 13:16:15 -0400 Received: from mail-it0-f65.google.com ([209.85.214.65]:55945 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727727AbeIJRQP (ORCPT ); Mon, 10 Sep 2018 13:16:15 -0400 Received: by mail-it0-f65.google.com with SMTP id d10-v6so29170496itj.5 for ; Mon, 10 Sep 2018 05:22:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Mf6DqvmUfKAc7mU/7xtqv8OovyajSHs0clSkHHl6pTM=; b=iV3/kKIJN4sRjldn2UpDuW3FJIPmxiIDlfwth8Wr2046YLSK406oLGp525VlmY5kSh UpJ/DbnJ4l2WHox2Ioj6R44z5tkXvs2L5XvbShglw7n8s+vmQMMCn1a05pV+ZhjeQyg3 WuRtMA+64/wIkXCseCf6M1frzFvoyeVTLHExm9jEfxSAuT7oQKtPEiygLKnCk13wzmZ8 ftnQQZwQpj6jbO6iCYfGtoCiI41qFXD3umsrVWovz/pjq6o/4vHSX47VePtgD+umg1Ij knwNerqE+4+uBhJDOQ1RYfTLZ3IvGKmshUlKZFTaAApYwPfwFs1PoegFVsFEoKmEsjRi QMxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Mf6DqvmUfKAc7mU/7xtqv8OovyajSHs0clSkHHl6pTM=; b=lieft/e3zpHGzza6SJuIOg7ZOuGtySeABOxLvxmq6Q8LefksFIEdl1Dqx7MrkQSmAc cuM3TXec8GBOm46ntECYX/3DOWpQRm4zFcDgVZIi1gnXPT80bZzuqJ4kTXYsSnNTjvQe IVWLxIUa0L7k0S12eQDbXStA3u0dhMTI0n3/J7Zgq0bMSNWBWSQ6OP9fhZw7GWUSq6fH H36HZdCGz6iRBWNd1mS5fSyDtF2J8iqlSMf9dQkKS13adb4G3YHAYXaofeouVLuJL7p3 atTFOXoiGgbMRcbZDkpIM8bhywr6LZUJ+zF/iPhHQJrdnOhcLIsm/+4Zvy7Ns2mLNtb+ qvoQ== X-Gm-Message-State: APzg51AADa2JTkGg/yoK37b5VYfH8ViJpeutMvBJ42lY5Gc1HzPZb6js VIfoYFhZr15a2RkNYXgY3/OnFo1Csh9LpNAQUClF6g== X-Received: by 2002:a24:a20f:: with SMTP id j15-v6mr17675440itf.125.1536582145499; Mon, 10 Sep 2018 05:22:25 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:1905:0:0:0:0:0 with HTTP; Mon, 10 Sep 2018 05:22:24 -0700 (PDT) In-Reply-To: <20180910141820.6c715895@bbrezillon> References: <20180907100750.14564-1-brgl@bgdev.pl> <20180907100750.14564-2-brgl@bgdev.pl> <7e138142-8161-3646-4daf-619995baf395@linaro.org> <3dbd65e5-c948-a784-0362-930fc41b840e@linaro.org> <20180910141820.6c715895@bbrezillon> From: Bartosz Golaszewski Date: Mon, 10 Sep 2018 14:22:24 +0200 Message-ID: Subject: Re: [PATCH v2 01/16] nvmem: remove unused APIs To: Boris Brezillon Cc: Srinivas Kandagatla , "David S . Miller" , Mauro Carvalho Chehab , Greg Kroah-Hartman , Andrew Morton , Arnd Bergmann , Jonathan Corbet , Sekhar Nori , Kevin Hilman , David Lechner , Andrew Lunn , Alban Bedel , Maxime Ripard , Chen-Yu Tsai , linux-doc , Linux Kernel Mailing List , Linux ARM , Bartosz Golaszewski Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-09-10 14:18 GMT+02:00 Boris Brezillon : > Hi Srinivas, > > On Mon, 10 Sep 2018 12:47:19 +0100 > Srinivas Kandagatla wrote: > >> On 10/09/18 12:31, Bartosz Golaszewski wrote: >> > About that: there are no users of nvmem_device_cell_read/write() >> > currently and with the new API I'm not sure this is still needed. Are >> > you alright with removing those two? >> >> Why do you want to remove them? Other than reason of no users. > > I'm just sharing my (and probably other maintainers/developers) PoV > here, so please don't take this as an attempt to force you to change > your mind, but rather an attempt at explaining why APIs usually stay > private when they have no users. > > Kernel maintainers tend to reject APIs that have no users because > adding something that nobody needs yet is hard to get right. I mean, > you can design an API on what you think will be needed/appropriate, and > then, when people actually start needing this feature, they realize it > does not quite match what they need, and they have to adjust/rework > this API. > >> >> All it boils down to if we support device based apis using cell info or >> not? > > But it looks like nobody is actually using it, and the first potential > user (Bart) proposed a different approach with the nvmem cell table > declaration. > >> IMO, I see no harm in leaving these apis as it is, unless there is a >> strong reason to do so. > > It's harmless, but it's also unused. If people start using it and you > realize the API is not working for some use cases, then you'll have to > patch all existing users. > > All this being said, it's your call to make, and if you think it makes > sense to keep these functions around for any reason, then be it. > Also: the general notion in most subsystems is that drivers should be generalized enough to not have to care about the provider's internals, which is the case if we allow users to specify cell info. They should just query the subsystem for a given resource, use it, then put it. Fortunately this is what all current users do in this case - we don't even have any users of nvmem_device_get() which is good since it should be reserved for very special cases. While one can argue that nvmem_device_cell_read/write() may be needed in some strange corner case now, once we add the cell lookup API, we can safely remove it and force users to do the right thing. Best regards, Bartosz Golaszewski