From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752205AbdFERQL (ORCPT ); Mon, 5 Jun 2017 13:16:11 -0400 Received: from terminus.zytor.com ([65.50.211.136]:51435 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751213AbdFERQJ (ORCPT ); Mon, 5 Jun 2017 13:16:09 -0400 Date: Mon, 5 Jun 2017 10:11:31 -0700 From: tip-bot for Jan Kiszka Message-ID: Cc: peterz@infradead.org, ard.biesheuvel@linaro.org, mingo@kernel.org, jan.kiszka@siemens.com, linux-kernel@vger.kernel.org, matt@codeblueprint.co.uk, tglx@linutronix.de, torvalds@linux-foundation.org, hpa@zytor.com Reply-To: hpa@zytor.com, torvalds@linux-foundation.org, mingo@kernel.org, peterz@infradead.org, ard.biesheuvel@linaro.org, matt@codeblueprint.co.uk, tglx@linutronix.de, linux-kernel@vger.kernel.org, jan.kiszka@siemens.com In-Reply-To: <20170602135207.21708-5-ard.biesheuvel@linaro.org> References: <20170602135207.21708-5-ard.biesheuvel@linaro.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:efi/core] efi/capsule: Clean up pr_err/_info() messages Git-Commit-ID: 5dce14b9d1a29cf76331f0fe8eb7efd63e0fcb9a X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 5dce14b9d1a29cf76331f0fe8eb7efd63e0fcb9a Gitweb: http://git.kernel.org/tip/5dce14b9d1a29cf76331f0fe8eb7efd63e0fcb9a Author: Jan Kiszka AuthorDate: Fri, 2 Jun 2017 13:51:58 +0000 Committer: Ingo Molnar CommitDate: Mon, 5 Jun 2017 17:50:39 +0200 efi/capsule: Clean up pr_err/_info() messages Avoid __func__, improve the information provided by some of the messages. Signed-off-by: Jan Kiszka Signed-off-by: Ard Biesheuvel Reviewed-by: Matt Fleming Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20170602135207.21708-5-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar --- drivers/firmware/efi/capsule-loader.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/drivers/firmware/efi/capsule-loader.c b/drivers/firmware/efi/capsule-loader.c index 7b57dda..3fb91e1 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; }