From patchwork Wed Mar 8 11:43:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 16972 X-Patchwork-Delegate: sw@simonwunderlich.de Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [IPv6:::1]) by open-mesh.org (Postfix) with ESMTP id 252DF82DF2; Wed, 8 Mar 2017 12:44:06 +0100 (CET) Authentication-Results: open-mesh.org; dmarc=none header.from=narfation.org Authentication-Results: open-mesh.org; dkim=fail reason="verification failed; unprotected key" header.d=narfation.org header.i=@narfation.org header.b=hyI5F12t; dkim-adsp=fail (unprotected policy); dkim-atps=neutral Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=79.140.41.39; helo=v3-1039.vlinux.de; envelope-from=sven@narfation.org; receiver=b.a.t.m.a.n@lists.open-mesh.org Authentication-Results: open-mesh.org; dmarc=pass header.from=narfation.org Received: from v3-1039.vlinux.de (narfation.org [79.140.41.39]) by open-mesh.org (Postfix) with ESMTPS id 83673817B8 for ; Wed, 8 Mar 2017 12:44:03 +0100 (CET) Received: from sven-desktop.home.narfation.org (p2003007C6F5C2EFE527B9DFFFECE2683.dip0.t-ipconnect.de [IPv6:2003:7c:6f5c:2efe:527b:9dff:fece:2683]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id C2C951100D8; Wed, 8 Mar 2017 12:44:02 +0100 (CET) Authentication-Results: v3-1039.vlinux.de; dmarc=none header.from=narfation.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=narfation.org; s=20121; t=1488973442; bh=ZeXSO4AiLX4GoTo4ZrTMejSX5GnV1v5mBDzpu8vGhjA=; h=From:To:Cc:Subject:Date:From; b=hyI5F12tTEVByaLXC2JfLq78M7Gb6JrOwNshA5eQYsVDDGN5UDAGkn279gS45cZQl NMKA+UOJcCvtSWmj3c+75zEeGlkYcoO+mzlbPWxjUl2kFWmXXT6hQcjQtjT7NlX/2v 939nrk1SxisN27l+b7NhgHIvrpLaNaombwiEet2Q= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Wed, 8 Mar 2017 12:43:59 +0100 Message-Id: <20170308114359.26916-1-sven@narfation.org> X-Mailer: git-send-email 2.11.0 Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: Use __func__ to add function names to messages X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" The name of the function might change in which these messages are printed. It is therefore better to let the compiler handle the insertion of the correct function name. Signed-off-by: Sven Eckelmann --- net/batman-adv/tp_meter.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/net/batman-adv/tp_meter.c b/net/batman-adv/tp_meter.c index c94ebde..556f9a8 100644 --- a/net/batman-adv/tp_meter.c +++ b/net/batman-adv/tp_meter.c @@ -873,8 +873,8 @@ static int batadv_tp_send(void *arg) /* something went wrong during the preparation/transmission */ if (unlikely(err && err != BATADV_TP_REASON_CANT_SEND)) { batadv_dbg(BATADV_DBG_TP_METER, bat_priv, - "Meter: batadv_tp_send() cannot send packets (%d)\n", - err); + "Meter: %s() cannot send packets (%d)\n", + __func__, err); /* ensure nobody else tries to stop the thread now */ if (atomic_dec_and_test(&tp_vars->sending)) tp_vars->reason = err; @@ -979,7 +979,8 @@ void batadv_tp_start(struct batadv_priv *bat_priv, const u8 *dst, if (!tp_vars) { spin_unlock_bh(&bat_priv->tp_list_lock); batadv_dbg(BATADV_DBG_TP_METER, bat_priv, - "Meter: batadv_tp_start cannot allocate list elements\n"); + "Meter: %s cannot allocate list elements\n", + __func__); batadv_tp_batctl_error_notify(BATADV_TP_REASON_MEMORY_ERROR, dst, bat_priv, session_cookie); return;