* [PATCH 6/14] arch/mips/pmc-sierra/yosemite/setup.c: delete double assignment [not found] <1288088743-3725-1-git-send-email-julia@diku.dk> @ 2010-10-26 10:25 ` Julia Lawall 2010-11-09 0:48 ` Ralf Baechle 0 siblings, 1 reply; 3+ messages in thread From: Julia Lawall @ 2010-10-26 10:25 UTC (permalink / raw) To: Ralf Baechle; +Cc: kernel-janitors, linux-mips, linux-kernel From: Julia Lawall <julia@diku.dk> Delete successive assignments to the same location. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression i; @@ *i = ...; i = ...; // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> --- This change also makes the variable cpu_clock_freq be not used in the current file. If this is the correct change to plat_time_init, then perhaps the declaration of that variable should be moved elsewhere, or the variable should be deleted completely. arch/mips/pmc-sierra/yosemite/setup.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/mips/pmc-sierra/yosemite/setup.c b/arch/mips/pmc-sierra/yosemite/setup.c index 3498ac9..b56a924 100644 --- a/arch/mips/pmc-sierra/yosemite/setup.c +++ b/arch/mips/pmc-sierra/yosemite/setup.c @@ -140,8 +140,7 @@ int rtc_mips_set_time(unsigned long tim) void __init plat_time_init(void) { - mips_hpt_frequency = cpu_clock_freq / 2; -mips_hpt_frequency = 33000000 * 3 * 5; + mips_hpt_frequency = 33000000 * 3 * 5; } unsigned long ocd_base; ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 6/14] arch/mips/pmc-sierra/yosemite/setup.c: delete double assignment 2010-10-26 10:25 ` [PATCH 6/14] arch/mips/pmc-sierra/yosemite/setup.c: delete double assignment Julia Lawall @ 2010-11-09 0:48 ` Ralf Baechle 2010-11-09 7:10 ` Julia Lawall 0 siblings, 1 reply; 3+ messages in thread From: Ralf Baechle @ 2010-11-09 0:48 UTC (permalink / raw) To: Julia Lawall; +Cc: kernel-janitors, linux-mips, linux-kernel On Tue, Oct 26, 2010 at 12:25:35PM +0200, Julia Lawall wrote: > From: Julia Lawall <julia@diku.dk> > > Delete successive assignments to the same location. [...] > This change also makes the variable cpu_clock_freq be not used in the > current file. If this is the correct change to plat_time_init, then > perhaps the declaration of that variable should be moved elsewhere, or the > variable should be deleted completely. The 2nd assignment is a temporary override for debugging purpose that is it's there intionsionally. Thanks! Ralf ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 6/14] arch/mips/pmc-sierra/yosemite/setup.c: delete double assignment 2010-11-09 0:48 ` Ralf Baechle @ 2010-11-09 7:10 ` Julia Lawall 0 siblings, 0 replies; 3+ messages in thread From: Julia Lawall @ 2010-11-09 7:10 UTC (permalink / raw) To: Ralf Baechle; +Cc: kernel-janitors, linux-mips, linux-kernel On Tue, 9 Nov 2010, Ralf Baechle wrote: > On Tue, Oct 26, 2010 at 12:25:35PM +0200, Julia Lawall wrote: > > From: Julia Lawall <julia@diku.dk> > > > > Delete successive assignments to the same location. > > [...] > > > This change also makes the variable cpu_clock_freq be not used in the > > current file. If this is the correct change to plat_time_init, then > > perhaps the declaration of that variable should be moved elsewhere, or the > > variable should be deleted completely. > > The 2nd assignment is a temporary override for debugging purpose that is > it's there intionsionally. OK, thanks. I indeed suspected that, but I thought it might be worthwhile to mention it, in case it had outlived its usefulness. julia ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-11-09 7:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1288088743-3725-1-git-send-email-julia@diku.dk>
2010-10-26 10:25 ` [PATCH 6/14] arch/mips/pmc-sierra/yosemite/setup.c: delete double assignment Julia Lawall
2010-11-09 0:48 ` Ralf Baechle
2010-11-09 7:10 ` Julia Lawall
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox