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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 798B6C433FE for ; Thu, 30 Dec 2021 17:17:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E3D7410E234; Thu, 30 Dec 2021 17:17:03 +0000 (UTC) Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3F80689BD2 for ; Thu, 30 Dec 2021 06:56:25 +0000 (UTC) X-UUID: 31f773133e554b5c8a08136659f39100-20211230 X-UUID: 31f773133e554b5c8a08136659f39100-20211230 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1895940659; Thu, 30 Dec 2021 14:56:20 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.3; Thu, 30 Dec 2021 14:56:18 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 30 Dec 2021 14:56:18 +0800 From: To: Subject: Re: [PATCH] drm/mediatek: Fix unused-but-set variable warning Date: Thu, 30 Dec 2021 14:56:16 +0800 Message-ID: <20211230065616.32308-1-miles.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-MTK: N X-Mailman-Approved-At: Thu, 30 Dec 2021 17:17:01 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: chunkuang.hu@kernel.org, airlied@linux.ie, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, miles.chen@mediatek.com, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" >You are right, in both cases the bit is set, but the funciton does not do what >it is supposed to do. >Will just clear all bits of the mask. > >Without your patch, we will just write the val to the register and don't care >what the register value was before that. > >We should somehow mention that in the commit message, as it's not only about a >not used variable, it actually has an influence on the value we write(-back) to >the register. thanks for the comment. I understand that it's not only about a not used variable. I talked to our hdmi experts and they think mtk_cec_mask() should write tmp instead of write val to the register. I will mention this in the commit message and submit next patch. Happy new year! Miles