The patch changes the code to:
> if (ap->nr_pmp_links) {
> + int dev_num;
> dereg = ioread32(hcr_base + DE);
...
> + dev_num = ffs(dereg)-1;
> + if (dev_num < ap->nr_pmp_links) {
> + link = &ap->pmp_link[dev_num];
On the off chance that no bits are set in 'DE' this
code depends on nr_pmp_links being unsigned (since
dev_num becomes -1.
Changing 'dev_num' to 'unsigned int' would be better.
David
_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://lists.ozlabs.org/listinfo/linuxppc-dev