Thread (43 messages) 43 messages, 3 authors, 2013-10-08
STALE4629d

[PATCH 4/9] iommu/arm-smmu: Check for num_context_irqs > 0 to avoid divide by zero exception

From: Will Deacon <hidden>
Date: 2013-09-27 10:48:02
Also in: linux-iommu

On Fri, Sep 27, 2013 at 11:39:49AM +0100, Andreas Herrmann wrote:
On Fri, Sep 27, 2013 at 06:23:07AM -0400, Will Deacon wrote:
quoted
What do you think?
Yes, that should suffice.

I know it's clear for us but what about a short comment to emphasize
that we expect to find at least one context irq?

-       if (num_irqs < smmu->num_global_irqs) {
+       /* expect num_global_irqs plus at least one context irq */
+       if (num_irqs <= smmu->num_global_irqs) {

which can be translated to

-       if (num_irqs < smmu->num_global_irqs) {
+       if (!smmu->num_context_irqs) {
Even better! Do you want to send a patch, or shall I just create one myself?

Will
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help