Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp609298ybl; Fri, 23 Aug 2019 05:55:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqwsW9Gh1XxWMA993n7s+cAU6+jX+tbqPoBxkbQPbGhNXYetwmUldSd2sEG+a64OY5//R7bM X-Received: by 2002:aa7:8007:: with SMTP id j7mr5098164pfi.154.1566564941141; Fri, 23 Aug 2019 05:55:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566564941; cv=none; d=google.com; s=arc-20160816; b=KiXeKSb+4Qz8W4Ljsg4GWuayjD/W61eCDpUCjPzuS7F2Y+3WFaPd4xN2umhkUIkine JCH4jJP//3KivRx3jq1rz2SDUjUmL2L4Uxc2Kopxgc44hKpzhSMJXbmX6JA2o8UYhu6P QuktFn8cyAI/HDfREM2e0TTexQrKnw/Dkj032FFJlE+Jty+D6yKE7Ci8IkMXq6cs1br2 bsizPApR9uqU98Dh8ZuWhvHPLsYjdLESHMb2alRXb+1QMD7rP7D0dSwmo2sZYSJIAxtu VmuSb7x1cnZ5bRZoyLaxdGi4ReBH1xvRtf6bcwEOnnb6EpZhwfyfi/Mvt16U60bGVbM9 QQrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=T7WELdrj1lpZKb10glO64Ci1A/cHC9qRquQl0ZBFVYE=; b=CBmvNZY81kiuh+/Ii+YttmiHX8dO/JI7MVGakHOBwv/T2R/K6ZzhhWAgMaQXnO7YbG rrAOURpeMF6j1b2A9WUetIs5+kCtKrEhX1ZljqYPNvjYyOFtzeqUadg9iyWPCp9+f0Qb erXBbEQt3dX/Kur0Ft8yHMTgGamRYd00vja7xEVxcE7L+L1Sc2LLQ1brSCNKW3PR4XHi 4WBe9v92+085fESaz2uADcLtvjh1o5oAEBcAEBuLBunV6sfrNB2PjJNMHTTc1g9Nfa/w MbuHrg52OIe3ie370odiuo0cqnUjNlZ9NXGh8tYN7cG8Q5RKpBRxZsvBNYN4S17lYIRH cqSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=C3g11sbi; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g13si2414339plq.359.2019.08.23.05.55.26; Fri, 23 Aug 2019 05:55:41 -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=@broadcom.com header.s=google header.b=C3g11sbi; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733001AbfHVUHq (ORCPT + 99 others); Thu, 22 Aug 2019 16:07:46 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:35364 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731461AbfHVUHq (ORCPT ); Thu, 22 Aug 2019 16:07:46 -0400 Received: by mail-pl1-f195.google.com with SMTP id gn20so4081220plb.2 for ; Thu, 22 Aug 2019 13:07:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=T7WELdrj1lpZKb10glO64Ci1A/cHC9qRquQl0ZBFVYE=; b=C3g11sbiJLWJXhTVKSRs7RsmwmyNDMWE2NR02ihZhTaX8aV3FEKZ5YdkwOxo6qCVWq m8jJkKYj85QU0HpYZJ1Drc4qi0TJV0r3IGjyGWOOP0/s3ieUNAmBO2MVB0IRxNYezn93 Ta1X+nvAuArVldordiVEZgCtlKT/kaqGj7nFc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=T7WELdrj1lpZKb10glO64Ci1A/cHC9qRquQl0ZBFVYE=; b=PDIZWCQXBHg5tBx94xIL6FL8yU8hbQzS97j9HV2ZXTU4rDd360+JSbDj1cZtxmdKhF P8e56BVm1oD5BV+eIXlQ8p5m4mgmUJx573eQXppmv5AHIOgY+uNbXD5lsHwz4yrV3vtV ZO5km3dMne11B6waGLfN1KEs2liS3uscicUDQLyowT93/8B7XX5k27WeVIWAeUIl/aqJ WmUq0v0P6riJ4amlzf7R50qQn7+6+jBH3QUyV4uHyF9kGPyK2Of4sYHI5rtQYzL4+fWb Y+puBM1cRD9JqIRrcnfb9IFhwn4RUnMSupI0D2/2z5ZAr//g6MTQsy3QLEMxNrXAnqX2 VYIA== X-Gm-Message-State: APjAAAUZTbrfQMBQGMCyDMNZk77fKs3ZOIj9PzsbT3uQ4I3/obKS9xib wYbnP8AtKkCEQV8lIW7Trl4+/w== X-Received: by 2002:a17:902:1027:: with SMTP id b36mr585958pla.203.1566504465286; Thu, 22 Aug 2019 13:07:45 -0700 (PDT) Received: from [10.136.13.65] ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id k5sm229441pfg.167.2019.08.22.13.07.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Aug 2019 13:07:44 -0700 (PDT) Subject: Re: [PATCH 2/7] firmware: add offset to request_firmware_into_buf To: Luis Chamberlain Cc: Greg Kroah-Hartman , David Brown , Alexander Viro , Shuah Khan , bjorn.andersson@linaro.org, Shuah Khan , Arnd Bergmann , "Rafael J . Wysocki" , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-fsdevel@vger.kernel.org, BCM Kernel Feedback , Olof Johansson , Andrew Morton , Dan Carpenter , Colin Ian King , Kees Cook , Takashi Iwai , linux-kselftest@vger.kernel.org References: <20190822192451.5983-1-scott.branden@broadcom.com> <20190822192451.5983-3-scott.branden@broadcom.com> <20190822194712.GG16384@42.do-not-panic.com> From: Scott Branden Message-ID: <7ee02971-e177-af05-28e0-90575ebe12e0@broadcom.com> Date: Thu, 22 Aug 2019 13:07:41 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190822194712.GG16384@42.do-not-panic.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Luis, On 2019-08-22 12:47 p.m., Luis Chamberlain wrote: > On Thu, Aug 22, 2019 at 12:24:46PM -0700, Scott Branden wrote: >> @@ -923,16 +936,22 @@ EXPORT_SYMBOL_GPL(firmware_request_cache); >> */ >> int >> request_firmware_into_buf(const struct firmware **firmware_p, const char *name, >> - struct device *device, void *buf, size_t size) >> + struct device *device, void *buf, size_t size, >> + size_t offset, unsigned int pread_flags) > This implies you having to change the other callers, and while currently > our list of drivers is small, Yes, the list is small, very small. There is a single driver making a call to the existing API. And, the existing API was never tested until I submitted a test case. And, the maintainer of that driver wanted to start utilizing my enhanced API instead of the current API. As such I think it is very reasonable to update the API right now. > following the history of the firmware API > and the long history of debate of *how* we should evolve its API, its > preferred we add yet another new caller for this functionality. So > please add a new caller, and use EXPORT_SYMBOL_GPL(). > > And while at it, pleaase use firmware_request_*() as the prefix, as we > have want to use that as the instilled prefix. We have yet to complete > the rename of the others older callers but its just a matter of time. > > So something like: firmware_request_into_buf_offset() I would prefer to rename the API at this time given there is only a single user. Otherwise I would need to duplicate quite a bit in the test code to support testing the single user of the old api and then enhanced API. Or, I can leave existing API in place and change the test case to just test the enhanced API to keep things simpler in the test code? > > And thanks for adding a test case! > > Luis Regards,  Scott