From patchwork Mon Jul 7 18:48:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Frederick X-Patchwork-Id: 4506341 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 60CE49F1C4 for ; Tue, 8 Jul 2014 16:12:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 937AC202FF for ; Tue, 8 Jul 2014 16:12:50 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 454452035D for ; Tue, 8 Jul 2014 16:12:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7F5676E583; Tue, 8 Jul 2014 09:12:20 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailrelay004.isp.belgacom.be (mailrelay004.isp.belgacom.be [195.238.6.170]) by gabe.freedesktop.org (Postfix) with ESMTP id 56C136E44D for ; Mon, 7 Jul 2014 11:50:10 -0700 (PDT) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmQNAPbqulNXQCU9/2dsb2JhbABZgw6segUBAQEBAQEFAW4BkiiHRYEbF3WECwIkLyOBCRE3iEYByUUXhXCJMh2ELQWYCoJsi0yIQINFOw Received: from 61.37-64-87.adsl-dyn.isp.belgacom.be (HELO linux-zvq9.site) ([87.64.37.61]) by relay.skynet.be with ESMTP; 07 Jul 2014 20:50:09 +0200 From: Fabian Frederick To: linux-kernel@vger.kernel.org Subject: [PATCH 1/1] drm: replace ALIGN(PAGE_SIZE) by PAGE_ALIGN Date: Mon, 7 Jul 2014 20:48:48 +0200 Message-Id: <1404758928-10936-1-git-send-email-fabf@skynet.be> X-Mailer: git-send-email 1.8.4.5 X-Mailman-Approved-At: Tue, 08 Jul 2014 09:12:18 -0700 Cc: Fabian Frederick , Alex Deucher , dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP use mm.h definition Cc: Alex Deucher Cc: David Airlie Cc: dri-devel@lists.freedesktop.org Signed-off-by: Fabian Frederick --- drivers/gpu/drm/radeon/radeon_fb.c | 2 +- drivers/gpu/drm/radeon/radeon_gem.c | 2 +- drivers/gpu/drm/radeon/radeon_object.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_fb.c b/drivers/gpu/drm/radeon/radeon_fb.c index 665ced3..9f82605 100644 --- a/drivers/gpu/drm/radeon/radeon_fb.c +++ b/drivers/gpu/drm/radeon/radeon_fb.c @@ -124,7 +124,7 @@ static int radeonfb_create_pinned_object(struct radeon_fbdev *rfbdev, if (rdev->family >= CHIP_R600) height = ALIGN(mode_cmd->height, 8); size = mode_cmd->pitches[0] * height; - aligned_size = ALIGN(size, PAGE_SIZE); + aligned_size = PAGE_ALIGN(size); ret = radeon_gem_object_create(rdev, aligned_size, 0, RADEON_GEM_DOMAIN_VRAM, false, true, diff --git a/drivers/gpu/drm/radeon/radeon_gem.c b/drivers/gpu/drm/radeon/radeon_gem.c index d09650c..ae14fa4 100644 --- a/drivers/gpu/drm/radeon/radeon_gem.c +++ b/drivers/gpu/drm/radeon/radeon_gem.c @@ -569,7 +569,7 @@ int radeon_mode_dumb_create(struct drm_file *file_priv, args->pitch = radeon_align_pitch(rdev, args->width, args->bpp, 0) * ((args->bpp + 1) / 8); args->size = args->pitch * args->height; - args->size = ALIGN(args->size, PAGE_SIZE); + args->size = PAGE_ALIGN(args->size); r = radeon_gem_object_create(rdev, args->size, 0, RADEON_GEM_DOMAIN_VRAM, diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c index 6c717b2..80cb77e 100644 --- a/drivers/gpu/drm/radeon/radeon_object.c +++ b/drivers/gpu/drm/radeon/radeon_object.c @@ -154,7 +154,7 @@ int radeon_bo_create(struct radeon_device *rdev, size_t acc_size; int r; - size = ALIGN(size, PAGE_SIZE); + size = PAGE_ALIGN(size); if (kernel) { type = ttm_bo_type_kernel;