Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751742AbdFTQ1t (ORCPT ); Tue, 20 Jun 2017 12:27:49 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:33184 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751135AbdFTQ1s (ORCPT ); Tue, 20 Jun 2017 12:27:48 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 20 Jun 2017 09:27:45 -0700 From: Vikram Mulukutla To: Greg KH Cc: "Luis R. Rodriguez" , wagi@monom.org, dwmw2@infradead.org, rafal@milecki.pl, arend.vanspriel@broadcom.com, rjw@rjwysocki.net, yi1.li@linux.intel.com, atull@opensource.altera.com, moritz.fischer@ettus.com, pmladek@suse.com, johannes.berg@intel.com, emmanuel.grumbach@intel.com, luciano.coelho@intel.com, kvalo@codeaurora.org, luto@kernel.org, torvalds@linux-foundation.org, keescook@chromium.org, takahiro.akashi@linaro.org, dhowells@redhat.com, pjones@redhat.com, hdegoede@redhat.com, alan@linux.intel.com, tytso@mit.edu, linux-kernel@vger.kernel.org, linux-kernel-owner@vger.kernel.org Subject: Re: [PATCH v9 1/5] firmware: add extensible driver data params In-Reply-To: <20170617193815.GI2974@kroah.com> References: <20170605213314.GR8951@wotan.suse.de> <20170605213937.26215-1-mcgrof@kernel.org> <20170605213937.26215-2-mcgrof@kernel.org> <20170613090548.GA31421@kroah.com> <20170613194011.GI27288@wotan.suse.de> <20170617193815.GI2974@kroah.com> Message-ID: <20ac6fa65c8ff4ef83386aa1e8d5ca91@codeaurora.org> User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2797 Lines: 76 Hi Greg, Luis, On 2017-06-17 12:38, Greg KH wrote: > On Tue, Jun 13, 2017 at 09:40:11PM +0200, Luis R. Rodriguez wrote: >> On Tue, Jun 13, 2017 at 11:05:48AM +0200, Greg KH wrote: >> > On Mon, Jun 05, 2017 at 02:39:33PM -0700, Luis R. Rodriguez wrote: >> > > As the firmware API evolves we keep extending functions with more arguments. >> > > Stop this nonsense by proving an extensible data structure which can be used >> > > to represent both user parameters and private internal parameters. >> > >> > Let's take a simple C function interface and make it a more complex >> > data-driven interface that is impossible to understand and obviously >> > understand how it is to be used and works! >> >> The firmware codebase was already complex! > > Heh, I'm not arguing with you there :) > >> What you have to ask yourself really is if this makes it *less >> complex* and >> helps *clean things up* in a much better way than it was before. Also >> does it >> allow us to *pave the way for new functionality easily*, without >> creating >> further mess? > > I agree, that's what I'm saying here. I just do not see that happening > with your patch set at all. It's adding more code, a more complex way > to interact with the subsystem, and not making driver writer lives any > easier at all that I can see. > > Again, the code is now bigger, does more, with not even any real > benefit > for existing users. > >> If not, what concrete alternatives do you suggest? > > It's working, so leave it alone? :) > So I wanted to note here that I had a similar internal discussion with Stephen Boyd when he first upstreamed the request_firmware_into_buf API. I actually did change things a bit to pass around a 'desc' structure with all the flags and parameters in our internal vendor tree [1]. This is a sort of an ultra-lite version of what Luis is trying to do - extensibility - but does not change the API for driver owners. Existing APIs become wrappers around the new API. My primary reason then was the number of things being passed around between layers of functions inside firmware_class seemed a bit untenable. Just like Greg, Stephen also brought up the argument about why the unnecessary complication to the API without any measurable benefit - this seemed a fair argument to me at that time. But here's my point - if Luis agrees that _this_ patchset is going slightly Mjolnir, perhaps a light internal rework inside firmware_class might be more suitable towards the extensibility goal while keeping driver API usage as simple as it is today (even if you hate my patch for various reasons)? Thanks, Vikram [1] - https://source.codeaurora.org/quic/la/kernel/msm-3.18/commit/drivers/base/firmware_class.c?h=msm-3.18&id=7aa7efd3c150840369739893a84bd1d9f9774319