Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1764001AbXH3XtM (ORCPT ); Thu, 30 Aug 2007 19:49:12 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1760843AbXH3Xs4 (ORCPT ); Thu, 30 Aug 2007 19:48:56 -0400 Received: from smtp131.iad.emailsrvr.com ([207.97.245.131]:46224 "EHLO smtp131.iad.emailsrvr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758795AbXH3Xsy (ORCPT ); Thu, 30 Aug 2007 19:48:54 -0400 Message-ID: <46D756FF.3090602@gentoo.org> Date: Thu, 30 Aug 2007 19:47:11 -0400 From: Daniel Drake User-Agent: Thunderbird 2.0.0.6 (X11/20070805) MIME-Version: 1.0 To: Jesper Juhl CC: Linux Kernel Mailing List , netdev@vger.kernel.org, "David S. Miller" , Ulrich Kunitz , linux-wireless@vger.kernel.org Subject: Re: [PATCH 13/30] net: Don't do pointless kmalloc return value casts in zd1211 driver References: <1554af80879a7ef2f78a4d654f23c248203500d9.1187912217.git.jesper.juhl@gmail.com> <46D70467.1040109@gentoo.org> <9a8748490708301320o49d8e794vc5c37ffc938006f1@mail.gmail.com> In-Reply-To: <9a8748490708301320o49d8e794vc5c37ffc938006f1@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 642 Lines: 17 Jesper Juhl wrote: > What would be wrong in applying my patch that removes the cast of the > kmalloc() return value and then also remove the "__nocast" here? We use it as a safety measure when coding. For example the write register function takes an address and a value. We got one of these the wrong way round once, and had a non-obvious bug. nocast and sparse helps us prevent this. Daniel - 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/