--- files/oprofile-1.0.0-athlon.patch 1 Dec 2014 06:39:59 -0000 1.1 +++ files/oprofile-1.0.0-athlon.patch 4 Feb 2015 11:07:27 -0000 @@ -1,14 +1,14 @@ Fix AMD Athlon CPU family recognition. See upstream bug 275 for details: https://sourceforge.net/p/oprofile/bugs/275/ ---- oprofile-1.0.0/libop/op_cpu_type.c.orig 2014-09-12 18:39:47.000000000 +0400 -+++ oprofile-1.0.0/libop/op_cpu_type.c 2014-11-30 18:29:00.328342552 +0300 +--- a/libop/op_cpu_type.c ++++ b/libop/op_cpu_type.c @@ -538,10 +538,13 @@ family = cpu_family(eax); /* These family does not exist in the past.*/ - if (family < 0x0f || family == 0x13) -+ if (family < 0x0f && family != 0x6 || family == 0x13) ++ if ((family < 0x0f && family != 0x06) || family == 0x13) return ret; switch (family) {
Hmmm, while proposed patch is harmless and I have no strong objection towards it, I still can't understand why such issues should be fixed at all. The C standard clearly says than && have precedence over || (clause 6.5.13 and 6.5.14). While gcc devs may suggest that they desire paretheses to be used via -Wparentheses, that's a pure whim and I see no reason why it should be followed. So, I'm not sure what to do here.
I would agree. The patch does add some clarity using parentheses and by having all hexadecimal arguments use the same format, though.
In tree now.