From patchwork Wed Apr 5 09:23:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 96796 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp173381qgd; Wed, 5 Apr 2017 02:23:46 -0700 (PDT) X-Received: by 10.84.197.3 with SMTP id m3mr34816501pld.89.1491384226636; Wed, 05 Apr 2017 02:23:46 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y73si20044853pgd.394.2017.04.05.02.23.46; Wed, 05 Apr 2017 02:23:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933115AbdDEJXk (ORCPT + 2 others); Wed, 5 Apr 2017 05:23:40 -0400 Received: from mail-wr0-f172.google.com ([209.85.128.172]:33322 "EHLO mail-wr0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932632AbdDEJXi (ORCPT ); Wed, 5 Apr 2017 05:23:38 -0400 Received: by mail-wr0-f172.google.com with SMTP id w43so5206435wrb.0 for ; Wed, 05 Apr 2017 02:23:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=wBBEVIkyPT5yx/BsijZ//J7/PZ9Qf2RCp+la0h2xcEc=; b=cY2h3l/CyWr+YTsGUU0B9Shd+gMOL4xaWTmpF+mDXgKzsGIxbUqPt8LXdrWJpmBRAg J/BJBYgpby3tBsxzU/d92ITRHgE3lKzRoVf6FsWRWWdTWEOccHWgN56pCzNmaeE0c5n+ Ci02jx1xj2U47AZ4SotnWRPtPP/oQ+NC3bdI4= 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=wBBEVIkyPT5yx/BsijZ//J7/PZ9Qf2RCp+la0h2xcEc=; b=E/AZJZ660Xg80ufgUFArMX+eWd92xVo08u8gPLkkdbZlA4pnsX0LxrIUjI4Gueu7cv LqyHZJ3YY6xYKME0TK91vsybaC8djGpwvJcH1YWnYg5lupINSvG6Sp7I3WVSSUA48eSV uBILFNdqBF9ul0XwiwrMBNiYKbXLfMRFmADvLqe4qjsCCTThSQuH3Ke0Jd9stN6mDLX2 T7h4KrKHLa0qqXM3h6a/2uPbSUZrN/VK6j6NcQjDr3ycGHdoa4mNWv9pudT1tIJ/ljA9 aHmHmghrUSff1DgpP2Hgb9s2d8bA5KN7x+2rJsaQ9qQfvIMi9YdH1sRgUqHLI3cmDT5y smog== X-Gm-Message-State: AFeK/H3DovNjuKoJc+gjjuWZUeCJ75u8qXfaQYst1PkFpE95hhlC6rKtIiLDDTZ2W8Ysrgxo X-Received: by 10.223.171.71 with SMTP id r7mr22372573wrc.199.1491384217107; Wed, 05 Apr 2017 02:23:37 -0700 (PDT) Received: from localhost.localdomain ([160.163.145.113]) by smtp.gmail.com with ESMTPSA id b66sm23935271wrd.29.2017.04.05.02.23.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Apr 2017 02:23:36 -0700 (PDT) From: Ard Biesheuvel To: linux-efi@vger.kernel.org Cc: matt@codeblueprint.co.uk, andy.shevchenko@gmail.com, pure.logic@nexus-software.ie, hock.leong.kweh@intel.com, bp@alien8.de, sascha.weisenberger@siemens.com, jan.kiszka@siemens.com, Ard Biesheuvel Subject: [PATCH 4/8] efi/capsule: Adjust return type of efi_capsule_setup_info Date: Wed, 5 Apr 2017 10:23:13 +0100 Message-Id: <20170405092317.27921-5-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170405092317.27921-1-ard.biesheuvel@linaro.org> References: <20170405092317.27921-1-ard.biesheuvel@linaro.org> Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org From: Jan Kiszka We actually expect int at the caller and never return any size information. Signed-off-by: Jan Kiszka Cc: Matt Fleming Signed-off-by: Ard Biesheuvel --- drivers/firmware/efi/capsule-loader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-efi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Reviewed-by: Matt Fleming diff --git a/drivers/firmware/efi/capsule-loader.c b/drivers/firmware/efi/capsule-loader.c index 3fb91e1597a9..37d3f6ec2d28 100644 --- a/drivers/firmware/efi/capsule-loader.c +++ b/drivers/firmware/efi/capsule-loader.c @@ -53,8 +53,8 @@ static void efi_free_all_buff_pages(struct capsule_info *cap_info) * @kbuff: a mapped first page buffer pointer * @hdr_bytes: the total received number of bytes for efi header **/ -static ssize_t efi_capsule_setup_info(struct capsule_info *cap_info, - void *kbuff, size_t hdr_bytes) +static int efi_capsule_setup_info(struct capsule_info *cap_info, + void *kbuff, size_t hdr_bytes) { efi_capsule_header_t *cap_hdr; size_t pages_needed;