From patchwork Wed Apr 5 09:23:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 96794 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp173376qgd; Wed, 5 Apr 2017 02:23:46 -0700 (PDT) X-Received: by 10.98.157.12 with SMTP id i12mr27148210pfd.166.1491384226127; 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 S933109AbdDEJXh (ORCPT + 2 others); Wed, 5 Apr 2017 05:23:37 -0400 Received: from mail-wm0-f49.google.com ([74.125.82.49]:38293 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932632AbdDEJXf (ORCPT ); Wed, 5 Apr 2017 05:23:35 -0400 Received: by mail-wm0-f49.google.com with SMTP id t189so8330629wmt.1 for ; Wed, 05 Apr 2017 02:23:35 -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=5svIytWXYviLeylhPurJscFcOztDy+tX0Hx0VjTLmLQ=; b=PwT66zDv26i27GXIzg4Dn7UvlWqBgoHByXBohpl0rQvWLb6pK5VOT9AUeqnvjYnEWL /1JvIqUNA9x0hqNr3KAUOpt5G1NeKpMGjJgNAC6JJlr+gvffe9hfiEAkZFd59TE9APIQ bRLmBy2gk10hJtuq/3fwikUZF7k2Q6gkFqbGU= 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=5svIytWXYviLeylhPurJscFcOztDy+tX0Hx0VjTLmLQ=; b=ekum3oYTCieKPw/Zvs3uC4+FFIuQCUZ9hfgr3J7U4zlUIMWWCLXBmPwcsVDP9eBpDP om0DR4Jx2WaHjZeE8479MKzJxiSxI+riuZ6ZY4xtBNSwFTjSEa5BXXMRmJLV32s1g/Ei OzSQBwkXjDU28nF/UKcTKAqjUcTmOEjwMKhyZtTUMwwfEdsYWJUOtf+pw2w52z31wWvR /1pUzWeEDhb3KKBmUtdrBu+cP+wr7ETaTlRuvhQMICcTzFLYYxeZNm4pd/7+14Zs+ga9 PXd8ojzdCTLzCqrLY3yOclFjRLO/KS9Gn/DCuJXyyNBGo8lmx60d9uZTHEvbAHaEuJJ7 UnZw== X-Gm-Message-State: AFeK/H2qY+5mLGOiGy6A15wqK7lu56hZC2LFzkOOAXedMab9pVJr3nKa m6bG8tUsdsdLn0f2 X-Received: by 10.28.195.197 with SMTP id t188mr18712107wmf.61.1491384214277; Wed, 05 Apr 2017 02:23:34 -0700 (PDT) Received: from localhost.localdomain ([160.163.145.113]) by smtp.gmail.com with ESMTPSA id b66sm23935271wrd.29.2017.04.05.02.23.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Apr 2017 02:23:33 -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 3/8] efi/capsule: Clean up pr_err/info messages Date: Wed, 5 Apr 2017 10:23:12 +0100 Message-Id: <20170405092317.27921-4-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 Avoid __func__, improve the information provided by some of the messages. Signed-off-by: Jan Kiszka Cc: Matt Fleming Signed-off-by: Ard Biesheuvel --- drivers/firmware/efi/capsule-loader.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 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 7b57dda2417d..3fb91e1597a9 100644 --- a/drivers/firmware/efi/capsule-loader.c +++ b/drivers/firmware/efi/capsule-loader.c @@ -70,7 +70,7 @@ static ssize_t efi_capsule_setup_info(struct capsule_info *cap_info, pages_needed = ALIGN(cap_hdr->imagesize, PAGE_SIZE) >> PAGE_SHIFT; if (pages_needed == 0) { - pr_err("%s: pages count invalid\n", __func__); + pr_err("invalid capsule size"); return -EINVAL; } @@ -79,8 +79,7 @@ static ssize_t efi_capsule_setup_info(struct capsule_info *cap_info, cap_hdr->imagesize, &cap_info->reset_type); if (ret) { - pr_err("%s: efi_capsule_supported() failed\n", - __func__); + pr_err("capsule not supported\n"); return ret; } @@ -115,14 +114,14 @@ static ssize_t efi_capsule_submit_update(struct capsule_info *cap_info) ret = efi_capsule_update(cap_hdr_temp, cap_info->pages); vunmap(cap_hdr_temp); if (ret) { - pr_err("%s: efi_capsule_update() failed\n", __func__); + pr_err("capsule update failed\n"); return ret; } /* Indicate capsule binary uploading is done */ cap_info->index = NO_FURTHER_WRITE_ACTION; - pr_info("%s: Successfully upload capsule file with reboot type '%s'\n", - __func__, !cap_info->reset_type ? "RESET_COLD" : + pr_info("Successfully upload capsule file with reboot type '%s'\n", + !cap_info->reset_type ? "RESET_COLD" : cap_info->reset_type == 1 ? "RESET_WARM" : "RESET_SHUTDOWN"); return 0; @@ -207,8 +206,7 @@ static ssize_t efi_capsule_write(struct file *file, const char __user *buff, if (cap_info->header_obtained && cap_info->count >= cap_info->total_size) { if (cap_info->count > cap_info->total_size) { - pr_err("%s: upload size exceeded header defined size\n", - __func__); + pr_err("capsule upload size exceeded header defined size\n"); ret = -EINVAL; goto failed; } @@ -242,7 +240,7 @@ static int efi_capsule_flush(struct file *file, fl_owner_t id) struct capsule_info *cap_info = file->private_data; if (cap_info->index > 0) { - pr_err("%s: capsule upload not complete\n", __func__); + pr_err("capsule upload not complete\n"); efi_free_all_buff_pages(cap_info); ret = -ECANCELED; } @@ -321,8 +319,7 @@ static int __init efi_capsule_loader_init(void) ret = misc_register(&efi_capsule_misc); if (ret) - pr_err("%s: Failed to register misc char file note\n", - __func__); + pr_err("Unable to register capsule loader device\n"); return ret; }