From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Walleij Subject: Re: [PATCH] cpufreq: integrator: fix integrator_cpufreq_remove return type Date: Thu, 2 Oct 2014 10:28:44 +0200 Message-ID: References: <1845195.odREGsY0qB@wuerfel> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from mail-ig0-f180.google.com ([209.85.213.180]:33400 "EHLO mail-ig0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751180AbaJBI2p (ORCPT ); Thu, 2 Oct 2014 04:28:45 -0400 Received: by mail-ig0-f180.google.com with SMTP id uq10so1954962igb.13 for ; Thu, 02 Oct 2014 01:28:44 -0700 (PDT) In-Reply-To: <1845195.odREGsY0qB@wuerfel> Sender: linux-pm-owner@vger.kernel.org List-Id: linux-pm@vger.kernel.org To: Arnd Bergmann Cc: Viresh Kumar , "Rafael J. Wysocki" , Russell King , "linux-arm-kernel@lists.infradead.org" , "linux-pm@vger.kernel.org" On Fri, Sep 26, 2014 at 10:19 PM, Arnd Bergmann wrote: > When building this driver as a module, we get a helpful warning > about the return type: > > drivers/cpufreq/integrator-cpufreq.c:232:2: warning: initialization from incompatible pointer type > .remove = __exit_p(integrator_cpufreq_remove), > > If the remove callback returns void, the caller gets an undefined > value as it expects an integer to be returned. This fixes the > problem by passing down the value from cpufreq_unregister_driver. > > Signed-off-by: Arnd Bergmann Acked-by: Linus Walleij Yours, Linus Walleij From mboxrd@z Thu Jan 1 00:00:00 1970 From: linus.walleij@linaro.org (Linus Walleij) Date: Thu, 2 Oct 2014 10:28:44 +0200 Subject: [PATCH] cpufreq: integrator: fix integrator_cpufreq_remove return type In-Reply-To: <1845195.odREGsY0qB@wuerfel> References: <1845195.odREGsY0qB@wuerfel> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Fri, Sep 26, 2014 at 10:19 PM, Arnd Bergmann wrote: > When building this driver as a module, we get a helpful warning > about the return type: > > drivers/cpufreq/integrator-cpufreq.c:232:2: warning: initialization from incompatible pointer type > .remove = __exit_p(integrator_cpufreq_remove), > > If the remove callback returns void, the caller gets an undefined > value as it expects an integer to be returned. This fixes the > problem by passing down the value from cpufreq_unregister_driver. > > Signed-off-by: Arnd Bergmann Acked-by: Linus Walleij Yours, Linus Walleij