From patchwork Tue Feb 18 18:47:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 24915 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f197.google.com (mail-ie0-f197.google.com [209.85.223.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1E326202B2 for ; Tue, 18 Feb 2014 18:49:12 +0000 (UTC) Received: by mail-ie0-f197.google.com with SMTP id rd18sf30613177iec.8 for ; Tue, 18 Feb 2014 10:49:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:date:from:to:cc:subject:message-id :reply-to:references:mime-version:content-type:content-disposition :in-reply-to:user-agent:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=gF0PKRinCJL4APe+RwObE/UCI4ELmYcgnV0pvMklwWw=; b=XlGVftBZLVHVo8Spz8HW8i6Uuw8QlfXnjfuZKFbBLsIiQviIo1S81CE5gfKk1Jpa+i /tYJZ5m2E0lWtfPR7uoU1ixZ4ZOn8RAS1lApvX7PHFF5Elh2PFGXE8c6gBqxpp6PtWC1 7W/TdJf/HwhP3RFTNxfbT0pEbDNdYDQjXZxjXwgIazsdA2br2282RGos54FdRlg+xkC3 L8q1cQA/hyiHEorw6Sp3ickX4+YRcdVe6iaqj/+RuwLwaqJ3aNZ8sW2hcwRxFB5SR+PX jwrGhccUjg2ZtJETPBcmPtlscSom647vQUjsdomOi/kHkiD8gXBZ2QE/4LuWswXGU0Qx 3AOA== X-Gm-Message-State: ALoCoQmb5+pjWwT1X3Xx7RLZDIC03KmfATQl8roCR0BHbIrzi5rqFww7/IA9fIaFlnylOwAtvaIN X-Received: by 10.50.124.33 with SMTP id mf1mr3206642igb.6.1392749352282; Tue, 18 Feb 2014 10:49:12 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.106.71 with SMTP id d65ls1378209qgf.60.gmail; Tue, 18 Feb 2014 10:49:12 -0800 (PST) X-Received: by 10.220.252.134 with SMTP id mw6mr1451517vcb.51.1392749352076; Tue, 18 Feb 2014 10:49:12 -0800 (PST) Received: from mail-ve0-f170.google.com (mail-ve0-f170.google.com [209.85.128.170]) by mx.google.com with ESMTPS id tr5si5750141vdc.65.2014.02.18.10.49.12 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 18 Feb 2014 10:49:12 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.170; Received: by mail-ve0-f170.google.com with SMTP id cz12so14234029veb.1 for ; Tue, 18 Feb 2014 10:49:12 -0800 (PST) X-Received: by 10.52.247.168 with SMTP id yf8mr150693vdc.65.1392749351956; Tue, 18 Feb 2014 10:49:11 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp239078vcz; Tue, 18 Feb 2014 10:49:11 -0800 (PST) X-Received: by 10.68.247.6 with SMTP id ya6mr34482828pbc.45.1392749350777; Tue, 18 Feb 2014 10:49:10 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id vw10si19195191pbc.167.2014.02.18.10.49.10; Tue, 18 Feb 2014 10:49:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751823AbaBRStD (ORCPT + 27 others); Tue, 18 Feb 2014 13:49:03 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:43212 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750939AbaBRStA (ORCPT ); Tue, 18 Feb 2014 13:49:00 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id s1IImwNE004077; Tue, 18 Feb 2014 12:48:58 -0600 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s1IImw3r008244; Tue, 18 Feb 2014 12:48:58 -0600 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.174.1; Tue, 18 Feb 2014 12:48:58 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s1IImv1E002380; Tue, 18 Feb 2014 12:48:58 -0600 Date: Tue, 18 Feb 2014 12:47:41 -0600 From: Felipe Balbi To: David Cohen CC: , , , Subject: Re: [PATCH v2] usb/xhci: fix compilation warning when !CONFIG_PCI && !CONFIG_PM Message-ID: <20140218184741.GI28506@saruman.home> Reply-To: References: <1389059068-18491-1-git-send-email-david.a.cohen@linux.intel.com> <1389063739-6028-1-git-send-email-david.a.cohen@linux.intel.com> <20140218180030.GA10029@psi-dev26.jf.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20140218180030.GA10029@psi-dev26.jf.intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: balbi@ti.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , On Tue, Feb 18, 2014 at 10:00:30AM -0800, David Cohen wrote: > Hi Sarah, > > On Mon, Jan 06, 2014 at 07:02:19PM -0800, David Cohen wrote: > > When CONFIG_PCI and CONFIG_PM are not selected, xhci.c gets this > > warning: > > drivers/usb/host/xhci.c:409:13: warning: ‘xhci_msix_sync_irqs’ defined > > but not used [-Wunused-function] > > > > It happens due to lack of __maybe_unused flag on xhci_msix_sync_irqs() > > function in case of !CONFIG_PCI. > > > > Signed-off-by: David Cohen > > --- > > Ping :) > Any comments here? > > Br, David > > > > > Change v1 -> v2: > > - xhci_msix_sync_irqs() already uses __maybe_unused flag when CONFIG_PCI is > > set. Proper solution is to add same flag when !CONFIG_PCI instead of define > > function as inline. > > > > drivers/usb/host/xhci.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c > > index 4265b48856f6..ed6b717b8ee1 100644 > > --- a/drivers/usb/host/xhci.c > > +++ b/drivers/usb/host/xhci.c > > @@ -406,7 +406,7 @@ static void xhci_cleanup_msix(struct xhci_hcd *xhci) > > { > > } > > > > -static void xhci_msix_sync_irqs(struct xhci_hcd *xhci) > > +static void __maybe_unused xhci_msix_sync_irqs(struct xhci_hcd *xhci) bellow is likely a better fix. Usually stubs are marked inline, rather than getting an unused attribute: diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 3712359..8f1a6d5 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -404,16 +404,16 @@ static int xhci_try_enable_msi(struct usb_hcd *hcd) #else -static int xhci_try_enable_msi(struct usb_hcd *hcd) +static inline int xhci_try_enable_msi(struct usb_hcd *hcd) { return 0; } -static void xhci_cleanup_msix(struct xhci_hcd *xhci) +static inline void xhci_cleanup_msix(struct xhci_hcd *xhci) { } -static void xhci_msix_sync_irqs(struct xhci_hcd *xhci) +static inline void xhci_msix_sync_irqs(struct xhci_hcd *xhci) { }