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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 40A2BECAAD5 for ; Mon, 5 Sep 2022 06:26:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=drc+kSLvbEDwoI0VUUvB4TXlH3fUSOavyjK+HLhVnUE=; b=dOcPGbIDs/dYtF 3cjv3YrSzooSNU57lZ89PtV5OxJ2DuEwfRjXLvz2eVbhYmZO5ADhSxn3XOOx1FmJ2WZnNhEk5HC/+ Pblkz9Be/fI0DoAs/CYiFM+xv9mvn32tgylNtxb8EEl+M7srbNcpxqryZNFA/fl0S+aH+f7/Yqca7 ehS5noveNoHeungZ1m9Wln2q9jGAHMkONGvLeUGTdQTcA+TLIeg09rXX6HVzGmAy5AVwPJsbczGIf bNrMn7U6+wH2onUdsGM8RPGEdOgBY+doEq6244qg2zVniaDd2TVSHMfvkudZdfl2x4D/UYX+Zsppa YC1StNfEodXL3C3iEVDg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oV5Xn-00C95R-46; Mon, 05 Sep 2022 06:25:17 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oV5VL-00C6ip-Lv for linux-arm-kernel@lists.infradead.org; Mon, 05 Sep 2022 06:22:45 +0000 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 24E69610AB; 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-Disposition: inline In-Reply-To: <2d8c24359b2daa32ce0597a2949b7b2bebaf23de.1659211633.git.christophe.jaillet@wanadoo.fr> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220904_232244_408692_514953B7 X-CRM114-Status: GOOD ( 11.29 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel