2014-07-01 19:02:11

by Fabian Frédérick

[permalink] [raw]
Subject: [PATCH 1/1] drm/bochs: replace ALIGN(PAGE_SIZE) by PAGE_ALIGN

use mm.h definition

Cc: David Airlie <[email protected]>
Cc: David Herrmann <[email protected]>
Cc: [email protected]
Signed-off-by: Fabian Frederick <[email protected]>
---
drivers/gpu/drm/bochs/bochs_mm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/bochs/bochs_mm.c b/drivers/gpu/drm/bochs/bochs_mm.c
index b9a695d..1728a1b 100644
--- a/drivers/gpu/drm/bochs/bochs_mm.c
+++ b/drivers/gpu/drm/bochs/bochs_mm.c
@@ -387,7 +387,7 @@ int bochs_gem_create(struct drm_device *dev, u32 size, bool iskernel,

*obj = NULL;

- size = ALIGN(size, PAGE_SIZE);
+ size = PAGE_ALIGN(size);
if (size == 0)
return -EINVAL;

--
1.9.1


2014-07-01 20:34:46

by David Herrmann

[permalink] [raw]
Subject: Re: [PATCH 1/1] drm/bochs: replace ALIGN(PAGE_SIZE) by PAGE_ALIGN

Hi

On Tue, Jul 1, 2014 at 9:02 PM, Fabian Frederick <[email protected]> wrote:
> use mm.h definition
>
> Cc: David Airlie <[email protected]>
> Cc: David Herrmann <[email protected]>
> Cc: [email protected]
> Signed-off-by: Fabian Frederick <[email protected]>

Hm, this is defined in mm.h and we include it via drmP.h, which is
weird, but ok.

Reviewed-by: David Herrmann <[email protected]>

Thanks
David

> ---
> drivers/gpu/drm/bochs/bochs_mm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/bochs/bochs_mm.c b/drivers/gpu/drm/bochs/bochs_mm.c
> index b9a695d..1728a1b 100644
> --- a/drivers/gpu/drm/bochs/bochs_mm.c
> +++ b/drivers/gpu/drm/bochs/bochs_mm.c
> @@ -387,7 +387,7 @@ int bochs_gem_create(struct drm_device *dev, u32 size, bool iskernel,
>
> *obj = NULL;
>
> - size = ALIGN(size, PAGE_SIZE);
> + size = PAGE_ALIGN(size);
> if (size == 0)
> return -EINVAL;
>
> --
> 1.9.1
>