mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Rustad <mrustad@gmail.com>
To: Al Viro <viro@ftp.linux.org.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	anil.s.keshavamurthy@intel.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] intel-iommu fixes
Date: Mon, 29 Oct 2007 10:25:54 -0500	[thread overview]
Message-ID: <8B618420-85D9-415C-8FE5-38D32235A623@gmail.com> (raw)
In-Reply-To: <20071029045116.GB8181@ftp.linux.org.uk>

On Oct 28, 2007, at 11:51 PM, Al Viro wrote:

> 	* off by one in dmar_get_fault_reason() (maximal index in
> array is ARRAY_SIZE()-1, not ARRAY_SIZE())
> 	* NULL noise removal
> 	* __iomem annotation fix
>
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> ---
> diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
> index 0c4ab3b..9b35259 100644
> --- a/drivers/pci/intel-iommu.c
> +++ b/drivers/pci/intel-iommu.c
> @@ -745,7 +745,7 @@ static char *fault_reason_strings[] =
>  	"non-zero reserved fields in PTE",
>  	"Unknown"
>  };
> -#define MAX_FAULT_REASON_IDX 	ARRAY_SIZE(fault_reason_strings)
> +#define MAX_FAULT_REASON_IDX 	ARRAY_SIZE(fault_reason_strings) - 1

This define now should really have ()'s around its value now that it  
is an expression to avoid potential problems at its reference sites.

<snip>

-- 
Mark Rustad, MRustad@gmail.com



  reply	other threads:[~2007-10-29 15:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-29  4:51 Al Viro
2007-10-29 15:25 ` Mark Rustad [this message]
2007-10-29 16:52 ` Mark Gross
2007-11-16  7:14 ` Denys Vlasenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8B618420-85D9-415C-8FE5-38D32235A623@gmail.com \
    --to=mrustad@gmail.com \
    --cc=anil.s.keshavamurthy@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@ftp.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®