From patchwork Wed Oct 1 11:59:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 395487 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 D704E14016A for ; Wed, 1 Oct 2014 21:59:38 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751195AbaJAL7G (ORCPT ); Wed, 1 Oct 2014 07:59:06 -0400 Received: from mail-wi0-f182.google.com ([209.85.212.182]:42902 "EHLO mail-wi0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750992AbaJAL7E (ORCPT ); Wed, 1 Oct 2014 07:59:04 -0400 Received: by mail-wi0-f182.google.com with SMTP id n3so329506wiv.3 for ; Wed, 01 Oct 2014 04:59:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=WS0iXwKOS42q5/0mFqU5ddEtDKPZmIQwwChYtuPIGlU=; b=uQVIodULuYsbzOAJtbZ0QTO0+rZ8GEMxxGP/MjH3+gzSiAlWxo1cgSlcnehRyXaJqY Cz6jdHr0z3SAbXATaa4TCaGSO5Bqn/oWdNWtjolKcvb90V3y75yToSTNxlxJJ4twhCD9 gM/jAJtCeRynRbufCn0/pmP9L7DUP98osUfbkrbKsk2T+DYjTFk5Zxx2CujZIfdyNpBl Oh742F5Gh1oN5bHtHvO455mdmt10BgviyelfVIh62bJExqWQ6aGnXvE+9bbpDF2pqS9P FnhKUkpdSO+59I2Q0IAJGTdWyiJyG16d9dCAikxrjxOnoM58P7TbGRROxZsRk/hMIzeo PHXw== X-Received: by 10.180.74.227 with SMTP id x3mr13383163wiv.80.1412164742730; Wed, 01 Oct 2014 04:59:02 -0700 (PDT) Received: from localhost (port-5933.pppoe.wtnet.de. [84.46.23.68]) by mx.google.com with ESMTPSA id w14sm1632815wia.11.2014.10.01.04.59.01 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Oct 2014 04:59:02 -0700 (PDT) From: Thierry Reding To: "David S. Miller" Cc: Florian Fainelli , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] net: dsa: Fix build warning for !PM_SLEEP Date: Wed, 1 Oct 2014 13:59:00 +0200 Message-Id: <1412164740-32452-1-git-send-email-thierry.reding@gmail.com> X-Mailer: git-send-email 2.1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Thierry Reding The dsa_switch_suspend() and dsa_switch_resume() functions are only used when PM_SLEEP is enabled, so they need #ifdef CONFIG_PM_SLEEP protection to avoid a compiler warning. Signed-off-by: Thierry Reding Acked-by: Florian Fainelli --- net/dsa/dsa.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c index 6905f2d84c44..22f34cf4cb27 100644 --- a/net/dsa/dsa.c +++ b/net/dsa/dsa.c @@ -238,6 +238,7 @@ static void dsa_switch_destroy(struct dsa_switch *ds) { } +#ifdef CONFIG_PM_SLEEP static int dsa_switch_suspend(struct dsa_switch *ds) { int i, ret = 0; @@ -280,6 +281,7 @@ static int dsa_switch_resume(struct dsa_switch *ds) return 0; } +#endif /* link polling *************************************************************/