Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1255839 > unrolled thread

[PATCH] arm64/mm: use PAGE_ALIGNED instead of IS_ALIGNED

Started byAlexander Kuleshov <kuleshovmail@gmail.com>
First post2015-10-26 12:30 +0100
Last post2015-10-28 19:40 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] arm64/mm: use PAGE_ALIGNED instead of IS_ALIGNED Alexander Kuleshov <kuleshovmail@gmail.com> - 2015-10-26 12:30 +0100
    Re: [PATCH] arm64/mm: use PAGE_ALIGNED instead of IS_ALIGNED Laura Abbott <laura@labbott.name> - 2015-10-26 21:10 +0100
    Re: [PATCH] arm64/mm: use PAGE_ALIGNED instead of IS_ALIGNED Catalin Marinas <catalin.marinas@arm.com> - 2015-10-28 19:40 +0100

#1255839 — [PATCH] arm64/mm: use PAGE_ALIGNED instead of IS_ALIGNED

FromAlexander Kuleshov <kuleshovmail@gmail.com>
Date2015-10-26 12:30 +0100
Subject[PATCH] arm64/mm: use PAGE_ALIGNED instead of IS_ALIGNED
Message-ID<qnO8q-7AK-27@gated-at.bofh.it>
The <linux/mm.h> already provides the PAGE_ALIGNED macro. Let's
use this macro instead of IS_ALIGNED and passing PAGE_SIZE directly.

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
---
 arch/arm64/mm/pageattr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/mm/pageattr.c b/arch/arm64/mm/pageattr.c
index e47ed1c..3571c73 100644
--- a/arch/arm64/mm/pageattr.c
+++ b/arch/arm64/mm/pageattr.c
@@ -45,7 +45,7 @@ static int change_memory_common(unsigned long addr, int numpages,
 	int ret;
 	struct page_change_data data;
 
-	if (!IS_ALIGNED(addr, PAGE_SIZE)) {
+	if (!PAGE_ALIGNED(addr)) {
 		start &= PAGE_MASK;
 		end = start + size;
 		WARN_ON_ONCE(1);
-- 
2.6.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/

[toc] | [next] | [standalone]


#1256233

FromLaura Abbott <laura@labbott.name>
Date2015-10-26 21:10 +0100
Message-ID<qnWfE-4d6-11@gated-at.bofh.it>
In reply to#1255839
On 10/26/15 4:26 AM, Alexander Kuleshov wrote:
> The <linux/mm.h> already provides the PAGE_ALIGNED macro. Let's
> use this macro instead of IS_ALIGNED and passing PAGE_SIZE directly.
>
> Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>

Acked-by: Laura Abbott <laura@labbott.name>

> ---
>   arch/arm64/mm/pageattr.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/mm/pageattr.c b/arch/arm64/mm/pageattr.c
> index e47ed1c..3571c73 100644
> --- a/arch/arm64/mm/pageattr.c
> +++ b/arch/arm64/mm/pageattr.c
> @@ -45,7 +45,7 @@ static int change_memory_common(unsigned long addr, int numpages,
>   	int ret;
>   	struct page_change_data data;
>
> -	if (!IS_ALIGNED(addr, PAGE_SIZE)) {
> +	if (!PAGE_ALIGNED(addr)) {
>   		start &= PAGE_MASK;
>   		end = start + size;
>   		WARN_ON_ONCE(1);
>

--
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/

[toc] | [prev] | [next] | [standalone]


#1258360

FromCatalin Marinas <catalin.marinas@arm.com>
Date2015-10-28 19:40 +0100
Message-ID<qoDND-6j4-11@gated-at.bofh.it>
In reply to#1255839
On Mon, Oct 26, 2015 at 05:26:57PM +0600, Alexander Kuleshov wrote:
> The <linux/mm.h> already provides the PAGE_ALIGNED macro. Let's
> use this macro instead of IS_ALIGNED and passing PAGE_SIZE directly.
> 
> Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>

Queued for 4.4. Thanks.

-- 
Catalin
--
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/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web