Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753400Ab0DYJd1 (ORCPT ); Sun, 25 Apr 2010 05:33:27 -0400 Received: from mail-iw0-f178.google.com ([209.85.223.178]:44973 "EHLO mail-iw0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752755Ab0DYJdX convert rfc822-to-8bit (ORCPT ); Sun, 25 Apr 2010 05:33:23 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=kdob5dxFnhe6wsY9DCJ/UQJxYGHq2l2TAk0NB2tBl2igZxBwuFjsoCpgHE0TFFoIwJ JJnDZlqb/2OIofukGSzN6yP/umz5YUn1+7pvvrjRZSOMgtZdLUlxI7Ic8CTsBe3WRHEV 5sYMMDZrUXo1VRDEAZ0vkFLuYeNpwJ5+7Kn5Y= MIME-Version: 1.0 In-Reply-To: <1272187206-18534-5-git-send-email-xiaohui.xin@intel.com> References: <1272187206-18534-1-git-send-email-xiaohui.xin@intel.com> <1272187206-18534-2-git-send-email-xiaohui.xin@intel.com> <1272187206-18534-3-git-send-email-xiaohui.xin@intel.com> <1272187206-18534-4-git-send-email-xiaohui.xin@intel.com> <1272187206-18534-5-git-send-email-xiaohui.xin@intel.com> From: Changli Gao Date: Sun, 25 Apr 2010 17:33:02 +0800 Message-ID: Subject: Re: [RFC][PATCH v4 05/18] Add a function to indicate if device use external buffer. To: xiaohui.xin@intel.com Cc: netdev@vger.kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, mst@redhat.com, mingo@elte.hu, davem@davemloft.net, jdike@linux.intel.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 635 Lines: 23 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; -- Regards, Changli Gao(xiaosuo@gmail.com) -- 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/