Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753998Ab0DYJvj (ORCPT ); Sun, 25 Apr 2010 05:51:39 -0400 Received: from 74-93-104-97-Washington.hfc.comcastbusiness.net ([74.93.104.97]:42968 "EHLO sunset.davemloft.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752939Ab0DYJvi convert rfc822-to-8bit (ORCPT ); Sun, 25 Apr 2010 05:51:38 -0400 Date: Sun, 25 Apr 2010 02:51:43 -0700 (PDT) Message-Id: <20100425.025143.196865359.davem@davemloft.net> To: xiaosuo@gmail.com Cc: xiaohui.xin@intel.com, netdev@vger.kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, mst@redhat.com, mingo@elte.hu, jdike@linux.intel.com Subject: Re: [RFC][PATCH v4 05/18] Add a function to indicate if device use external buffer. From: David Miller In-Reply-To: References: <1272187206-18534-4-git-send-email-xiaohui.xin@intel.com> <1272187206-18534-5-git-send-email-xiaohui.xin@intel.com> X-Mailer: Mew version 6.3 on Emacs 23.1 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 690 Lines: 23 From: Changli Gao Date: Sun, 25 Apr 2010 17:33:02 +0800 > On Sun, Apr 25, 2010 at 5:19 PM, wrote: >> +static int dev_is_mpassthru(struct net_device *dev) >> +{ >> + ? ? ? if (dev && dev->mp_port) >> + ? ? ? ? ? ? ? return 1; >> + ? ? ? return 0; >> +} >> + > > Please make it a inline function. And you would write it with less > lines of code. > > return dev && dev->mp_port; And use "bool" :-) -- 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/