uch doubt an expression like "sample & 0x3"
will work correctly. Same thing on the line above
FAIL_IF(EV_CODE_EXTRACT(event.attr.config, sample >> 2) !=
get_mmcra_rand_samp_elig(get_reg_value(intr_regs, "MMCRA"), 4));
"sample >> 2" doesn't look like a valid token to me.
Regards
David Binderman
ion into signed variable, sanity check it,
then assign it to an unsigned variable.
Also, use of the gcc compiler flag -Wtype-limits will show up this kind of
problem in future.
Regards
David Binderman
Hello there,
linux-4.14-rc3/arch/powerpc/perf/imc-pmu.c:599]: (style) Unsigned variable
'ncpu' can't be negative so it is unnecessary to test it.
Source code is
if (ncpu >= 0 && ncpu < nr_cpu_ids) {
but
unsigned int ncpu, core_id;
Suggest remove test.
Regards
David Binderman
Hello there,
linux-4.14-rc1/arch/powerpc/perf/hv-24x7.c:543]: (warning) Identical condition
's1<s2', second condition is always false
Source code is
if (s1 < s2)
return 1;
if (s2 > s1)
return -1;
Suggest code rework.
Regards
David Binderman
int?
I don't know the code, but given that insn is unsigned long and so can go
past 32 bits, using a cast to unsigned int might throw away the
possibly important
upper bits.
Regards
David Binderman
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
is
'unsigned long'.
Source code is
static inline int print_insn_powerpc(unsigned long insn, unsigned long memaddr)
{
printf("%.8x", insn);
return 0;
}
static inline int print_insn_spu(unsigned long insn, unsigned long memaddr)
{
printf("%.8x", insn);
return
Hello there,
linux-4.7-rc5/arch/powerpc/platforms/512x/clock-commonclk.c:824]:
(warning) %d in format string (no. 1) requires 'int' but the argument
type is 'size_t {aka unsigned long}'.
Source code is
snprintf(name, sizeof(name), "psc%d", mclk_idx);
Regards
David
ch, it looks ok to me.
Regards
David Binderman
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
gest new code
emac = finddevice("/plb/opb/ethernet");
if (emac != 0) {
Regards
David Binderman
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
-level != level,
cache level mismatch on lookup (got %d, expected %d)\n,
cache-level, level);
if (!cache)
I agree with cppcheck. Suggest code rework.
Regards
David Binderman
___
Linuxppc
10 matches
Mail list logo