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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CFBC6EB64DA for ; Wed, 19 Jul 2023 09:54:29 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5C1C08623A; Wed, 19 Jul 2023 11:54:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1689760467; bh=pp4ZZN7dE8cYWy1AMcvbM3lNAz9Y8/vn1h/cCmXzioY=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Y3H84NWyKhAfy6DeQuug51EjTkwuAavMLZiyp6HchtQY8Jql+WZ4Gm03YKLR6Prek EpTsA+rl0piay5ALfTkiTlX3fJbxHbdQJSxD7VwSE6Vpct26KIj9LZtPC4NH0zYitB nuPCVSU3sPwbG/bP1BmHOI2j3U4FoYtsTxhmOOSYZQQ98Whmo+Y5z0+p7ckYKDcdji MSH2yCTTjnNjoYNqMKgc0tu+sTfhedKACXEOGKF5fF7w2XrWCVg6M0o2CYeYT0xNoo w00VlfAYWPIAXprwNqF1pWaryQD0XgDar7aC9i844LgVY8ShAsp/mtqrZ06FjZI175 8rsCmyDSovzGg== Received: by phobos.denx.de (Postfix, from userid 109) id BE95B86720; Wed, 19 Jul 2023 11:54:25 +0200 (CEST) Received: from mout-u-204.mailbox.org (mout-u-204.mailbox.org [IPv6:2001:67c:2050:101:465::204]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B646F8469F for ; Wed, 19 Jul 2023 11:54:23 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sr@denx.de Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-204.mailbox.org (Postfix) with ESMTPS id 4R5WPT6HmDz9sQm; Wed, 19 Jul 2023 11:54:21 +0200 (CEST) Message-ID: Date: Wed, 19 Jul 2023 11:54:20 +0200 MIME-Version: 1.0 Subject: Re: [PATCH 05/29] serial: mtk: initial priv data before using To: Weijie Gao , u-boot@lists.denx.de Cc: GSS_MTK_Uboot_upstream , Daniel Golle , Frank Wunderlich , Simon Glass , Sam Shih References: <4e3359951967714e4eb1d33e7ee5f157ab6b8096.1689756363.git.weijie.gao@mediatek.com> Content-Language: en-US From: Stefan Roese In-Reply-To: <4e3359951967714e4eb1d33e7ee5f157ab6b8096.1689756363.git.weijie.gao@mediatek.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4R5WPT6HmDz9sQm X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean On 7/19/23 11:16, Weijie Gao wrote: > This patch ensures driver private data being fully initialized in > _debug_uart_init which is not covered by .priv_auto ops. > > Signed-off-by: Sam Shih > Signed-off-by: Weijie Gao > --- > drivers/serial/serial_mtk.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/serial/serial_mtk.c b/drivers/serial/serial_mtk.c > index ded7346a13..2dffa14ea7 100644 > --- a/drivers/serial/serial_mtk.c > +++ b/drivers/serial/serial_mtk.c > @@ -439,6 +439,7 @@ static inline void _debug_uart_init(void) > { > struct mtk_serial_priv priv; > > + memset(&priv, 0, sizeof(struct mtk_serial_priv)); > priv.regs = (void *) CONFIG_VAL(DEBUG_UART_BASE); > priv.fixed_clk_rate = CONFIG_DEBUG_UART_CLOCK; > Reviewed-by: Stefan Roese Thanks, Stefan