Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp629961ybl; Fri, 23 Aug 2019 06:11:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqwJfbgop+MlatW+G+rDToTB2PNnM3F/g/tP6qrjHmpRwQh18YuNR66Qv4rVmD8tpHOb+elg X-Received: by 2002:a17:902:a01:: with SMTP id 1mr3824011plo.278.1566565907692; Fri, 23 Aug 2019 06:11:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566565907; cv=none; d=google.com; s=arc-20160816; b=p68OYsO8uZdK7Hx47slrRo6A5Eh18Jj+E+1dsx8XSKDwY39tef7rKRW9xmbl2I60zA wOkcI8RmvFPq/tfalQfUIzuW4mNVzU5KK9POlzN2NkpnxU1SmAF+JQxfacaVklraXYDq GMAbQeYRiyT6V/VEh6vV9/7nMrBVrbGUkc0y1RgvaosT6yeasCPxtg9Is9PW8UCyUfZt 7/6rfRpNScID2kgRgU4YYEVv8Hyjm4DmsDEvRCVwfgDf6jR+D0ZS2fhT5SobTW8oqveD MjDg0JljKyci1blJ7kp9edfjiOXeFFBm/2xxH0n7ZFa/5KQiApgUlUjif3aS6TjUbly/ iWAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=H7farA7jorlmfZ2e+AMW8oiTvvYc+aUzfxfRcuDpHnk=; b=fCx3paPMuHvkGcby6+26iYV1F5I2djY/HIGoIK3hPI5/X6cup2qYSiRJlPA2kQGg9B 4qasEbbyiAT7B7IAcX2pp2Wp/ll7e7IlTv5evGUm6ni1tuYYWNSosFDpakJOGh7IuQ3H mDuklQpYIz/OpOaYBjKpLRj9P4c63UR/Sxcva0T1LpfJTNTJosBcVar48SxDGaGzu33m EIwowTs/dBo/EYC4hQhIb+wnl23h5JgkP09SU3rkHedreYojsmVCaoIIZJkNMxbOHfv2 u9Gdf2e+VO+ZX/ctJcjHwuQMvEWinZFUICQQ0HDw0L6yisCuyfgwVG/GzQe9vGyzJtMj Vkmw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k72si1954614pge.95.2019.08.23.06.11.29; Fri, 23 Aug 2019 06:11:47 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387979AbfHVTrQ (ORCPT + 99 others); Thu, 22 Aug 2019 15:47:16 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:41013 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725886AbfHVTrP (ORCPT ); Thu, 22 Aug 2019 15:47:15 -0400 Received: by mail-pl1-f193.google.com with SMTP id m9so4037368pls.8; Thu, 22 Aug 2019 12:47:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=H7farA7jorlmfZ2e+AMW8oiTvvYc+aUzfxfRcuDpHnk=; b=XO4/rwGLYk9SBYN8k7GRXHDJphUJmcRBvDWG44PY0QNg4zarCGqP8SQnHDyXKGZ3+M doJ1GLX4b3OrVB/XVGKbBKAjw5QZN7Y/sf9EyO12Dx/Md0Zem8PiQ510+QghLiapF353 NEjs8KjS6x7LFgqS9j37zXpDdEdbVWk4xzJgyl4plClMJ9JwBsXatMrkIHtzzdkKvWep DszRlTYo3xdTOOSkx1w5rJA8hd1o6ANEg3m9L9lQf+LkH7ELC2ZWziLlC14NPXxkFRw+ Q+rgwbzLCdzpTWNDnNdn/gF8027ea0R43zKbSC7gTabiPEJAqpRoIrAM/XF8LDxM3ns5 bYOA== X-Gm-Message-State: APjAAAXsYlBkxja3KFMZjogKk3Gd6UmmI8qGhGRRxVHu0V4uY91luxQ1 AIyevmmzEYb07svMXGkpUYI= X-Received: by 2002:a17:902:5a04:: with SMTP id q4mr543629pli.280.1566503234605; Thu, 22 Aug 2019 12:47:14 -0700 (PDT) Received: from 42.do-not-panic.com (42.do-not-panic.com. [157.230.128.187]) by smtp.gmail.com with ESMTPSA id s4sm324360pjp.15.2019.08.22.12.47.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Aug 2019 12:47:13 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id 92076403DC; Thu, 22 Aug 2019 19:47:12 +0000 (UTC) Date: Thu, 22 Aug 2019 19:47:12 +0000 From: Luis Chamberlain To: Scott Branden 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, mcgrof@kernel.org Subject: Re: [PATCH 2/7] firmware: add offset to request_firmware_into_buf Message-ID: <20190822194712.GG16384@42.do-not-panic.com> References: <20190822192451.5983-1-scott.branden@broadcom.com> <20190822192451.5983-3-scott.branden@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190822192451.5983-3-scott.branden@broadcom.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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, 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() And thanks for adding a test case! Luis