Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1284826
| Path | csiph.com!au2pb.net!feeder.erje.net!2.eu.feeder.erje.net!goblin3!goblin2!goblin.stu.neva.ru!gothmog.csi.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Zhaoxiu Zeng <zhaoxiu.zeng@gmail.com> |
| Newsgroups | linux.kernel |
| Subject | [PATCH 01/10] sh: Replace "hweight_long(flags) != 1" with "!is_power_of_2(flags)" |
| Date | Sun, 06 Dec 2015 11:00:02 +0100 |
| Message-ID | <qCEgO-5hr-17@gated-at.bofh.it> (permalink) |
| X-Original-To | linux-sh@vger.kernel.org |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=m5MJEyhFngxrf3fiyO+SLFS2Z59CQPIWvYtQvGZ+Mzg=; b=wymKFl5ssUOMLf6hoAZyMfT1Owj98tPFmRrIWpE3snNwuutRpOmw3wsPORiKtXa2ly pZnNTM9/zT7WxYPeMecaHnZbvQ3Lp/tYWwYRFjDoAW9ZRKreQPkGXdzLH+L959mTsOUC hbyY+5twfEKHeZFsbJDLGQCP/WWW8pRbteWOS3egdXG/3GJwNg1hdWt8cQ9oWHM/u/YP FxfKA5f7U7O/hQwkU6Od7gkSc68Sd9LMzjrXrFtGQZInUlU63SO9ZDestZEXwZStZNZj xNpOgJIupK7bnFgGF7FqBszE6btkaRKi3uYnCie4ZKMZ8P9WndpHUi/votRabhwtvRsV CU7Q== |
| X-Received | by 10.98.14.129 with SMTP id 1mr34769767pfo.161.1449395026986; Sun, 06 Dec 2015 01:43:46 -0800 (PST) |
| X-Mailer | git-send-email 2.5.0 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 36 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-kernel@vger.kernel.org, Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com> |
| X-Original-Date | Sun, 6 Dec 2015 17:42:22 +0800 |
| X-Original-Message-ID | <1449394942-13964-1-git-send-email-zhaoxiu.zeng@gmail.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1284826 |
Show key headers only | View raw
From: Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com> Signed-off-by: Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com> --- arch/sh/kernel/io_trapped.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/sh/kernel/io_trapped.c b/arch/sh/kernel/io_trapped.c index f8ce362..d8f32bf 100644 --- a/arch/sh/kernel/io_trapped.c +++ b/arch/sh/kernel/io_trapped.c @@ -15,6 +15,7 @@ #include <linux/vmalloc.h> #include <linux/module.h> #include <linux/init.h> +#include <linux/log2.h> #include <asm/mmu_context.h> #include <asm/uaccess.h> #include <asm/io.h> @@ -62,7 +63,7 @@ int register_trapped_io(struct trapped_io *tiop) } /* support IORESOURCE_IO _or_ MEM, not both */ - if (hweight_long(flags) != 1) + if (!is_power_of_2(flags)) goto bad; n = len >> PAGE_SHIFT; -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 01/10] sh: Replace "hweight_long(flags) != 1" with "!is_power_of_2(flags)" Zhaoxiu Zeng <zhaoxiu.zeng@gmail.com> - 2015-12-06 11:00 +0100
csiph-web