Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755011AbbFOJ6S (ORCPT ); Mon, 15 Jun 2015 05:58:18 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:41270 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754322AbbFOJ54 (ORCPT ); Mon, 15 Jun 2015 05:57:56 -0400 From: Wang Long To: , , CC: , , , , , , , , , Subject: [PATCH 2/2] apei/erst-dbg: Define pr_fmt macro to avoid the duplication of ERST_DBG_PFX Date: Mon, 15 Jun 2015 09:57:30 +0000 Message-ID: <1434362250-217135-2-git-send-email-long.wanglong@huawei.com> X-Mailer: git-send-email 1.8.3.4 In-Reply-To: <1434362250-217135-1-git-send-email-long.wanglong@huawei.com> References: <1434362250-217135-1-git-send-email-long.wanglong@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.107.197.200] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020205.557EA19F.0091,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: e8801b8cc167ba17702e6f63e36a51c3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1722 Lines: 58 Define pr_fmt macro with {ERST DBG: } prefix, then remove all use of ERST_DBG_PFXin the pr_* functions. Signed-off-by: Wang Long --- drivers/acpi/apei/erst-dbg.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/acpi/apei/erst-dbg.c b/drivers/acpi/apei/erst-dbg.c index 3a57ffb..48e9490 100644 --- a/drivers/acpi/apei/erst-dbg.c +++ b/drivers/acpi/apei/erst-dbg.c @@ -31,7 +31,8 @@ #include "apei-internal.h" -#define ERST_DBG_PFX "ERST DBG: " +#undef pr_fmt +#define pr_fmt(fmt) "ERST DBG: " fmt #define ERST_DBG_RECORD_LEN_MAX 0x4000 @@ -130,8 +131,7 @@ retry: if (rc < 0) goto out; if (len > ERST_DBG_RECORD_LEN_MAX) { - pr_warn(ERST_DBG_PFX - "Record (ID: 0x%llx) length is too long: %zd\n", + pr_warn("Record (ID: 0x%llx) length is too long: %zd\n", id, len); rc = -EIO; goto out; @@ -171,7 +171,7 @@ static ssize_t erst_dbg_write(struct file *filp, const char __user *ubuf, return -EPERM; if (usize > ERST_DBG_RECORD_LEN_MAX) { - pr_err(ERST_DBG_PFX "Too long record to be written\n"); + pr_err("Too long record to be written\n"); return -EINVAL; } @@ -223,7 +223,7 @@ static struct miscdevice erst_dbg_dev = { static __init int erst_dbg_init(void) { if (erst_disable) { - pr_info(ERST_DBG_PFX "ERST support is disabled.\n"); + pr_info("ERST support is disabled.\n"); return -ENODEV; } return misc_register(&erst_dbg_dev); -- 1.8.3.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/