On Sat, 6 Sep 2008, Thomas Gleixner wrote:No. I'm telling you, because that patch IS CRAP. You can move that thing _out_ into a function of its own. Look at this piece fo CRAP, and tell me, HOW MANY TIMES do you want to repeat it? + /* + * Return the fast_calibrate value when neither hpet + * nor pmtimer are available. + */ + if (!hpet && !ref1 && !ref2) { + printk("Fast TSC calibration using PIT\n"); + return fast_calibrate; + } + + /* Check, whether the sampling was disturbed by an SMI */ + if (tsc1 == ULLONG_MAX || tsc2 == ULLONG_MAX) + goto slowpath; + + tsc2 = (tsc2 - tsc1) * 1000000LL; + if (hpet) + tsc2 = calc_hpet_ref(tsc2, ref1, ref2); + else + tsc2 = calc_pmtimer_ref(tsc2, ref1, ref2); + + /* Check the reference deviation */ + delta = ((u64) fast_calibrate) * 100; + do_div(delta, tsc2); + + if (delta >= 90 && delta <= 110) { + printk("Fast TSC calibration using PIT\n"); + return fast_calibrate; + } + } Here's a hint: we don't do cut-and-paste programming. And we don't get extra points for bloating a single function with the same unreadable code over and over and over again. How many copies do you want? And here's a hint: the answer is _one_. If you get any other answer, your patch is SHIT. Linus --
| Greg KH | Og dreams of kernels |
| Jens Axboe | [PATCH 31/33] Fusion: sg chaining support |
| Arnd Bergmann | Re: finding your own dead "CONFIG_" variables |
| Mark Brown | [PATCH 2/2] Subject: natsemi: Allow users to disable workaround for DspCfg reset |
| Tony Breeds | [LGUEST] Look in object dir for .config |
git: | |
| Brian Downing | Re: Git in a Nutshell guide |
| John Benes | Re: master has some toys |
| Matthias Lederhofer | [PATCH 4/7] introduce GIT_WORK_TREE to specify the work tree |
| Alexander Sulfrian | [RFC/PATCH] RE: git calls SSH_ASKPASS even if DISPLAY is not set |
| Junio C Hamano | Re: Rss produced by git is not valid xml? |
