From patchwork Tue Nov 11 12:03:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artem Bityutskiy X-Patchwork-Id: 5273751 Return-Path: X-Original-To: patchwork-linux-arm-msm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 602ED9F2ED for ; Tue, 11 Nov 2014 12:06:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8C02920127 for ; Tue, 11 Nov 2014 12:06:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 827AE2012F for ; Tue, 11 Nov 2014 12:06:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753802AbaKKMEV (ORCPT ); Tue, 11 Nov 2014 07:04:21 -0500 Received: from mga11.intel.com ([192.55.52.93]:23370 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752683AbaKKMET (ORCPT ); Tue, 11 Nov 2014 07:04:19 -0500 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 11 Nov 2014 04:03:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,360,1413270000"; d="scan'208";a="630092098" Received: from linux.jf.intel.com (HELO linux.intel.com) ([10.23.219.25]) by fmsmga002.fm.intel.com with ESMTP; 11 Nov 2014 04:03:57 -0800 Received: from [10.237.72.162] (sauron.fi.intel.com [10.237.72.162]) by linux.intel.com (Postfix) with ESMTP id F302B6A4087; Tue, 11 Nov 2014 04:03:01 -0800 (PST) Message-ID: <1415707434.22887.158.camel@sauron.fi.intel.com> Subject: Re: [PATCH V6] UBI: Extend UBI layer debug/messaging capabilities From: Artem Bityutskiy Reply-To: dedekind1@gmail.com To: Richard Weinberger Cc: Tanya Brokhman , linux-mtd@lists.infradead.org, linux-arm-msm@vger.kernel.org, David Woodhouse , Brian Norris , open list Date: Tue, 11 Nov 2014 14:03:54 +0200 In-Reply-To: <5461C5AD.5040705@nod.at> References: <1415023112-21704-1-git-send-email-tlinder@codeaurora.org> <5460F7D8.2030100@nod.at> <5461C5AD.5040705@nod.at> X-Mailer: Evolution 3.10.4 (3.10.4-4.fc20) Mime-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, 2014-11-11 at 09:15 +0100, Richard Weinberger wrote: > > Do we really want the function name in every log message? > > IMHO this is not wise except for pure debug logs. > > BTW: Why UBI-X? This looks odd. Either use UBIX or ubiX. How about something like this (untested): From: Artem Bityutskiy Date: Tue, 11 Nov 2014 13:56:34 +0200 Subject: [PATCH] UBI: clean-up printing helpers Let's prefix UBI messages with 'ubiX' instead of 'UBI-X' - this is more consistent with the way we name UBI devices. Also, commit "32608703 UBI: Extend UBI layer debug/messaging capabilities" added the function name print to 'ubi_msg()' - lets revert this change, since these messages are supposed to be just informative messages, and not debugging messages. Signed-off-by: Artem Bityutskiy --- drivers/mtd/ubi/ubi.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h index f80ffab..7a92283 100644 --- a/drivers/mtd/ubi/ubi.h +++ b/drivers/mtd/ubi/ubi.h @@ -50,13 +50,13 @@ #define UBI_NAME_STR "ubi" /* Normal UBI messages */ -#define ubi_msg(ubi, fmt, ...) pr_notice("UBI-%d: %s:" fmt "\n", \ - ubi->ubi_num, __func__, ##__VA_ARGS__) +#define ubi_msg(ubi, fmt, ...) pr_notice("ubi%d: " fmt "\n", \ + ubi->ubi_num, ##__VA_ARGS__) /* UBI warning messages */ -#define ubi_warn(ubi, fmt, ...) pr_warn("UBI-%d warning: %s: " fmt "\n", \ +#define ubi_warn(ubi, fmt, ...) pr_warn("ubi%d warning: %s: " fmt "\n", \ ubi->ubi_num, __func__, ##__VA_ARGS__) /* UBI error messages */ -#define ubi_err(ubi, fmt, ...) pr_err("UBI-%d error: %s: " fmt "\n", \ +#define ubi_err(ubi, fmt, ...) pr_err("ubi%d error: %s: " fmt "\n", \ ubi->ubi_num, __func__, ##__VA_ARGS__) /* Background thread name pattern */