From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754688AbcAORdI (ORCPT ); Fri, 15 Jan 2016 12:33:08 -0500 Received: from mout.web.de ([212.227.17.12]:57577 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751777AbcAORdG (ORCPT ); Fri, 15 Jan 2016 12:33:06 -0500 Subject: Re: gianfar: Less function calls in gfar_ethflow_to_filer_table() after error detection To: Joe Perches , netdev@vger.kernel.org References: <566ABCD9.1060404@users.sourceforge.net> <56866E7F.8080609@users.sourceforge.net> <5698C53C.8060204@users.sourceforge.net> <5698C5CB.80305@users.sourceforge.net> <1452854229.8586.48.camel@perches.com> <5698DC52.4050808@users.sourceforge.net> <1452859429.8586.52.camel@perches.com> Cc: Claudiu Manoil , LKML , kernel-janitors@vger.kernel.org, Julia Lawall From: SF Markus Elfring X-Enigmail-Draft-Status: N1110 Message-ID: <56992D46.8070102@users.sourceforge.net> Date: Fri, 15 Jan 2016 18:32:54 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <1452859429.8586.52.camel@perches.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:N3PKVsNRTpCDWVneKjdtA2/IEVAzHfobx/B+hkbyTjtcGTTckYE 6pKcpNN/OE9lEVORQ3M63Bbd9IPfH723JUJWAXJaYSncV2W+n5IRqohn/s1AirIvOQWrRTm imBTyI0jPXi9K2ZjBZT68rqdyGsG/Y0HuA3fxGm5QJUyFbRPH02FAbbwrdvxMk8jzRm7yr/ iskBkTq5DJEiL/6pIL4gQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:N5W3aFi4i0Q=:NTBjeQ7YDB+dIafsZhUocz kKJoNQCdDtIbpAJc6mt+QptogpZ5h+bg+B7n4iUFSr0BKNN+xOn9ZPga+P3w0E3gYkA7KvwKX I1qNvcrnNfxY64nlFC+YCcOvjWlAm6khM7HM3dxuyPwEszqWVa5lGEn++ZWAK41FDNHyRuhru ck3ooaxsb1xkKHPNlJ5Yc2u6ijbnEbeW04yvSN9qeeuIm6/hzLTlUOK3CjyoGolQxVGx/sm6Z YbNKTRy2IeXftNNGYFVXTgKoq6RL6Kg2JwMoIatk0DYw8slCZFrRM+7G737ZfCvrXrxdJlOLR sphnf0Kg0D/JjvGCbsCVtq5/9LJEPm7g3Z/UDxDemgTwbg7ZyGIP58n2ERaBZHbiAdVGjOsFd zVmkrHv1yKV7rbY60Fg2p0BiKSxT3VTpHTleBt4owWQ/o/NhO2mb6lTq27gLwtb5pilZxFYyk eQQMaivJp8uGrumyyEK3r+4CphNi7DbC8alsxK7ls+qaLbDnsPNAPdBKWWEwbY7gZxCbfh3Sj 25H3rlFyQlW5L93hOOs6ixK6eyQYmm71NUuPjgu+pplAijT50CUmEp+KQklBlaHo8hwJuWnW6 anXiMtcR9VsbGbfmEmnJv7U+qBTbJp+cFh5eBuCFyAy+tEGKEBR1lrj+HedgreCMPaHGF7hvc wSd52ytoad5q3aehG96cOLWfPz5nhGdf/QXr603kAjDI8pSwcDYV50T730PYBo/H5Qr6A9GMQ 55SHqBJcDqEcI8ZhVlnvE18t69Jctc/OxpGPXl0offhEZ08tFRJTiXimukWDyT/Xzlbu0vDVO mHOrvLW Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>> local_rqfpr = kmalloc_array(2 * (MAX_FILER_IDX + 1), >>> sizeof(unsigned int), GFP_KERNEL); >>> if (!local_rqfpr) >>> goto err; >>> >>> local_rqfcr = &local_rqfpr[MAX_FILER_IDX + 1]; >> >> Do you suggest to use only one array (instead of two as before) here? > > That's a possibility. Thanks for your clarification. > If, as your title suggests, you really want fewer function calls, I am unsure at the moment if more changes will make sense in this function implementation. > (which as far as I saw, you didn't do) Is my wording "after error detection" insufficient eventually? > that could be a mechanism to remove both an allocation and a free. Would any more software developers or source code reviewers like to share their opinions in such a direction? Regards, Markus From mboxrd@z Thu Jan 1 00:00:00 1970 From: SF Markus Elfring Date: Fri, 15 Jan 2016 17:32:54 +0000 Subject: Re: gianfar: Less function calls in gfar_ethflow_to_filer_table() after error detection Message-Id: <56992D46.8070102@users.sourceforge.net> List-Id: References: <566ABCD9.1060404@users.sourceforge.net> <56866E7F.8080609@users.sourceforge.net> <5698C53C.8060204@users.sourceforge.net> <5698C5CB.80305@users.sourceforge.net> <1452854229.8586.48.camel@perches.com> <5698DC52.4050808@users.sourceforge.net> <1452859429.8586.52.camel@perches.com> In-Reply-To: <1452859429.8586.52.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Joe Perches , netdev@vger.kernel.org Cc: Claudiu Manoil , LKML , kernel-janitors@vger.kernel.org, Julia Lawall >>> local_rqfpr = kmalloc_array(2 * (MAX_FILER_IDX + 1), >>> sizeof(unsigned int), GFP_KERNEL); >>> if (!local_rqfpr) >>> goto err; >>> >>> local_rqfcr = &local_rqfpr[MAX_FILER_IDX + 1]; >> >> Do you suggest to use only one array (instead of two as before) here? > > That's a possibility. Thanks for your clarification. > If, as your title suggests, you really want fewer function calls, I am unsure at the moment if more changes will make sense in this function implementation. > (which as far as I saw, you didn't do) Is my wording "after error detection" insufficient eventually? > that could be a mechanism to remove both an allocation and a free. Would any more software developers or source code reviewers like to share their opinions in such a direction? Regards, Markus