From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41D4CECAAA1 for ; Mon, 5 Sep 2022 06:22:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236620AbiIEGWu (ORCPT ); Mon, 5 Sep 2022 02:22:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236580AbiIEGWp (ORCPT ); Mon, 5 Sep 2022 02:22:45 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CE5F2F037; Sun, 4 Sep 2022 23:22:44 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 24C17610D5; Mon, 5 Sep 2022 06:22:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0E2F3C433D6; Mon, 5 Sep 2022 06:22:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662358962; bh=2xEEEZ6CvZ2nPWQv0CH8VGu41ZEdxLRb0MFZrH6xB9U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XXAY+hPd+TfFiORWRJpzFbPmU6WnRKDF1N6azgqAaGu98WPoaz/pr9QFxDTtFCMWs J7DbZpTQ8qvOKbwHzWxNbbW1Oou9sKL0y5fT7fK/czQb40GsDIV810rGIEJ1KBich3 vgdGsRmKxokxvV6+YmhIy6kmuLbMKCov58sITx118tNr23wskb8nlHb5D7/qidk/no BbJ74kkiupfZwMEWes000RhVq4PgaNOTDsSO0pbKUyxc1MPUip3EOBrJa2BJBHK925 Awg6jtVGUuapXDRfDkGsiuTlN+31TaA6zlnTonWEN4o8Q9zJT43BfS1F0QfmcAF2s7 1i9V5zHp/jqrg== Date: Mon, 5 Sep 2022 11:52:38 +0530 From: Vinod Koul To: Christophe JAILLET Cc: Maxime Coquelin , Alexandre Torgue , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, dmaengine@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] dmaengine: stm32-dmamux: Simplify code and save a few bytes of memory Message-ID: References: <2d8c24359b2daa32ce0597a2949b7b2bebaf23de.1659211633.git.christophe.jaillet@wanadoo.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2d8c24359b2daa32ce0597a2949b7b2bebaf23de.1659211633.git.christophe.jaillet@wanadoo.fr> Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org On 30-07-22, 22:07, Christophe JAILLET wrote: > STM32_DMAMUX_MAX_DMA_REQUESTS is small (i.e. 32) and when the 'dma_inuse' > bitmap is allocated, there is already a check that 'dma_req' is <= this > limit. > > So, there is no good reason to dynamically allocate this bitmap. This > just waste some memory and some cycles. > > Use DECLARE_BITMAP with the maximum bitmap size instead. Applied, thanks -- ~Vinod