Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751555AbbEIQ1z (ORCPT ); Sat, 9 May 2015 12:27:55 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:40897 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750909AbbEIQ1w (ORCPT ); Sat, 9 May 2015 12:27:52 -0400 Date: Sat, 9 May 2015 18:24:04 +0200 From: Greg KH To: Peter Senna Tschudin Cc: alan@linux.intel.com, dan.carpenter@oracle.com, geert@linux-m68k.org, devel@driverdev.osuosl.org, jun.j.tian@intel.com, linux-kernel@vger.kernel.org, schwab@linux-m68k.org, garret.kelly@gmail.com, octavian.purdila@intel.com, nnk@google.com Subject: Re: [PATCH V5] staging: goldfish: Fix pointer cast for 32 bits Message-ID: <20150509162404.GA14324@kroah.com> References: <20150503183248.GC7356@kroah.com> <1430745078-15969-1-git-send-email-peter.senna@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1430745078-15969-1-git-send-email-peter.senna@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1875 Lines: 43 On Mon, May 04, 2015 at 03:11:18PM +0200, Peter Senna Tschudin wrote: > As the first argument of gf_write64() was of type unsigned long, and as > some calls to gf_write64() were casting the first argument from void * > to u64 the compiler and/or sparse were printing warnings for casts of > wrong sizes when compiling for i386. > > This patch changes the type of the first argument of gf_write64() to > void *, and update calls to the function. This change fixed the > warnings and allowed to remove casts from 6 calls to gf_write64(). > > In addition gf_write64() was renamed to gf_write_ptr() as the name was > misleading because it only writes 32 bits on 32 bit systems. > > gf_write_dma_addr() was added to handle dma_addr_t values which is > used at drivers/staging/goldfish/goldfish_audio.c. > > Signed-off-by: Dan Carpenter > Signed-off-by: Peter Senna Tschudin > --- > Tested by compilation only for x86 and for x86_64. This adds two build warnings: drivers/tty/goldfish.c: In function ‘goldfish_tty_do_write’: drivers/tty/goldfish.c:62:15: warning: passing argument 1 of ‘gf_write_ptr’ discards ‘const’ qualifier from pointer target type gf_write_ptr(buf, base + GOLDFISH_TTY_DATA_PTR, ^ In file included from drivers/tty/goldfish.c:24:0: include/linux/goldfish.h:6:20: note: expected ‘void *’ but argument is of type ‘const char *’ static inline void gf_write_ptr(void *ptr, void __iomem *portl, ^ So I can't take this. Please fix up and resend, and always test build your patches... thanks, greg k-h -- 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/