From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ralph Sennhauser Subject: Re: [PATCH 1/4] gpio: mvebu: Add limited PWM support Date: Tue, 21 Mar 2017 07:31:56 +0100 Message-ID: <20170321073156.12c0c0bc@gmail.com> References: <20170316064218.9169-1-ralph.sennhauser@gmail.com> <20170316064218.9169-2-ralph.sennhauser@gmail.com> <20170317101747.67a09ccd@gmail.com> <20170320135131.GP22463@ulmo.ba.sec> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20170320135131.GP22463@ulmo.ba.sec> Sender: linux-kernel-owner@vger.kernel.org To: Thierry Reding Cc: Linus Walleij , "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 List-Id: linux-gpio@vger.kernel.org On Mon, 20 Mar 2017 14:51:31 +0100 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. > > Thierry What is a !PM configuration if not "# CONFIG_PWM is not set" in .config? I'd really like to trigger those warnings myself respectively understand where they come from. Thanks Ralph