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: 12660 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id A707223FBB for ; Sat, 3 Nov 2012 22:03:01 +0000 (UTC) Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) by fiordland.canonical.com (Postfix) with ESMTP id 454B6A18455 for ; Sat, 3 Nov 2012 22:03:01 +0000 (UTC) Received: by mail-pa0-f52.google.com with SMTP id hz10so3024049pad.11 for ; Sat, 03 Nov 2012 15:03:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=Tt5K6PuipKF52Gl92vbpL0tIOYHluSU7Z9nBzZbB0f0=; b=IP8toH2o5G9FCBM+UoN4U7fVBKPTaSbwwP1VppC5bj8vMXY46JhbfDbMwVyaXOU8Uu 6ABINoeE7kcN3mVnwZ0CziWKedq2t82EEP10LA9rDZ62vR7PS67qQrALYwv10lKT9o4M J99TeO8X0wD6bOa6JO3IlaWXwubcE3xvsPlgb5/JDeIFl4wMOde1FVJFMxlkX/c6l82h wGFuxwAWKQAmPNCvp0+uvUDGVLuVmWexHpwf6r8avsFVOQkctNcrr7O1DWIdAIBVmnhA GbL3Fu9vGSlHFxBgpfTkHaCYGASizpetir03wfCGfya72NKDjPEpCj1muhcNh7jpHv08 o6SA== Received: by 10.68.213.33 with SMTP id np1mr18042436pbc.64.1351980181001; Sat, 03 Nov 2012 15:03:01 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.68.34.137 with SMTP id z9csp94656pbi; Sat, 3 Nov 2012 15:03:00 -0700 (PDT) Received: by 10.14.193.136 with SMTP id k8mr20433054een.30.1351980179871; Sat, 03 Nov 2012 15:02:59 -0700 (PDT) Received: from mail-ee0-f48.google.com (mail-ee0-f48.google.com [74.125.83.48]) by mx.google.com with ESMTPS id a9si1970662eeo.18.2012.11.03.15.02.59 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 03 Nov 2012 15:02:59 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.83.48 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=74.125.83.48; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.83.48 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by mail-ee0-f48.google.com with SMTP id b45so3015096eek.21 for ; Sat, 03 Nov 2012 15:02:59 -0700 (PDT) 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: ALoCoQkohopVfVG3w1VMKSZxolsqardVEECxK5mxpji2s95VwUYSY9YUevqFoocJNDYChNy9WCul 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