From patchwork Sat Nov 3 22:02:30 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 196959 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id E9C432C00B9 for ; Sun, 4 Nov 2012 09:03:49 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757518Ab2KCWDH (ORCPT ); Sat, 3 Nov 2012 18:03:07 -0400 Received: from mail-ea0-f174.google.com ([209.85.215.174]:51761 "EHLO mail-ea0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753881Ab2KCWC7 (ORCPT ); Sat, 3 Nov 2012 18:02:59 -0400 Received: by mail-ea0-f174.google.com with SMTP id c13so1793790eaa.19 for ; Sat, 03 Nov 2012 15:02:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=Tt5K6PuipKF52Gl92vbpL0tIOYHluSU7Z9nBzZbB0f0=; b=HV9XmeA2s/q3HMpvVhdUpwBeCLl4NkCVtWcmf1cKnWOAoo6BfvFXOSpz74ftWT1SPq I2CWBc2oH+0Q/k6PcJm7eqDvGd20uTm3JGG4O3CjftmI7SwxjRD0ObrWE9ioA9gm95uU srD0ADC2Ly2szVh9Av7TW5BUFKTccREOrt458zMR44VuW4FhhGW4+52Uyrg2JKapc8KC +h04G+HSuOtQvTIJvUM9DeTjnaRjILVye52blC2xnnpIDoP1GA4zmpoIcBjELJoPrlP5 Z+/NS0HgZMP2/Cep4j6fzUgmSq7Y5ww8Ic1uMko8DtG9hN5YBx1TkPQK6a6Oa9VPK5eh ChEg== Received: by 10.14.175.71 with SMTP id y47mr20391417eel.36.1351980179233; Sat, 03 Nov 2012 15:02:59 -0700 (PDT) Received: from localhost.localdomain (88.Red-2-139-206.staticIP.rima-tde.net. [2.139.206.88]) by mx.google.com with ESMTPS id d44sm34844369eeo.10.2012.11.03.15.02.57 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 03 Nov 2012 15:02:58 -0700 (PDT) From: Lee Jones To: linux-kernel@vger.kernel.org Cc: Lee Jones , Stephen Hemminger , bridge@lists.linux-foundation.org, netdev@vger.kernel.org Subject: [PATCH 9/9] Avoid 'statement with no effect' compiler warnings Date: Sat, 3 Nov 2012 23:02:30 +0100 Message-Id: <1351980150-24145-10-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1351980150-24145-1-git-send-email-lee.jones@linaro.org> References: <1351980150-24145-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQkQyzL+Fn/aKMo0AbZEnZe+leejvB2qtm2RsjlZ4gtpK2S1YhT9QqdW9HsQnS5eaINlvAgv Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Instead of issuing (0) statements when !CONFIG_SYSFS which will cause 'warning: ', we'll use inline statements instead. This will effectively do the same thing, but suppress any unnecessary warnings. Cc: Stephen Hemminger Cc: bridge@lists.linux-foundation.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones --- net/bridge/br_private.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h index 9b278c4..af5f584 100644 --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h @@ -566,10 +566,10 @@ extern void br_sysfs_delbr(struct net_device *dev); #else -#define br_sysfs_addif(p) (0) -#define br_sysfs_renameif(p) (0) -#define br_sysfs_addbr(dev) (0) -#define br_sysfs_delbr(dev) do { } while(0) +static inline int br_sysfs_addif(struct net_bridge_port *p) { return 0; } +static inline int br_sysfs_renameif(struct net_bridge_port *p) { return 0; } +static inline int br_sysfs_addbr(struct net_device *dev) { return 0; } +static inline void br_sysfs_delbr(struct net_device *dev) { return; } #endif /* CONFIG_SYSFS */ #endif