From patchwork Tue Oct 23 05:13:49 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fengguang Wu X-Patchwork-Id: 1628751 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 2F432DFAC4 for ; Tue, 23 Oct 2012 05:24:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753450Ab2JWFYO (ORCPT ); Tue, 23 Oct 2012 01:24:14 -0400 Received: from mga01.intel.com ([192.55.52.88]:13789 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752067Ab2JWFYM (ORCPT ); Tue, 23 Oct 2012 01:24:12 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 22 Oct 2012 22:24:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.80,633,1344236400"; d="diff'?scan'208";a="238851044" Received: from bee.sh.intel.com (HELO localhost) ([10.239.97.14]) by fmsmga002.fm.intel.com with ESMTP; 22 Oct 2012 22:14:05 -0700 Received: from [192.168.1.61] (helo=snb.lkp.intel.com) by localhost with smtp (Exim 4.80) (envelope-from ) id 1TQWms-0000Iv-9x; Tue, 23 Oct 2012 13:12:22 +0800 Date: Tue, 23 Oct 2012 13:13:49 +0800 From: Fengguang Wu To: Rajagopal Venkat Cc: linux-pm@vger.kernel.org, "Rafael J. Wysocki" Subject: drivers/devfreq/governor_simpleondemand.c:92:5: sparse: symbol 'devfreq_simple_ondemand_handler' was not declared. Should it be static? Message-ID: <5086278d.Wk+4wZ82+5/DqqJn%fengguang.wu@intel.com> User-Agent: Heirloom mailx 12.5 6/20/10 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 192.168.1.61 X-SA-Exim-Mail-From: fengguang.wu@intel.com X-SA-Exim-Scanned: No (on localhost); SAEximRunCond expanded to false Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Hi Rajagopal, FYI, there are new sparse warnings show up in tree: git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next head: 13f5e2d9a915373dd1573d8fe0214738bc69004f commit: 5001044272888cc4c1aa7e29b0e601b7719742f2 PM / devfreq: Core updates to support devices which can idle date: 6 hours ago + drivers/devfreq/governor_simpleondemand.c:92:5: sparse: symbol 'devfreq_simple_ondemand_handler' was not declared. Should it be static? --- + drivers/devfreq/governor_userspace.c:119:5: sparse: symbol 'devfreq_userspace_handler' was not declared. Should it be static? vim +92 drivers/devfreq/governor_simpleondemand.c ce26c5bb MyungJoo Ham 2011-10-02 76 /* Set the desired frequency based on the load */ ce26c5bb MyungJoo Ham 2011-10-02 77 a = stat.busy_time; ce26c5bb MyungJoo Ham 2011-10-02 78 a *= stat.current_frequency; ce26c5bb MyungJoo Ham 2011-10-02 79 b = div_u64(a, stat.total_time); ce26c5bb MyungJoo Ham 2011-10-02 80 b *= 100; ce26c5bb MyungJoo Ham 2011-10-02 81 b = div_u64(b, (dfso_upthreshold - dfso_downdifferential / 2)); ce26c5bb MyungJoo Ham 2011-10-02 82 *freq = (unsigned long) b; ce26c5bb MyungJoo Ham 2011-10-02 83 6530b9de MyungJoo Ham 2011-12-09 84 if (df->min_freq && *freq < df->min_freq) 6530b9de MyungJoo Ham 2011-12-09 85 *freq = df->min_freq; 6530b9de MyungJoo Ham 2011-12-09 86 if (df->max_freq && *freq > df->max_freq) 6530b9de MyungJoo Ham 2011-12-09 87 *freq = df->max_freq; 6530b9de MyungJoo Ham 2011-12-09 88 ce26c5bb MyungJoo Ham 2011-10-02 89 return 0; ce26c5bb MyungJoo Ham 2011-10-02 90 } ce26c5bb MyungJoo Ham 2011-10-02 91 50010442 Rajagopal Venkat 2012-10-23 @92 int devfreq_simple_ondemand_handler(struct devfreq *devfreq, 50010442 Rajagopal Venkat 2012-10-23 93 unsigned int event, void *data) 50010442 Rajagopal Venkat 2012-10-23 94 { 50010442 Rajagopal Venkat 2012-10-23 95 switch (event) { 50010442 Rajagopal Venkat 2012-10-23 96 case DEVFREQ_GOV_START: 50010442 Rajagopal Venkat 2012-10-23 97 devfreq_monitor_start(devfreq); 50010442 Rajagopal Venkat 2012-10-23 98 break; 50010442 Rajagopal Venkat 2012-10-23 99 50010442 Rajagopal Venkat 2012-10-23 100 case DEVFREQ_GOV_STOP: Please consider folding the attached diff :-) --- 0-DAY kernel build testing backend Open Source Technology Center Fengguang Wu, Yuanhan Liu Intel Corporation diff --git a/drivers/devfreq/governor_simpleondemand.c b/drivers/devfreq/governor_simpleondemand.c index cf94218..3716a65 100644 --- a/drivers/devfreq/governor_simpleondemand.c +++ b/drivers/devfreq/governor_simpleondemand.c @@ -89,7 +89,7 @@ static int devfreq_simple_ondemand_func(struct devfreq *df, return 0; } -int devfreq_simple_ondemand_handler(struct devfreq *devfreq, +static int devfreq_simple_ondemand_handler(struct devfreq *devfreq, unsigned int event, void *data) { switch (event) { diff --git a/drivers/devfreq/governor_userspace.c b/drivers/devfreq/governor_userspace.c index 1fddee5..7067555 100644 --- a/drivers/devfreq/governor_userspace.c +++ b/drivers/devfreq/governor_userspace.c @@ -116,7 +116,7 @@ static void userspace_exit(struct devfreq *devfreq) devfreq->data = NULL; } -int devfreq_userspace_handler(struct devfreq *devfreq, +static int devfreq_userspace_handler(struct devfreq *devfreq, unsigned int event, void *data) { int ret = 0;