Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755969AbcJNFrN (ORCPT ); Fri, 14 Oct 2016 01:47:13 -0400 Received: from mout.web.de ([212.227.17.11]:59921 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751540AbcJNFrE (ORCPT ); Fri, 14 Oct 2016 01:47:04 -0400 Subject: Re: [media] RedRat3: Use kcalloc() in two functions? To: Joe Perches , linux-media@vger.kernel.org References: <566ABCD9.1060404@users.sourceforge.net> <81cef537-4ad0-3a74-8bde-94707dcd03f4@users.sourceforge.net> <21c57b39-25ac-2df1-030d-11c243a11ebc@users.sourceforge.net> <1476376177.2164.10.camel@perches.com> Cc: Hans Verkuil , Mauro Carvalho Chehab , Sean Young , Wolfram Sang , LKML , kernel-janitors@vger.kernel.org, Julia Lawall From: SF Markus Elfring Message-ID: Date: Fri, 14 Oct 2016 07:45:17 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <1476376177.2164.10.camel@perches.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:/7B+nKr1X3dbPdKIu7om/cS5xAMn9tEcT365aomVCcV8m1dTpsD dlVxfdoRAoZK3oei6QErBfayJCd43MASBW8o7Ne49AcfxtAC+jHGoltcQpcjpm3ksYO05Ht zPJO4UrL51LtkWzD2bFwXSjzQ2sfjhRBHhjSQ9ITVqBp2Zpqq80n+EDnpwwsgS8tWjK/8Eu +1Oe3DfKT2acI+ltjpmzA== X-UI-Out-Filterresults: notjunk:1;V01:K0:oFqFYaGsi+o=:VyAQtVdlc99PewLEpTJ7ZE J+8jcjxkgEHXc+Oi3zZLWjCJIcrfiFmPx7GJU5D0+MHqUMbx6A6KL7mYMpk6moc+TvF7PhZyB Zyn1L89xr0PZ4PfcwQwVMysWcHqih7LatrkbWCrPslHRegF/9bB5EXmlyEfCt1YWDyCk/bXTC DvXKkkfLyUM9ADlCPUl9JY2MKI9JFfyfqHyUxq0sllb8VrsZeU0oLu7oLtIOct3SdYNHmPPYe X3k1UsMd/AvcM2fNuwVT6FoFgwX5Fx/p0V3Q9aE566r6sTk88fFncFBarvHKtH20cXldg2M25 KELOx0uvr3eZEvS9zXLM0qF1O+5g0DbHFhugbrcE2SJR+1HYtHP4TR4gh+4ITA9vJ6B5IXm4g hSWmzH/hjRvE2ct9COeeTKKINhUpRyH7woJyZi4Tjtw5bwkM4f+3lJNq61GmKeJ7IqiJYEGh/ 0ldBQqst9iw1UfO9bUXY1B6gOKbXzKKEKkx6L2FAChXcFOczH6dWAtZRslgIOlOrk5GMBC3u/ hv02ukaBkYye3KnPxx+AeYlH5NT1aNGERcIS/sm7fbWe9IQqcIV/7PE9JWjglXda6tuCUw3p6 1oLBMPpw2uo26ld/ISDQAulR8cjxHhiA1+wcqvN9RXkmigyIwmCD4ZqdD6mr5zHuJJcZDNFiB DmyDHYHaT29hbGdMkT04g1PYtg0WJx6YUXkzZomIPAKi7DQuitiZvGEQYJFzicUylh/xg27xJ cbibHDJGMIkeeJB705lTY5ZNniH4mlYU6nUZp/yZsZAt8D5eAjS+sccmWlE2Zcb0618gveLRh y/InlXP Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 338 Lines: 12 > Markus, please stop being _so_ mechanical and use your > brain a little too. By definition, sizeof(char) == 1. > > This _really_ should be kzalloc(RR3_FW_VERSION_LEN + 1,...) Do you expect that function call examples like the following will be equivalent? zbuffer = kzalloc(123, ?); cbuffer = kcalloc(123, 1, ?); Regards, Markus