From patchwork Tue Jul 31 21:24:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 10551477 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id ECFB414E0 for ; Tue, 31 Jul 2018 21:24:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DD3E62B4D1 for ; Tue, 31 Jul 2018 21:24:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CEDB62B52A; Tue, 31 Jul 2018 21:24:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7436E2B4D1 for ; Tue, 31 Jul 2018 21:24:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732531AbeGaXGh (ORCPT ); Tue, 31 Jul 2018 19:06:37 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:37753 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727076AbeGaXGg (ORCPT ); Tue, 31 Jul 2018 19:06:36 -0400 Received: by mail-lj1-f194.google.com with SMTP id v9-v6so14995225ljk.4 for ; Tue, 31 Jul 2018 14:24:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=QMiIm0es48vjsLdQKXum+qUegu2/ApORRqOztXnCZ5c=; b=Ln+2YZdINtn/p58tGqZjatxrViCwjmv7SDLrDlCI6tHevBifEas+UskREftD2BFsBE tyq2D/OSBKlJfkrztYBMM3kCZaP0PQml1qrfyJmgtW0eh4T9LWzRFlBsZK/9183jlc/+ 03x/sXgBLwIDUDH4KHVU7BWpVwJUueQUoJPj4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=QMiIm0es48vjsLdQKXum+qUegu2/ApORRqOztXnCZ5c=; b=tRuz09rC9PfC9C7K40+NgLAkBj07jn4YhVhVzLhwRR3rLzCoJtwsQCHasJziP59sXi 4L3JBOfOZIk6VcKJSl0g5mE+nZS2bPLq2usGvK0fgzcE5+9u6OQXC8Ix+F+zYfm3xhl9 FHfFUJms6UhBy9hH3J70LYfsR6zjsg860GitqWGNuv29hFY97wLHhYBX2nx2OeTJqe5q V0Q+AJai8orEshYk8whyzOuUzcOBGTtUJyZaFkhhV/m945XWLdu1Ji5WkMppDRl+80uT 0QxSqM/jdJASjqwJyIKQQN/OGig2eD8Ah5dzDWp3gYIoJtC20C0KXHTmpLAxueLzgD7W InBw== X-Gm-Message-State: AOUpUlESy7dzXqyNnBE2pdH1sNCYAWVcEehw1ao7jjrN9k85kLC5JnZC SGXLbiI2W/rveUZ87rIz1nhRmQ== X-Google-Smtp-Source: AAOMgpeMeFAVvWZ1YpEee8ctWHqy8nV2qnAR2jmyqds4VKrJPWYbvPc22BQMkHGXVTH9rzwhLZ99tg== X-Received: by 2002:a2e:712:: with SMTP id 18-v6mr18580340ljh.101.1533072258601; Tue, 31 Jul 2018 14:24:18 -0700 (PDT) Received: from localhost (c-2c3d70d5.07-21-73746f28.bbcust.telenor.se. [213.112.61.44]) by smtp.gmail.com with ESMTPSA id h4-v6sm2076910lfj.69.2018.07.31.14.24.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 31 Jul 2018 14:24:18 -0700 (PDT) From: Anders Roxell To: balbi@kernel.org, gregkh@linuxfoundation.org, enric.balletbo@collabora.com Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Anders Roxell Subject: [PATCH] usb: dwc3: of-simple: mark PM functions as __maybe_unused Date: Tue, 31 Jul 2018 23:24:05 +0200 Message-Id: <20180731212405.27572-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The suspend/resume functions are not referenced when power messagement is enabled: CC drivers/video/fbdev/matrox/matroxfb_DAC1064.o drivers/usb/dwc3/dwc3-of-simple.c:223:12: warning: ‘dwc3_of_simple_resume’ defined but not used [-Wunused-function] static int dwc3_of_simple_resume(struct device *dev) ^~~~~~~~~~~~~~~~~~~~~ drivers/usb/dwc3/dwc3-of-simple.c:213:12: warning: ‘dwc3_of_simple_suspend’ defined but not used [-Wunused-function] static int dwc3_of_simple_suspend(struct device *dev) ^~~~~~~~~~~~~~~~~~~~~~ This marks them as __maybe_unused to let the compiler drop the function without complaining. Fixes: 76251db86561 ("usb: dwc3: of-simple: reset host controller at suspend/resume") Signed-off-by: Anders Roxell --- drivers/usb/dwc3/dwc3-of-simple.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-of-simple.c b/drivers/usb/dwc3/dwc3-of-simple.c index 40bf9e0bbc59..8f6d39463e99 100644 --- a/drivers/usb/dwc3/dwc3-of-simple.c +++ b/drivers/usb/dwc3/dwc3-of-simple.c @@ -210,7 +210,7 @@ static int dwc3_of_simple_runtime_resume(struct device *dev) return 0; } -static int dwc3_of_simple_suspend(struct device *dev) +static int __maybe_unused dwc3_of_simple_suspend(struct device *dev) { struct dwc3_of_simple *simple = dev_get_drvdata(dev); @@ -220,7 +220,7 @@ static int dwc3_of_simple_suspend(struct device *dev) return 0; } -static int dwc3_of_simple_resume(struct device *dev) +static int __maybe_unused dwc3_of_simple_resume(struct device *dev) { struct dwc3_of_simple *simple = dev_get_drvdata(dev);