Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752034AbdFPBt2 convert rfc822-to-8bit (ORCPT ); Thu, 15 Jun 2017 21:49:28 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:41911 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751578AbdFPBt0 (ORCPT ); Thu, 15 Jun 2017 21:49:26 -0400 From: Jay Vosburgh To: Joe Perches cc: Michael J Dilmore , Veaceslav Falico , Andy Gospodarek , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Convert multiple netdev_info messages to netdev_dbg In-reply-to: <1497563676.14396.19.camel@perches.com> References: <1497550452-3067-1-git-send-email-michael.j.dilmore@gmail.com> <1497563676.14396.19.camel@perches.com> Comments: In-reply-to Joe Perches message dated "Thu, 15 Jun 2017 14:54:36 -0700." X-Mailer: MH-E 8.6+git-jv; nmh 1.6; GNU Emacs 25.1.50 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Date: Thu, 15 Jun 2017 18:49:21 -0700 Message-ID: <21519.1497577761@famine> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1858 Lines: 56 Joe Perches wrote: >On Thu, 2017-06-15 at 19:14 +0100, Michael J Dilmore wrote: >> Multiple netdev_info messages clutter kernel output. Also add netdev_dbg for packets per slave. >[] >> diff --git a/drivers/net/bonding/bond_options.c b/drivers/net/bonding/bond_options.c >[] >> @@ -9,6 +9,8 @@ >> * (at your option) any later version. >> */ >> >> +#define DEBUG 1 > >Is defining DEBUG really worthwhile. I don't believe so, since if CONFIG_DYNAMIC_DEBUG is not enabled, having #define DEBUG will enable all of the netdev_dbg messages unconditionally, which is the opposite of the stated purpose of the patch. If DYNAMIC_DEBUG is enabled, having DEBUG doesn't do anything that I can see. -J >As well, it's almost always just >#define DEBUG >without any level value unless the >level value is used in the code. > >> + >> #include >> #include >> #include >> @@ -719,13 +721,13 @@ static int bond_option_mode_set(struct bonding *bond, >> const struct bond_opt_value *newval) >> { >> if (!bond_mode_uses_arp(newval->value) && bond->params.arp_interval) { >> - netdev_info(bond->dev, "%s mode is incompatible with arp monitoring, start mii monitoring\n", >> + netdev_dbg(bond->dev, "%s mode is incompatible with arp monitoring, start mii monitoring\n", >> newval->string); > >Please realign any multiple line arguments to the >open parenthesis at the same time. > >> /* disable arp monitoring */ >> bond->params.arp_interval = 0; >> /* set miimon to default value */ >> bond->params.miimon = BOND_DEFAULT_MIIMON; >> - netdev_info(bond->dev, "Setting MII monitoring interval to %d\n", >> + netdev_dbg(bond->dev, "Setting MII monitoring interval to %d\n", >> bond->params.miimon); > >etc... > --- -Jay Vosburgh, jay.vosburgh@canonical.com