From patchwork Fri Jun 2 13:51:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 101254 Delivered-To: patch@linaro.org Received: by 10.182.202.35 with SMTP id kf3csp204866obc; Fri, 2 Jun 2017 06:54:58 -0700 (PDT) X-Received: by 10.84.215.23 with SMTP id k23mr52343pli.104.1496411698797; Fri, 02 Jun 2017 06:54:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496411698; cv=none; d=google.com; s=arc-20160816; b=Szs23r6gmeCqx6tHf13HBtcPMiwVy3wv9mEqGQmFXwk6h/SiMIG87tw9YgZ0Ui0WQ+ RdzlspAGive1vsjV385b6FexXd97f9bSZGy0jPGLhE9WGKiUAIIQlezVb1wBuQdvcfec QI1Fcl23RM+NrON2PjTwWjG9O/PxSxTjmAMjI2jNpRsNaz/p1Ju39EnPleU8aURQ8hTd 2oOwWsndoL/SOZHHxyp/cq3Zjvlr1touTu4aZh92IDHw3Z09VEhkx6ekMU0WwRxIpjeT /ZVLHbhZ7dxqJPeQ9dylg0qEEwF7w/WqZazYNk58OMen1Vq0Gjnn2kGkXgRWNf21BONb u4NQ== 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:arc-authentication-results; bh=8Ar+FbdcuizBc2IKWTdd3fAv+3NWr2PFEuz8pC07ha0=; b=BPFyjNs13fdFLfpaOZwGe0giAVxRQhnScwzSZAl4rKMZ5GMjf0hQAGrNrtlcwI/vky CsgkTmPel6acF4y8hACJwxNDrApOHmy7Q6AOvjPG7SO0hjD3dVG+DHCn6fwGFdE7umgf jjC/bXOevzBUpk1v4v2Nxz3ub5pB8pbp2CDhqQpS/9WgmNNP/RFrMFp/VsT9jTKiaVA2 1kVp3F56DqFKabZx/kD3maL3slOL7FoZpHJU5E7XonDm/u6QTy/nJfLbltmZqiDFDoQc TBXUirjqYvKhqfCBidGzLp6/F9EXX2opg0M1qBvlBdfXaz9dcZGTXT5wgPMpAoLI2T3M eC7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1si22752624pgu.95.2017.06.02.06.54.58; Fri, 02 Jun 2017 06:54:58 -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=@linaro.org; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751514AbdFBNyy (ORCPT + 25 others); Fri, 2 Jun 2017 09:54:54 -0400 Received: from mail-wm0-f43.google.com ([74.125.82.43]:37008 "EHLO mail-wm0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751125AbdFBNyv (ORCPT ); Fri, 2 Jun 2017 09:54:51 -0400 Received: by mail-wm0-f43.google.com with SMTP id d127so27562486wmf.0 for ; Fri, 02 Jun 2017 06:54:51 -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=8Ar+FbdcuizBc2IKWTdd3fAv+3NWr2PFEuz8pC07ha0=; b=evG3WjaGCGCUc6jnsmQW2Lc4EFsGkEYbmSXcxbgfxoarlsxzgXLQmtXHnM/BYcY5XX IBV6MlkACeZ8EzWqTUdp0N5XTA4hYeDngLTVPORTIdPQ4UBimY6lmGf8/Km3nn0dOHtE HURTS8v424oOnNtppCxfOCFH5yzP1IPnPIrd8= 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=8Ar+FbdcuizBc2IKWTdd3fAv+3NWr2PFEuz8pC07ha0=; b=YTkCThmbpxmklhEtl3JDoKwAZpfJo81m28um42nmBHD3afYuExjJp5ZwJtfRXg29Yn IOmtHHxAmbj3oDc7vVBp9nsLZ6Sou/VIV9ArMHcqymzI4w9LrtrWlz55VWQZthaVplat oVNddyRl57w8rHEgn5iCzwuSyYCdjqO8WlaKZ5uCwGbOQ31VCj1jrtUUWqkgOBURauSx 7EIDEnxDQi03WaGbevF4pEULfw/bdxzvh5+Rc8JKafALfWFPbV/5r7CbLj6+YMpT+7ph n8eTAUp5HTw7eganbR4+RZvHy31h7DjsBaS8w5d7iSlLl9OIDUV3OyZPpy8NdMVuAh81 ThGQ== X-Gm-Message-State: AODbwcAhSg7OSAtg+DtNAn3DD27BSsbpp+kCj3Pq1mD0nUo3Mw42DOrU i3P2lzmDmmdQhfaJ X-Received: by 10.80.183.4 with SMTP id g4mr6140100ede.138.1496411690619; Fri, 02 Jun 2017 06:54:50 -0700 (PDT) Received: from localhost.localdomain ([105.151.155.95]) by smtp.gmail.com with ESMTPSA id g48sm9756076edc.8.2017.06.02.06.54.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Jun 2017 06:54:49 -0700 (PDT) From: Ard Biesheuvel To: linux-efi@vger.kernel.org, Ingo Molnar , Thomas Gleixner , "H . Peter Anvin" Cc: Jan Kiszka , Ard Biesheuvel , linux-kernel@vger.kernel.org Subject: [PATCH 04/13] efi/capsule: Clean up pr_err/info messages Date: Fri, 2 Jun 2017 13:51:58 +0000 Message-Id: <20170602135207.21708-5-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170602135207.21708-1-ard.biesheuvel@linaro.org> References: <20170602135207.21708-1-ard.biesheuvel@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jan Kiszka Avoid __func__, improve the information provided by some of the messages. Signed-off-by: Jan Kiszka Reviewed-by: Matt Fleming Signed-off-by: Ard Biesheuvel --- drivers/firmware/efi/capsule-loader.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) -- 2.9.3 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; }