Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753104AbdCWKfU (ORCPT ); Thu, 23 Mar 2017 06:35:20 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:36520 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751239AbdCWKfM (ORCPT ); Thu, 23 Mar 2017 06:35:12 -0400 Date: Thu, 23 Mar 2017 11:35:02 +0100 From: Ralph Sennhauser To: Linus Walleij Cc: Thierry Reding , "linux-gpio@vger.kernel.org" , Andrew Lunn , Imre Kaloz , Alexandre Courbot , Rob Herring , Mark Rutland , Greg Kroah-Hartman , "David S. Miller" , Geert Uytterhoeven , Mauro Carvalho Chehab , Andrew Morton , Guenter Roeck , "open list:PWM SUBSYSTEM" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , open list Subject: Re: [PATCH 1/4] gpio: mvebu: Add limited PWM support Message-ID: <20170323113502.36830c40@gmail.com> In-Reply-To: References: <20170316064218.9169-1-ralph.sennhauser@gmail.com> <20170316064218.9169-2-ralph.sennhauser@gmail.com> <20170317101747.67a09ccd@gmail.com> <20170320135131.GP22463@ulmo.ba.sec> Organization: none X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1257 Lines: 31 On Thu, 23 Mar 2017 11:11:09 +0100 Linus Walleij wrote: > On Mon, Mar 20, 2017 at 2:51 PM, Thierry Reding > wrote: > > On Fri, Mar 17, 2017 at 10:17:47AM +0100, Ralph Sennhauser wrote: > >> On Thu, 16 Mar 2017 17:03:05 +0100 > >> Linus Walleij wrote: > > [...] > >> > > +static void mvebu_pwm_suspend(struct mvebu_gpio_chip *mvchip) > >> > > +static void mvebu_pwm_resume(struct mvebu_gpio_chip *mvchip) > >> > > >> > I think both of these need to be tagged __maybe_unused to not > >> > give noise in randconfig builds. > >> > >> I haven't seen any warnings with CONFIG_PWM disabled. Which > >> configuration you expect to trigger a warning? mvebu_pwm_probe > >> should be the same, right? > > > > It's got nothing to do with CONFIG_PWM and as far as I can tell your > > usage of IS_ENABLED() is fine here. However, if you try building the > > driver with a !PM configuration, both *_suspend() and *_resume() end > > up being unused and giving you a warning. > > Yes I was referring to the !PM case. Only this time around I did read !PM not as !PWM and so it became clear what you meant the first time around and why __maybe_unused is required. Thanks Ralph