Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6512918rwb; Tue, 22 Nov 2022 14:39:05 -0800 (PST) X-Google-Smtp-Source: AA0mqf4Dbc7/Z8QXwiHC+wU2P2QLUW5dfJpI2fymG7TMiINKNNJlRDu1sJOSBZWxdKj4pwK9HNTe X-Received: by 2002:a17:902:8c8e:b0:186:8bd9:eca3 with SMTP id t14-20020a1709028c8e00b001868bd9eca3mr7487508plo.0.1669156745453; Tue, 22 Nov 2022 14:39:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669156745; cv=none; d=google.com; s=arc-20160816; b=RM2Eicu1CQiyW4DvnCz8vb+o7W5ejDYQyBFxLvTKXhaoQJb6pK710evi0qhpxk5wI8 IKmXSkOGehADAZ52EGUDTNE9AMDSgY2Taer3ptTDPLbwS4BPQy5Sh/veZxUcIEvRH26Q OS2QBKapcrs701ceJlo1yBkibgD15UvAHMCGY4HIZtgU+vF7RfSwBEwL23uCBc3/Jjei gWo7PMHYCTidI0pBC1RqzIpID4JQMxRF8bdSVjEgFxnUcYJ6Rs6VekXcu36ZwQVt4DlY WmH0p5khzWrl4F3z716WaOzfuWucMvPKhV71uPmwRFdb6I4ypksvQMwBxEOwzJomlUin VquQ== 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=USC3g5zwMtfBSlXB4MO7Mc845FRNj5LxuN6tjkxNgFc=; b=hMQEfSS7urIkqfuthOrrq7Iuzw9gaQStUhIf3SoxWo9MSXLgHCBLeRkKx2o9gf/+K0 e8Zo9fHy4us05OyPraD221X+rYsI5P58hgCQuLmAspwNhfA/lZkRJURI1qKabYU4rI7L YMv9fSENCzcBefaxZ2b6/442430bvJcuIx4MU7KSGny/hIP3EJJ4UtRglcPtFJGc3mJs 4YO483iY5swFntDaycwigj3I1iMiXbBvfTHgUG9NYHiKFnv2h9l/ypgSMttN1B0Okdbv rxkO474QrAgtiZQBQbp41dbaiKvgFUw4p31K9cqaDpgopQxkCCLqUpcyMEcgecpEBp4+ DN+g== 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 mq3-20020a17090b380300b00213945884d5si135620pjb.126.2022.11.22.14.38.52; Tue, 22 Nov 2022 14:39:05 -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 S234919AbiKVWgn (ORCPT + 99 others); Tue, 22 Nov 2022 17:36:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234552AbiKVWgl (ORCPT ); Tue, 22 Nov 2022 17:36:41 -0500 Received: from smtp.smtpout.orange.fr (smtp-28.smtpout.orange.fr [80.12.242.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78C5BC900F for ; Tue, 22 Nov 2022 14:36:40 -0800 (PST) Received: from [192.168.1.18] ([86.243.100.34]) by smtp.orange.fr with ESMTPA id xbsaozAnSpJKlxbsaorx22; Tue, 22 Nov 2022 23:36:38 +0100 X-ME-Helo: [192.168.1.18] X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Tue, 22 Nov 2022 23:36:38 +0100 X-ME-IP: 86.243.100.34 Message-ID: Date: Tue, 22 Nov 2022 23:36:35 +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_H2,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] > Corentin, Christophe, what do you think? > > > Best regards, > Martin > > > [0] https://lore.kernel.org/linux-crypto/0df30bbf-3b7e-ed20-e316-41192bf3cc2b@linaro.org/T/#m6a45b44206c282f106d379b01d19027823c5d79b > Unrelated, but I think that meson_irq_handler() needs a small ajustement to avoid printing a spurious message if readl() returns 0. Maybe something like that?: @@ -33,9 +33,10 @@ static irqreturn_t meson_irq_handler(int irq, void *data) writel_relaxed(0xF, mc->base + ((0x4 + flow) << 2)); mc->chanlist[flow].status = 1; complete(&mc->chanlist[flow].complete); - return IRQ_HANDLED; + } else { + dev_err(mc->dev, "%s %d Got irq for flow %d but ctrl is empty\n", __func__, irq, flow); } - dev_err(mc->dev, "%s %d Got irq for flow %d but ctrl is empty\n", __func__, irq, flow); + return IRQ_HANDLED; } } CJ