Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751481AbbD3Eqr (ORCPT ); Thu, 30 Apr 2015 00:46:47 -0400 Received: from smtprelay0033.hostedemail.com ([216.40.44.33]:60190 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750871AbbD3Eqo (ORCPT ); Thu, 30 Apr 2015 00:46:44 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 50,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::,RULES_HIT:41:355:379:541:599:967:973:988:989:1260:1261:1263:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1543:1593:1594:1711:1730:1747:1777:1792:2393:2525:2561:2564:2682:2685:2828:2859:2910:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3353:3622:3657:3770:3865:3866:3867:3870:3871:3872:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4250:4321:4605:5007:6117:6119:7652:7901:7903:8599:8957:9010:9025:9121:9388:10004:10400:10848:11026:11232:11253:11473:11658:11854:11914:12043:12214:12219:12296:12438:12517:12519:12555:12740:12776:13019:13095:13255:14096:14097:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: snail73_1d71863f17463 X-Filterd-Recvd-Size: 4557 Message-ID: <1430369201.2575.10.camel@perches.com> Subject: Re: [PATCH V2 linux-next] cpufreq: pxa: replace typedef pxa_freqs_t by structure From: Joe Perches To: Fabian Frederick Cc: linux-kernel@vger.kernel.org, "Rafael J. Wysocki" , Viresh Kumar , linux-pm@vger.kernel.org Date: Wed, 29 Apr 2015 21:46:41 -0700 In-Reply-To: <1430335980-9765-1-git-send-email-fabf@skynet.be> References: <1430335980-9765-1-git-send-email-fabf@skynet.be> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3812 Lines: 100 On Wed, 2015-04-29 at 21:32 +0200, Fabian Frederick wrote: > typedef is not really useful here. Replace it by structure > to improve readability.typedef should only be used in some cases. > (See Documentation/CodingStyle Chapter 5 for details). trivia: > diff --git a/drivers/cpufreq/pxa2xx-cpufreq.c b/drivers/cpufreq/pxa2xx-cpufreq.c [] > @@ -86,7 +86,7 @@ static unsigned int sdram_rows; > /* Use the run mode frequencies for the CPUFREQ_POLICY_PERFORMANCE policy */ > #define CCLKCFG CCLKCFG_TURBO | CCLKCFG_FCS > > -static pxa_freqs_t pxa255_run_freqs[] = > +static struct pxa_freqs pxa255_run_freqs[] = Should these be const? > { > /* CPU MEMBUS CCCR DIV2 CCLKCFG run turbo PXbus SDRAM */ > { 99500, 99500, 0x121, 1, CCLKCFG, -1, -1}, /* 99, 99, 50, 50 */ > @@ -98,7 +98,7 @@ static pxa_freqs_t pxa255_run_freqs[] = > }; > > /* Use the turbo mode frequencies for the CPUFREQ_POLICY_POWERSAVE policy */ > -static pxa_freqs_t pxa255_turbo_freqs[] = > +static struct pxa_freqs pxa255_turbo_freqs[] = > { > /* CPU MEMBUS CCCR DIV2 CCLKCFG run turbo PXbus SDRAM */ > { 99500, 99500, 0x121, 1, CCLKCFG, -1, -1}, /* 99, 99, 50, 50 */ > @@ -153,7 +153,7 @@ MODULE_PARM_DESC(pxa255_turbo_table, "Selects the frequency table (0 = run table > ((HT) ? CCLKCFG_HALFTURBO : 0) | \ > ((T) ? CCLKCFG_TURBO : 0)) > > -static pxa_freqs_t pxa27x_freqs[] = { > +static struct pxa_freqs pxa27x_freqs[] = { > {104000, 104000, PXA27x_CCCR(1, 8, 2), 0, CCLKCFG2(1, 0, 1), 900000, 1705000 }, > {156000, 104000, PXA27x_CCCR(1, 8, 3), 0, CCLKCFG2(1, 0, 1), 1000000, 1705000 }, > {208000, 208000, PXA27x_CCCR(0, 16, 2), 1, CCLKCFG2(0, 0, 1), 1180000, 1705000 }, > @@ -171,7 +171,7 @@ extern unsigned get_clk_frequency_khz(int info); > > #ifdef CONFIG_REGULATOR > > -static int pxa_cpufreq_change_voltage(pxa_freqs_t *pxa_freq) > +static int pxa_cpufreq_change_voltage(struct pxa_freqs *pxa_freq) > { > int ret = 0; > int vmin, vmax; > @@ -202,7 +202,7 @@ static void __init pxa_cpufreq_init_voltages(void) > } > } > #else > -static int pxa_cpufreq_change_voltage(pxa_freqs_t *pxa_freq) > +static int pxa_cpufreq_change_voltage(struct pxa_freqs *pxa_freq) > { > return 0; > } > @@ -211,7 +211,7 @@ static void __init pxa_cpufreq_init_voltages(void) { } > #endif > > static void find_freq_tables(struct cpufreq_frequency_table **freq_table, > - pxa_freqs_t **pxa_freqs) > + struct pxa_freqs **pxa_freqs) > { > if (cpu_is_pxa25x()) { > if (!pxa255_turbo_table) { > @@ -270,7 +270,7 @@ static unsigned int pxa_cpufreq_get(unsigned int cpu) > static int pxa_set_target(struct cpufreq_policy *policy, unsigned int idx) > { > struct cpufreq_frequency_table *pxa_freqs_table; > - pxa_freqs_t *pxa_freq_settings; > + struct pxa_freqs *pxa_freq_settings; > unsigned long flags; > unsigned int new_freq_cpu, new_freq_mem; > unsigned int unused, preset_mdrefr, postset_mdrefr, cclkcfg; > @@ -361,7 +361,7 @@ static int pxa_cpufreq_init(struct cpufreq_policy *policy) > int i; > unsigned int freq; > struct cpufreq_frequency_table *pxa255_freq_table; > - pxa_freqs_t *pxa255_freqs; > + struct pxa_freqs *pxa255_freqs; > > /* try to guess pxa27x cpu */ > if (cpu_is_pxa27x()) > -- > 1.9.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/