From patchwork Thu Nov 17 07:48:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ye.xingchen@zte.com.cn X-Patchwork-Id: 21493 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp266900wrr; Wed, 16 Nov 2022 23:53:43 -0800 (PST) X-Google-Smtp-Source: AA0mqf5KtkA4r9Ve8FlVTvNAqkQ1Q+ZyGaHjyjnqTOIF8g4dp4XA5re5v2wnYSJ0LSXhQKoJw+7V X-Received: by 2002:a17:906:a157:b0:7a5:7e25:5b11 with SMTP id bu23-20020a170906a15700b007a57e255b11mr1130106ejb.254.1668671623042; Wed, 16 Nov 2022 23:53:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668671623; cv=none; d=google.com; s=arc-20160816; b=nwmKhouJbBiWAuJe8Zaik8ZRVqjirjvzi4TsUJxNBmFfalsvhsNkCTwndq3yV3NiwC WTb9awVgRboQ7zZ4Ucm9JLTyjwvn91APy1dUQns9ryz/CH8FUjyDDW969Z+o3ymBueOZ W7mA+7rZadccgNLdUbN/cRGbOQKnUjd1KpnZSFmowc2w8i5D0DUhCw2a7pmXBRY1aXZe ohW6eZ4f6G+fImkd/3YWHrJNQQZ76rWMVJft0dwgT8o8XWqIi2Cokai3LFyyB7WlYhne JXZ5RSAlUsHkSNEjRZVn0h+/u2ro4lHe7ihIK8KYqNvEX7rf7HZwRynXMf3pWRLm3/Yx Escw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:mime-version:message-id:date; bh=TZrVaCXMtdyt00kxgbLvhw/WVGnEIYpG0D6aWowNtCo=; b=xJAnh4ctdCQ0qnwvGLa75Elj4SGucrdqlZ5+BNsSlah9rlslNmaprnb5gXwNo/F2Yx 1WJhtyG69gKM3o8H471Dq7FWrn/9tDfMvIDGWuiAdNQ+8N4BNqm3ZQFALk6Uc8dTKWWe 0wUYr2QogY/091TFZejZKGhB9F1G3IPn96uMxysNxrSoXjqKpA55MRR/fy5CoZtNmtqN ORy2ZqNCRD2MEFsmJNoJn/QrRa+/hyviac6WjcMsQ/GQPUhseGtmYU8kcP1Ffd02K3T9 H7xwU/qIq6jlbfoq2rQd3x47hff2uOWQxmJ2UvAegkmjB72sYt2PSJ/t5zkBYL1J1ZqZ 5vBg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y6-20020a056402358600b004642b0f2357si343886edc.589.2022.11.16.23.53.19; Wed, 16 Nov 2022 23:53:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239395AbiKQHsP (ORCPT + 99 others); Thu, 17 Nov 2022 02:48:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234715AbiKQHsN (ORCPT ); Thu, 17 Nov 2022 02:48:13 -0500 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6119B4AF3D; Wed, 16 Nov 2022 23:48:12 -0800 (PST) Received: from mse-fl2.zte.com.cn (unknown [10.5.228.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxhk.zte.com.cn (FangMail) with ESMTPS id 4NCX8V6xM3z8R03d; Thu, 17 Nov 2022 15:48:10 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.40.50]) by mse-fl2.zte.com.cn with SMTP id 2AH7m4wx022774; Thu, 17 Nov 2022 15:48:05 +0800 (+08) (envelope-from ye.xingchen@zte.com.cn) Received: from mapi (xaxapp01[null]) by mapi (Zmail) with MAPI id mid31; Thu, 17 Nov 2022 15:48:06 +0800 (CST) Date: Thu, 17 Nov 2022 15:48:06 +0800 (CST) X-Zmail-TransId: 2af96375e73619689491 X-Mailer: Zmail v1.0 Message-ID: <202211171548066327249@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , , Subject: =?utf-8?q?=5BPATCH_linux-next=5D_soc=3A_qcom=3A_smem=5Fstate=3A_Use?= =?utf-8?q?_device=5Fmatch=5Fof=5Fnode=28=29?= X-MAIL: mse-fl2.zte.com.cn 2AH7m4wx022774 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.250.137.novalocal with ID 6375E73A.003 by FangMail milter! X-FangMail-Envelope: 1668671290/4NCX8V6xM3z8R03d/6375E73A.003/10.5.228.133/[10.5.228.133]/mse-fl2.zte.com.cn/ X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 6375E73A.003/4NCX8V6xM3z8R03d X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749729015864202832?= X-GMAIL-MSGID: =?utf-8?q?1749729015864202832?= From: ye xingchen Replace the open-code with device_match_of_node(). Signed-off-by: ye xingchen --- drivers/soc/qcom/smem_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/qcom/smem_state.c b/drivers/soc/qcom/smem_state.c index e848cc9a3cf8..a7844841a727 100644 --- a/drivers/soc/qcom/smem_state.c +++ b/drivers/soc/qcom/smem_state.c @@ -63,7 +63,7 @@ static struct qcom_smem_state *of_node_to_state(struct device_node *np) mutex_lock(&list_lock); list_for_each_entry(state, &smem_states, list) { - if (state->of_node == np) { + if (device_match_of_node(state, np)) { kref_get(&state->refcount); goto unlock; }