From mboxrd@z Thu Jan 1 00:00:00 1970 From: Clemens Ladisch Subject: Re: [PATCH] emu10k1: Fix coccicheck warning Date: Sun, 10 Mar 2013 17:32:07 +0100 Message-ID: <513CB587.5010304@ladisch.de> References: <1362919067-17250-1-git-send-email-cvicentiu@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from smtprelay03.ispgateway.de (smtprelay03.ispgateway.de [80.67.29.28]) by alsa0.perex.cz (Postfix) with ESMTP id 8387426514E for ; Sun, 10 Mar 2013 17:33:17 +0100 (CET) In-Reply-To: <1362919067-17250-1-git-send-email-cvicentiu@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Vicentiu Ciorbaru Cc: tiwai@suse.de, alsa-devel@alsa-project.org, wfp5p@virginia.edu, linux-kernel@vger.kernel.org List-Id: alsa-devel@alsa-project.org Vicentiu Ciorbaru wrote: > Removed redundant cast of kmalloc return pointer. > - (icode->gpr_map = (u_int32_t __user *) > - kcalloc(512 + 256 + 256 + 2 * 1024, sizeof(u_int32_t), > - GFP_KERNEL)) == NULL || > + (icode->gpr_map = kcalloc(512 + 256 + 256 + 2 * 1024, > + sizeof(u_int32_t), GFP_KERNEL)) == NULL || Why would casting to __user be redundant? Regards, Clemens From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752171Ab3CJQfp (ORCPT ); Sun, 10 Mar 2013 12:35:45 -0400 Received: from smtprelay03.ispgateway.de ([80.67.31.41]:35548 "EHLO smtprelay03.ispgateway.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751334Ab3CJQfo (ORCPT ); Sun, 10 Mar 2013 12:35:44 -0400 Message-ID: <513CB587.5010304@ladisch.de> Date: Sun, 10 Mar 2013 17:32:07 +0100 From: Clemens Ladisch User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110323 Thunderbird/3.1.9 MIME-Version: 1.0 To: Vicentiu Ciorbaru CC: perex@perex.cz, tiwai@suse.de, wfp5p@virginia.edu, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] emu10k1: Fix coccicheck warning References: <1362919067-17250-1-git-send-email-cvicentiu@gmail.com> In-Reply-To: <1362919067-17250-1-git-send-email-cvicentiu@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Df-Sender: bGludXgta2VybmVsQGNsLmRvbWFpbmZhY3Rvcnkta3VuZGUuZGU= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Vicentiu Ciorbaru wrote: > Removed redundant cast of kmalloc return pointer. > - (icode->gpr_map = (u_int32_t __user *) > - kcalloc(512 + 256 + 256 + 2 * 1024, sizeof(u_int32_t), > - GFP_KERNEL)) == NULL || > + (icode->gpr_map = kcalloc(512 + 256 + 256 + 2 * 1024, > + sizeof(u_int32_t), GFP_KERNEL)) == NULL || Why would casting to __user be redundant? Regards, Clemens