From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jassi Brar Subject: Re: [PATCH v7 6/6] mailbox: Add support for i.MX7D messaging unit Date: Thu, 26 Jul 2018 16:39:34 +0530 Message-ID: References: <20180726065331.6186-1-o.rempel@pengutronix.de> <20180726065331.6186-7-o.rempel@pengutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Oleksij Rempel Cc: Mark Rutland , "A.s. Dong" , Devicetree List , Rob Herring , ", linux-arm-kernel"@lists.infradead.org, Vladimir Zapolskiy , ", Sascha Hauer" , Fabio Estevam , ", linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, srv_heupstream" , Shawn Guo srv_heupstream , dl-linux-imx List-Id: devicetree@vger.kernel.org On Thu, Jul 26, 2018 at 4:21 PM, Oleksij Rempel wrote: >> >>> +struct imx_mu_con_priv { >>> + int irq; >>> + unsigned int idx; >>> + char *irq_desc; >>> >> Having char irq_desc[16]; seems simpler than free/kfree upon >> each startup/shutdown. Simply use snprintf() in probe(). > > Currently all known configurations use one or two channels. I don't see > any sense to allocate all at the probe. > Just because only 2 out of 4 channels are being used, it doesn't make sense? What is the concern? "wasting" 16x2 bytes of memory? How many bytes, LOC and execution time does kasprintf() waste?