On Tue, Sep 25, 2007 at 02:20:01AM +0200, roel wrote: > > > > if ((c->x86_vendor != X86_VENDOR_AMD) || (c->x86 != 5) || > > > > ((c->x86_model != 12) && (c->x86_model != 13))) > > > > > > while we're at it, we could change this to > > > > > > if (!(c->x86_vendor == X86_VENDOR_AMD && c->x86 == 5 && > > > (c->x86_model == 12 || c->x86_model == 13))) > > > > For what purpose? There's nothing wrong with the code as it stands, > > and inverting the tests means we'd have to move a bunch of > > code inside the if arm instead of just returning -ENODEV. > > It's not inverting the test, so you don't need to move code. It evaluates > the same, only the combined negation is moved to the front. I suggested it > to increase clarity, it results in the same assembly language. I don't see it as being particularly more readable after this change. In fact, the reverse, as my previous comment implied, I missed the initial ! Given this code works fine, and there's no discernable gain from changing it, I'm not particularly enthusiastic about this modification. Dave -- http://www.codemonkey.org.uk -
| H. Peter Anvin | Re: [rft] s2ram wakeup moves to .c, could fix few machines |
| Greg Kroah-Hartman | [PATCH 002/196] Chinese: rephrase English introduction in HOWTO |
| Ingo Molnar | [patch] PID namespace design bug, workaround |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
git: | |
| Eric Dumazet | Re: Multicast packet loss |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | [GIT]: Networking |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
