All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathias Nyman <mathias.nyman-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
To: Matthias Brugger
	<matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>,
	Greg Kroah-Hartman
	<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Felipe Balbi <balbi-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Alan Stern
	<stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org>,
	linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Mathias Nyman
	<mathias.nyman-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 2/6] usb: xhci-mtk: use __maybe_unused to hide pm functions
Date: Thu, 10 Mar 2016 13:42:37 +0200	[thread overview]
Message-ID: <56E15DAD.3000104@linux.intel.com> (raw)
In-Reply-To: <56D9B8EE.3060107-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

On 04.03.2016 18:33, Matthias Brugger wrote:
>
>
> On 02/03/16 16:24, Arnd Bergmann wrote:
>> The mediatek XHCI glue driver uses SET_SYSTEM_SLEEP_PM_OPS() to
>> conditionally set the correct suspend/resume options, and
>> also puts both the dev_pm_ops and the functions inside of
>> an #ifdef testing for CONFIG_PM_SLEEP, but those functions
>> then call other code that becomes unused:
>>
>> drivers/usb/host/xhci-mtk.c:135:12: error: 'xhci_mtk_host_disable' defined but not used [-Werror=unused-function]
>> drivers/usb/host/xhci-mtk.c:313:13: error: 'usb_wakeup_enable' defined but not used [-Werror=unused-function]
>> drivers/usb/host/xhci-mtk.c:321:13: error: 'usb_wakeup_disable' defined but not used [-Werror=unused-function]
>>
>> This replaces the #ifdef with __maybe_unused annotations so the
>> compiler knows it can silently drop them instead of warning.
>>
>> For the DEV_PM_OPS definition, we can use an IS_ENABLED() check
>> to avoid defining the structure when CONFIG_PM is not set without
>> the #ifdef.
>>
>> Signed-off-by: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
>> ---
>
> Reviewed-by: Matthias Brugger <matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>

Acked-by: Mathias Nyman <mathias.nyman-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: mathias.nyman@linux.intel.com (Mathias Nyman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/6] usb: xhci-mtk: use __maybe_unused to hide pm functions
Date: Thu, 10 Mar 2016 13:42:37 +0200	[thread overview]
Message-ID: <56E15DAD.3000104@linux.intel.com> (raw)
In-Reply-To: <56D9B8EE.3060107@gmail.com>

On 04.03.2016 18:33, Matthias Brugger wrote:
>
>
> On 02/03/16 16:24, Arnd Bergmann wrote:
>> The mediatek XHCI glue driver uses SET_SYSTEM_SLEEP_PM_OPS() to
>> conditionally set the correct suspend/resume options, and
>> also puts both the dev_pm_ops and the functions inside of
>> an #ifdef testing for CONFIG_PM_SLEEP, but those functions
>> then call other code that becomes unused:
>>
>> drivers/usb/host/xhci-mtk.c:135:12: error: 'xhci_mtk_host_disable' defined but not used [-Werror=unused-function]
>> drivers/usb/host/xhci-mtk.c:313:13: error: 'usb_wakeup_enable' defined but not used [-Werror=unused-function]
>> drivers/usb/host/xhci-mtk.c:321:13: error: 'usb_wakeup_disable' defined but not used [-Werror=unused-function]
>>
>> This replaces the #ifdef with __maybe_unused annotations so the
>> compiler knows it can silently drop them instead of warning.
>>
>> For the DEV_PM_OPS definition, we can use an IS_ENABLED() check
>> to avoid defining the structure when CONFIG_PM is not set without
>> the #ifdef.
>>
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> ---
>
> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
>

Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>

WARNING: multiple messages have this Message-ID (diff)
From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Matthias Brugger <matthias.bgg@gmail.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-arm-kernel@lists.infradead.org,
	Felipe Balbi <balbi@kernel.org>,
	Alan Stern <stern@rowland.harvard.edu>,
	linux-usb@vger.kernel.org,
	Mathias Nyman <mathias.nyman@intel.com>,
	linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/6] usb: xhci-mtk: use __maybe_unused to hide pm functions
Date: Thu, 10 Mar 2016 13:42:37 +0200	[thread overview]
Message-ID: <56E15DAD.3000104@linux.intel.com> (raw)
In-Reply-To: <56D9B8EE.3060107@gmail.com>

On 04.03.2016 18:33, Matthias Brugger wrote:
>
>
> On 02/03/16 16:24, Arnd Bergmann wrote:
>> The mediatek XHCI glue driver uses SET_SYSTEM_SLEEP_PM_OPS() to
>> conditionally set the correct suspend/resume options, and
>> also puts both the dev_pm_ops and the functions inside of
>> an #ifdef testing for CONFIG_PM_SLEEP, but those functions
>> then call other code that becomes unused:
>>
>> drivers/usb/host/xhci-mtk.c:135:12: error: 'xhci_mtk_host_disable' defined but not used [-Werror=unused-function]
>> drivers/usb/host/xhci-mtk.c:313:13: error: 'usb_wakeup_enable' defined but not used [-Werror=unused-function]
>> drivers/usb/host/xhci-mtk.c:321:13: error: 'usb_wakeup_disable' defined but not used [-Werror=unused-function]
>>
>> This replaces the #ifdef with __maybe_unused annotations so the
>> compiler knows it can silently drop them instead of warning.
>>
>> For the DEV_PM_OPS definition, we can use an IS_ENABLED() check
>> to avoid defining the structure when CONFIG_PM is not set without
>> the #ifdef.
>>
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> ---
>
> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
>

Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>

  parent reply	other threads:[~2016-03-10 11:42 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-02 15:24 usb: avoid warnings for unused pm functions Arnd Bergmann
2016-03-02 15:24 ` [PATCH 1/6] usb: host: unhide suspend/resume declarations Arnd Bergmann
2016-03-02 15:24   ` Arnd Bergmann
2016-03-02 15:58   ` Alan Stern
2016-03-02 15:58     ` Alan Stern
2016-03-02 15:24 ` [PATCH 2/6] usb: xhci-mtk: use __maybe_unused to hide pm functions Arnd Bergmann
2016-03-02 15:24   ` Arnd Bergmann
     [not found]   ` <1456932255-71725-3-git-send-email-arnd-r2nGTMty4D4@public.gmane.org>
2016-03-04 16:33     ` Matthias Brugger
2016-03-04 16:33       ` Matthias Brugger
2016-03-04 16:33       ` Matthias Brugger
     [not found]       ` <56D9B8EE.3060107-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-03-10 11:42         ` Mathias Nyman [this message]
2016-03-10 11:42           ` Mathias Nyman
2016-03-10 11:42           ` Mathias Nyman
2016-03-02 15:24 ` [PATCH 3/6] usb: ohci-at91: " Arnd Bergmann
2016-03-02 15:24   ` Arnd Bergmann
2016-03-02 15:34   ` Nicolas Ferre
2016-03-02 15:34     ` Nicolas Ferre
2016-03-02 15:24 ` [PATCH 4/6] usb: ehci-atmel: " Arnd Bergmann
2016-03-02 15:24   ` Arnd Bergmann
2016-03-02 15:34   ` Nicolas Ferre
2016-03-02 15:34     ` Nicolas Ferre
2016-03-02 15:24 ` [PATCH 5/6] phy: dm816x: " Arnd Bergmann
2016-03-02 15:24   ` Arnd Bergmann
2016-03-02 15:24 ` [PATCH 6/6] phy: twl4030: " Arnd Bergmann
2016-03-02 15:24   ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56E15DAD.3000104@linux.intel.com \
    --to=mathias.nyman-vuqaysv1563yd54fqh9/ca@public.gmane.org \
    --cc=arnd-r2nGTMty4D4@public.gmane.org \
    --cc=balbi-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mathias.nyman-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.