All of lore.kernel.org
 help / color / mirror / Atom feed
From: FUJITA Tomonori <tomof@acm.org>
To: linux-kernel@vger.kernel.org
Cc: fujita.tomonori@lab.ntt.co.jp
Subject: [PATCH] iommu-helper: segment boundary limit should be a power of 2
Date: Sat, 16 Feb 2008 18:09:36 +0900	[thread overview]
Message-ID: <20080216180935E.tomof@acm.org> (raw)

The segment boundary limit should be a power of 2 so let's make it
clear.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
---
 lib/iommu-helper.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/lib/iommu-helper.c b/lib/iommu-helper.c
index 495575a..de0eced 100644
--- a/lib/iommu-helper.c
+++ b/lib/iommu-helper.c
@@ -54,6 +54,8 @@ unsigned long iommu_area_alloc(unsigned long *map, unsigned long size,
 			       unsigned long align_mask)
 {
 	unsigned long index;
+
+	BUG_ON(!is_power_of_2(boundary_size));
 again:
 	index = find_next_zero_area(map, size, start, nr, align_mask);
 	if (index != -1) {
-- 
1.5.3.7


                 reply	other threads:[~2008-02-16  9:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20080216180935E.tomof@acm.org \
    --to=tomof@acm.org \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.