From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id E945491CD for ; Tue, 5 Jan 2016 02:53:10 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP; 04 Jan 2016 17:53:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,523,1444719600"; d="scan'208";a="853577218" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.66.49]) by orsmga001.jf.intel.com with ESMTP; 04 Jan 2016 17:53:07 -0800 Date: Tue, 5 Jan 2016 09:56:45 +0800 From: Yuanhan Liu To: "Xie, Huawei" Message-ID: <20160105015645.GF26062@yliu-dev.sh.intel.com> References: <20151222035041.GA7532@pxdev.xzpeter.org> <1451843773-103006-1-git-send-email-huawei.xie@intel.com> <1451843773-103006-5-git-send-email-huawei.xie@intel.com> <20160104092410.11311412@xeon-e3> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v2 4/4] virtio: check if any kernel driver is manipulating the virtio device X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2016 01:53:11 -0000 On Mon, Jan 04, 2016 at 05:56:49PM +0000, Xie, Huawei wrote: > On 1/5/2016 1:24 AM, Stephen Hemminger wrote: > > On Mon, 4 Jan 2016 01:56:13 +0800 > > Huawei Xie wrote: > > > >> + if (pci_dev->kdrv != RTE_KDRV_NONE) { > >> + PMD_INIT_LOG(INFO, > >> + "kernel driver is manipulating this device." \ > >> + " Please unbind the kernel driver."); > > Splitting strings in general is a bad idea since it makes it harder to find log messages. > > Also the first clause is lower case and the second is captialized. > Got it. This is to avoid 80 char warning. Will put it in one line to > make it friendly for searching. I agree with Stephen that _in general_ it's a bad idea. But for this case, I think it's okay, as it'd be enough to locate the code by searching "manipulating this device", or "unbind the kernel driver", or other combinations. I mean, nobody would try searching with: "kernel driver is manipulating this device. Please unbind the kernel driver." Right? --yliu > The first clause is lower is because it actually follows "%s():". > > > > Lastly, the backslash continuation is unnecessary here and will cause checkpatch warning. > > >