From patchwork Sat Jun 18 00:08:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Forbes X-Patchwork-Id: 892802 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p5I7oU1R030215 for ; Sat, 18 Jun 2011 07:50:51 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D063B9E94F for ; Sat, 18 Jun 2011 00:50:29 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-iw0-f177.google.com (mail-iw0-f177.google.com [209.85.214.177]) by gabe.freedesktop.org (Postfix) with ESMTP id DFF8D9E7C0 for ; Fri, 17 Jun 2011 17:09:56 -0700 (PDT) Received: by iwn35 with SMTP id 35so1044826iwn.36 for ; Fri, 17 Jun 2011 17:09:56 -0700 (PDT) Received: by 10.42.230.138 with SMTP id jm10mr2478698icb.451.1308355796361; Fri, 17 Jun 2011 17:09:56 -0700 (PDT) Received: from localhost.localdomain (ip-118-90-129-85.xdsl.xnet.co.nz [118.90.129.85]) by mx.google.com with ESMTPS id a9sm3101052icy.6.2011.06.17.17.09.51 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 17 Jun 2011 17:09:55 -0700 (PDT) From: Chris Forbes To: David Airlie Subject: [PATCH v2] Drivers: gpu: drm: drm_memory: fixed coding style issue Date: Sat, 18 Jun 2011 12:08:48 +1200 Message-Id: <1308355728-11863-1-git-send-email-chrisf@ijw.co.nz> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <20110617151241.GH17833@sci.fi> References: <20110617151241.GH17833@sci.fi> X-Mailman-Approved-At: Sat, 18 Jun 2011 00:50:20 -0700 Cc: Chris Forbes , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sat, 18 Jun 2011 07:50:51 +0000 (UTC) Fixed coding style issues flagged by checkpatch.pl. Reworked break of long line as per Ville's suggestion, to maintain readability. Signed-off-by: Chris Forbes --- drivers/gpu/drm/drm_memory.c | 20 +++++++++++--------- 1 files changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/drm_memory.c b/drivers/gpu/drm/drm_memory.c index c9b8050..fd96561 100644 --- a/drivers/gpu/drm/drm_memory.c +++ b/drivers/gpu/drm/drm_memory.c @@ -57,7 +57,7 @@ int drm_mem_info(char *buf, char **start, off_t offset, #if __OS_HAS_AGP static void *agp_remap(unsigned long offset, unsigned long size, - struct drm_device * dev) + struct drm_device *dev) { unsigned long i, num_pages = PAGE_ALIGN(size) / PAGE_SIZE; @@ -81,16 +81,18 @@ static void *agp_remap(unsigned long offset, unsigned long size, return NULL; /* - * OK, we're mapping AGP space on a chipset/platform on which memory accesses by - * the CPU do not get remapped by the GART. We fix this by using the kernel's - * page-table instead (that's probably faster anyhow...). + * OK, we're mapping AGP space on a chipset/platform on which + * memory accesses by the CPU do not get remapped by the GART. + * We fix this by using the kernel's page-table instead + * (that's probably faster anyhow...). */ /* note: use vmalloc() because num_pages could be large... */ page_map = vmalloc(num_pages * sizeof(struct page *)); if (!page_map) return NULL; - phys_page_map = (agpmem->memory->pages + (offset - agpmem->bound) / PAGE_SIZE); + phys_page_map = (agpmem->memory->pages + + (offset - agpmem->bound) / PAGE_SIZE); for (i = 0; i < num_pages; ++i) page_map[i] = phys_page_map[i]; addr = vmap(page_map, num_pages, VM_IOREMAP, PAGE_AGP); @@ -100,20 +102,20 @@ static void *agp_remap(unsigned long offset, unsigned long size, } /** Wrapper around agp_free_memory() */ -void drm_free_agp(DRM_AGP_MEM * handle, int pages) +void drm_free_agp(DRM_AGP_MEM *handle, int pages) { agp_free_memory(handle); } EXPORT_SYMBOL(drm_free_agp); /** Wrapper around agp_bind_memory() */ -int drm_bind_agp(DRM_AGP_MEM * handle, unsigned int start) +int drm_bind_agp(DRM_AGP_MEM *handle, unsigned int start) { return agp_bind_memory(handle, start); } /** Wrapper around agp_unbind_memory() */ -int drm_unbind_agp(DRM_AGP_MEM * handle) +int drm_unbind_agp(DRM_AGP_MEM *handle) { return agp_unbind_memory(handle); } @@ -121,7 +123,7 @@ EXPORT_SYMBOL(drm_unbind_agp); #else /* __OS_HAS_AGP */ static inline void *agp_remap(unsigned long offset, unsigned long size, - struct drm_device * dev) + struct drm_device *dev) { return NULL; }