[PATCH 4/9] iommu/arm-smmu: Check for num_context_irqs > 0 to avoid divide by zero exception
Andreas Herrmann
andreas.herrmann at calxeda.com
Fri Sep 27 07:07:56 EDT 2013
On Fri, Sep 27, 2013 at 06:48:02AM -0400, Will Deacon wrote:
> 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:
> > > 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?
I can do it.
(Have to update other patches anyway.)
Andreas
More information about the linux-arm-kernel
mailing list