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 707AAC433FE for ; Fri, 18 Mar 2022 08:39:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233850AbiCRIkV (ORCPT ); Fri, 18 Mar 2022 04:40:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233811AbiCRIkT (ORCPT ); Fri, 18 Mar 2022 04:40:19 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6EC7172E26; Fri, 18 Mar 2022 01:38:56 -0700 (PDT) X-UUID: a5aae80ff55748a886439f9cafa3bc6f-20220318 X-UUID: a5aae80ff55748a886439f9cafa3bc6f-20220318 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 792840434; Fri, 18 Mar 2022 16:38:46 +0800 Received: from mtkexhb01.mediatek.inc (172.21.101.102) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 18 Mar 2022 16:38:45 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkexhb01.mediatek.inc (172.21.101.102) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 18 Mar 2022 16:38:44 +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; Fri, 18 Mar 2022 16:38:44 +0800 From: Miles Chen To: CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH v14 6/6] soc: mediatek: mutex: add functions that operate registers by CMDQ Date: Fri, 18 Mar 2022 16:38:44 +0800 Message-ID: <20220318083844.24859-1-miles.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <72f7feabe22064365457b5b72dfb1972ba2b3151.camel@mediatek.com> References: <72f7feabe22064365457b5b72dfb1972ba2b3151.camel@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Moudy, >> > } >> > } >> > >> > + if (of_address_to_resource(dev->of_node, 0, &addr) < 0) >> > + mtx->addr = 0L; >> >> addr is phys_addr_t, which means that it holds a physical address. >> 0 may be a valid address in some platforms, so I think >> we should not set mtx->addr = 0L when of_address_to_resource fails. >> Maybe probe fail by returning dev_err_probe()? >> >> Thanks, >> Miles > >Hi Miles, > >This does lead to the situation you mentioned, and sorry for the >deficient dts parsing flow. Maybe we should follow "gce-client" usage >and add a check condition when needed to avoid compatibility issues? > >Thanks, >Moudy According to Documentation/devicetree/bindings/display/mediatek/mediatek,mutex.yaml, it is required to have a reg field in the mutex node. So I think we can fail in this case. Thanks, Miles