Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6508858rwb; Tue, 22 Nov 2022 14:34:56 -0800 (PST) X-Google-Smtp-Source: AA0mqf6ytjvZm+3VcEWSSxuC3JpB8XKXgDIXszwuMrkvTNOhpyg9ELTIXlornNZp218LkNTiVGz3 X-Received: by 2002:a17:902:9004:b0:17c:9a37:72fb with SMTP id a4-20020a170902900400b0017c9a3772fbmr18397384plp.82.1669156495606; Tue, 22 Nov 2022 14:34:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669156495; cv=none; d=google.com; s=arc-20160816; b=BhARz1ccOEuKaOzbkjbv82JJfW2z4Fxag+kAg5R6C1wHDGhEvPc+9KtUyRV+Y+FGC/ +qGBl2ZuAZlprd44bl1ovYMafeRSCqjL92PLpGWWDFVJG9kYyvsYEuRsXzUxilt9yrgn BjEEWK28HMrLTxHdB/KpaImMmChtNNbtNuXUVqxwRLDAl41k3jaTxKz21ngVIkJYjmGq Wfaw6wbMhoGeuWGKDdJAQSLsO3eHQKulUbSwm61EpkMeIK15IFfwL13jDp03IfogALrd PfS8sIDZ/5i1f7tmRoFePMFfkBEaDNZ54z/J5fkOGBpGurymNpAJECZCDA+EIbcbagYX tuJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=KZFwHmhr/QEF5HKZQdES7mrK9Cc1mLKa7DI+Irjv8gQ=; b=yEK39C1t1aE/KwjOd9osC9GXBzV8t/thbBXxbpy5EIqVeQddgWhvLOlH/W+zix4gEm l4FjqTXc2wkW2z4e2HHD0oBS/Rm25ZXIQSee9wfnDbGzxQ5vkR98h/++ML8E72SdJUy8 GblbHw2GnRufbFQEwrvNlwsv6KS6/DQn5ffPh/Eimnke/C9GcYgA8hYxpgvKp2F3W7IO fPs+5DxzX+NDZD5ZsuFjmQH9m0575l55mGi40KKSQlLXLCBBOdEl7bkKgM9vlvQXLiL4 TwOVPfvnC09Dl+aoTIFToLjeTfBAMN+rW7hmL9qADwnT0Kk1c0TOASSBqH+okLPIrJ2M TojQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id je18-20020a170903265200b00189185cf7d1si7612984plb.103.2022.11.22.14.34.36; Tue, 22 Nov 2022 14:34:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234753AbiKVW0W (ORCPT + 99 others); Tue, 22 Nov 2022 17:26:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233459AbiKVW0U (ORCPT ); Tue, 22 Nov 2022 17:26:20 -0500 Received: from smtp.smtpout.orange.fr (smtp-17.smtpout.orange.fr [80.12.242.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E34979E2B for ; Tue, 22 Nov 2022 14:26:19 -0800 (PST) Received: from [192.168.1.18] ([86.243.100.34]) by smtp.orange.fr with ESMTPA id xbiZoVuRqzQOKxbiZoPBam; Tue, 22 Nov 2022 23:26:18 +0100 X-ME-Helo: [192.168.1.18] X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Tue, 22 Nov 2022 23:26:18 +0100 X-ME-IP: 86.243.100.34 Message-ID: Date: Tue, 22 Nov 2022 23:26:14 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH] crypto: amlogic - Save a few bytes of memory Content-Language: fr, en-US To: Martin Blumenstingl Cc: Corentin Labbe , Herbert Xu , "David S. Miller" , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-crypto@vger.kernel.org, linux-amlogic@lists.infradead.org References: From: Christophe JAILLET In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Le 22/11/2022 à 23:02, Martin Blumenstingl a écrit : > On Tue, Nov 22, 2022 at 10:57 PM Christophe JAILLET > wrote: >> >> There is no real point in allocating dedicated memory for the irqs array. >> MAXFLOW is only 2, so it is easier to allocated the needed space >> directly within the 'meson_dev' structure. >> >> This saves some memory allocation and avoids an indirection when using the >> irqs array. > ..and it even fixes a missing devm_kcalloc error check > > Personally I prefer this approach over a patch that was sent earlier today: [0] Funny. A file untouched for about 18 months and 2 patches around the same line, ... the same day! > Corentin, Christophe, what do you think? Obviously, mine is better :) More seriously, I think it is mostly a mater of taste and that both are fine. Neither one will make a real difference IRL. I guess that memory allocation failure in probe are unlikely and saving 64 bytes (40 for devm_ + 2 x 4 = 48, rounded to 64 bytes) won't make any real difference. Up to you. CJ > > > Best regards, > Martin > > > [0] https://lore.kernel.org/linux-crypto/0df30bbf-3b7e-ed20-e316-41192bf3cc2b@linaro.org/T/#m6a45b44206c282f106d379b01d19027823c5d79b >