Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp1213096ybm; Wed, 22 May 2019 19:54:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqzIBr1TjXRX9/yMB+G1ouVh9NrBf2RCQ4g+MyvLuj0Zjvxhit8XmO0Oo1CSXb6X6bHdMSjv X-Received: by 2002:a17:902:4101:: with SMTP id e1mr97050738pld.25.1558580040840; Wed, 22 May 2019 19:54:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558580040; cv=none; d=google.com; s=arc-20160816; b=OjF5Mm+Ry9fxpGUg0NJXG5l8aHVb4Wmthjp7APRpgVgOSewhayU3RPJ7QP2ovuP912 vuipjJIazW+8VzIDxvKMm/Fxxcw1jvIvxkVWjCI+lAlS4t0cnmWj49jVcIKhpc4JOHBu jmaGLmEmOG8gXX5XbJQoyXE/HdMTmY7ueiJnXPZny0cW0pBqn7/4QQ6ZY02/fYy9Yt/T 1wNC777xUmnLOkcp+OsdEC5UTHAyuM2Dvi6gFrPdtBAc30v6THrOZCFr8gJdQE+T2Zaq qWlShdd19nNO9fhcNG9JUUPPg3I9Q8MnHacL9wogPc7U3p3LHkgCoax+8f21cEHVIBnu DOYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=Fg/iHmx0B1Mv4Llb80mXau43v90pWA5HUyUPc2gShgg=; b=InQq9oKmMYyOR/9WB6jd6DvBoWPKDFwAZqOlTr4GQYvuHUXoubMTHHoEAjsQ4OOch7 3BxLanQCy3HV8xQ8WhWnT2bDRJa7TP2N2MZmt010sgdpyMoXCdjgFXncyCrkVr9uleOM Zc84o0OEJ+xbI3oXnpe0G7ZNCsrSqulBBIZQIK32uCa8v/iYKtbvS52eIhIZh2gU+GZL 5QBudEPIjFN2SN4N7ILhECfWRnk0rlHD2c1YDHUC9jUniS//XyIbSdBDLPXnXfdmiYcI pO75ocp6Bn73wWH18nvkln6Qj30LIEE2GeOdkTSeaHSTN1nBj0FK38WuGNuA8DlPjaKF ISkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=N7gavrhW; 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 d24si17419562plr.260.2019.05.22.19.53.45; Wed, 22 May 2019 19:54:00 -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=N7gavrhW; 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 S1730019AbfEWCvd (ORCPT + 99 others); Wed, 22 May 2019 22:51:33 -0400 Received: from mail-pg1-f175.google.com ([209.85.215.175]:42580 "EHLO mail-pg1-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729976AbfEWCvc (ORCPT ); Wed, 22 May 2019 22:51:32 -0400 Received: by mail-pg1-f175.google.com with SMTP id e17so2156794pgo.9 for ; Wed, 22 May 2019 19:51:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Fg/iHmx0B1Mv4Llb80mXau43v90pWA5HUyUPc2gShgg=; b=N7gavrhWEUw0x/OIpr76d/A/QEMOAExQ8CGX8SNEHzd2JYpT3BBsEN530r3g2yElpk wugcmhEbfKVTlhkWKEjCBVr3lU+rUfVMzJZSFvlX2W+k+T70pFHPUHfiK9lhtq5qYdh6 SvnzqrkmEVoHcpfXIlsCgqzZds2/iFokvqmN8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Fg/iHmx0B1Mv4Llb80mXau43v90pWA5HUyUPc2gShgg=; b=SwZJpGv0YJeY4bQMJwXvwTwudyna/q0Mw+0eO5yXoSPci3bEzx0uxpoBW+fhE6+rVG SjQGIN4NeyFc2VrIghVxXIXkfZC4Zwns55g8xvjKfKTAFT8xe+jij9ZUXLwwzufrgX9L yIrGBAEDlfaCHBOz3MDFXGZTHNTy0x7v60lzo7DT77EWaL2BtpWdZYEzesNAMgsZqsHa V3TpBBbzdWFyrCe+oae5YxK6TZPuKQ+Cyhe8TI4Wuzl0vzLSYYfWFBBCI7aeUJV4ZS1C bhUCD4039OrhqydBeIdNyF3bYfg8TjgdeIl2mqhOPfGxnHvT0/LhzBKiE1WbUskcYHL0 SvIg== X-Gm-Message-State: APjAAAXKtpK7MdQ3O9xI9ky/iwuXGdOop2ZFiMkh6mFpcRZ4Q37scYrG GxwI9V3qlEmrnNZrwvwNc5CITQ== X-Received: by 2002:a62:14d6:: with SMTP id 205mr100298494pfu.4.1558579891739; Wed, 22 May 2019 19:51:31 -0700 (PDT) Received: from lbrmn-lnxub113.broadcom.net ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id q19sm42812174pff.96.2019.05.22.19.51.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 May 2019 19:51:31 -0700 (PDT) From: Scott Branden To: Luis Chamberlain , Greg Kroah-Hartman , Andy Gross , David Brown , Alexander Viro Cc: "Rafael J . Wysocki" , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-fsdevel@vger.kernel.org, BCM Kernel Feedback , Olof Johansson , Scott Branden Subject: [PATCH 3/3] soc: qcom: mdt_loader: add offset to request_firmware_into_buf Date: Wed, 22 May 2019 19:51:13 -0700 Message-Id: <20190523025113.4605-4-scott.branden@broadcom.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190523025113.4605-1-scott.branden@broadcom.com> References: <20190523025113.4605-1-scott.branden@broadcom.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Adjust request_firmware_into_buf API to allow for portions of firmware file to be read into a buffer. mdt_loader still retricts request fo whole file read into buffer. Signed-off-by: Scott Branden --- drivers/soc/qcom/mdt_loader.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/soc/qcom/mdt_loader.c b/drivers/soc/qcom/mdt_loader.c index 1c488024c698..ad20d159699c 100644 --- a/drivers/soc/qcom/mdt_loader.c +++ b/drivers/soc/qcom/mdt_loader.c @@ -172,8 +172,11 @@ static int __qcom_mdt_load(struct device *dev, const struct firmware *fw, if (phdr->p_filesz) { sprintf(fw_name + fw_name_len - 3, "b%02d", i); - ret = request_firmware_into_buf(&seg_fw, fw_name, dev, - ptr, phdr->p_filesz); + ret = request_firmware_into_buf + (&seg_fw, fw_name, dev, + ptr, phdr->p_filesz, + 0, + KERNEL_PREAD_FLAG_WHOLE); if (ret) { dev_err(dev, "failed to load %s\n", fw_name); break; -- 2.17.1