From patchwork Fri Sep 26 20:19:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 4987291 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E97719F32B for ; Fri, 26 Sep 2014 20:19:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 19E8420200 for ; Fri, 26 Sep 2014 20:19:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 328C4201FB for ; Fri, 26 Sep 2014 20:19:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755363AbaIZUTq (ORCPT ); Fri, 26 Sep 2014 16:19:46 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:55610 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755205AbaIZUTq (ORCPT ); Fri, 26 Sep 2014 16:19:46 -0400 Received: from wuerfel.localnet (HSI-KBW-134-3-133-35.hsi14.kabel-badenwuerttemberg.de [134.3.133.35]) by mrelayeu.kundenserver.de (node=mreue102) with ESMTP (Nemesis) id 0MgwGe-1XtYgd0ZBQ-00M61l; Fri, 26 Sep 2014 22:19:15 +0200 From: Arnd Bergmann To: Viresh Kumar Cc: "Rafael J. Wysocki" , Linus Walleij , Russell King , linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org Subject: [PATCH] cpufreq: integrator: fix integrator_cpufreq_remove return type Date: Fri, 26 Sep 2014 22:19:12 +0200 Message-ID: <1845195.odREGsY0qB@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) MIME-Version: 1.0 X-Provags-ID: V02:K0:jwv8WAch8CIKhjIeHdJKPoaQihatZfs4l+5IORndJgW ZCaW4bwhEG5wcvxEMqTxsZIeepmiSlBImFl64Lh/Gct4jcA0h7 RKRlQt+hy79wRgWxq7WK8rbWwW+en+tWTFvoACMido33XsZUrG WJuXIC0S2gCXPO3IEvY9f8itjvFn9tdLel9+9LnxCeOn1qGuP0 kASRG7sUD3p5sR6iLSPe+LhcP3Awy0VnlvzTXpSzp6MrlKIs7E RMrZdAyddjaxXCmeqO/fEFu4EpYL6fMwReksJYTOFb3lTwOjzI rH+V1I5W3q/qomG128sBmb5PYIg6DYoFm9p0GUkCScRvv2q2Tf 9UkRu/dk7LXQHzOBTDkQ= X-UI-Out-Filterresults: notjunk:1; Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- Found while testing the integrator multiplatform patches from Linus Walleij, this shows up as a new warning in allmodconfig. -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/cpufreq/integrator-cpufreq.c b/drivers/cpufreq/integrator-cpufreq.c index c1320528b9d0..6bd69adc3c5e 100644 --- a/drivers/cpufreq/integrator-cpufreq.c +++ b/drivers/cpufreq/integrator-cpufreq.c @@ -213,9 +213,9 @@ static int __init integrator_cpufreq_probe(struct platform_device *pdev) return cpufreq_register_driver(&integrator_driver); } -static void __exit integrator_cpufreq_remove(struct platform_device *pdev) +static int __exit integrator_cpufreq_remove(struct platform_device *pdev) { - cpufreq_unregister_driver(&integrator_driver); + return cpufreq_unregister_driver(&integrator_driver); } static const struct of_device_id integrator_cpufreq_match[] = {