Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756229AbZGJUIa (ORCPT ); Fri, 10 Jul 2009 16:08:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751571AbZGJUIX (ORCPT ); Fri, 10 Jul 2009 16:08:23 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:59175 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751323AbZGJUIX (ORCPT ); Fri, 10 Jul 2009 16:08:23 -0400 Date: Fri, 10 Jul 2009 13:07:52 -0700 (PDT) From: Linus Torvalds X-X-Sender: torvalds@localhost.localdomain To: Ingo Molnar cc: Linux Kernel Mailing List , Thomas Gleixner , Peter Zijlstra , Joerg Roedel Subject: Re: [PATCH] dma-debug: Fix the overlap() function to be correct and readable In-Reply-To: <20090710195157.GA31361@elte.hu> Message-ID: References: <20090710162848.GA26862@elte.hu> <20090710193110.GA28281@elte.hu> <20090710195157.GA31361@elte.hu> User-Agent: Alpine 2.01 (LFD 1184 2008-12-16) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 642 Lines: 22 On Fri, 10 Jul 2009, Ingo Molnar wrote: > > How about the patch below? Lightly tested. > > if (!PageHighMem(page)) { > - void *addr = ((char *)page_address(page)) + offset; > + void *addr = (void *)page_address(page) + offset; > + Why is that 'void *' cast there? page_address() is already a void *. Other than that it obviously looks good to me. But I never see my own bugs. Linus -- 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/