From patchwork Fri Nov 25 07:44:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: ye.xingchen@zte.com.cn X-Patchwork-Id: 25868 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp3834427wrr; Thu, 24 Nov 2022 23:48:51 -0800 (PST) X-Google-Smtp-Source: AA0mqf5glQ/OzZFIP0O4AMyDim1zjJqACIZD6fOMhSV8pVewtjQEKBWDc6WH1fxKJede1pDdO50H X-Received: by 2002:a17:906:1dc3:b0:7ad:bbcc:814 with SMTP id v3-20020a1709061dc300b007adbbcc0814mr31119562ejh.425.1669362530773; Thu, 24 Nov 2022 23:48:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669362530; cv=none; d=google.com; s=arc-20160816; b=NqWtufBSjEH4crhBJStBzAeCnQsHva8piomWavg381AubzzroyOk/do3bccQ511TMD HbMYQ9K1blxIRQnunROSKd+38O4SoqLwr6fKvnEw7NTrgJPrEqrztvz/5kkGettJst+I 5a0K9rmL+K2BeWNrD1Kf/hzKcSNDT7GF4nSzuQcOkJS+43t3bNwq9KP6Mk5JvqCmndFt lS1/iQ6dH1GjAqkJcDDEKpLKgUrUWtDk5YluBiOUaKxLRXkOvW60YIUd9mqBE2sK+YkR NGqZKLW5AFUaIKf9HeoX4ULjEI1l4e33kZvh/YHtvKgfLi/ytZXSWNtrzOeOgM+deuD/ 9qsA== 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=09OF4ONcaCbpxbsI9e9xLRPx6mOS6fyoqRgEw7KnSj8=; b=0yXShG53CDbbam7P8WmpQJHv5yftFFOUUIF6zHlohrab4vyMKt+T90/KeONuCz3eUY Fk8gg5Navt20Y42+gzmAVYO/irgecdHssWG65vnuaXX2zad3qq/MZxH2uOOGoP7mMR/y NIIlnkk0xmrEqx63mL88vNqropAAW0t2Ihbs67byavXAUntWdDSPlnF15Nkm00WQh5ET U+ksWdVC3QCLLY6TX0gNmVkVflxQuTDXlFy6Cjy+AYlcmcRbDjP6nARGXxT4w0m56n8M VvgOQxsOrbcTdjEbgNbdAbhEfMKUwM8OFcUYOU9mkckX50axaKXQn5LrW8ArU4l9ArJt I1/Q== 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 c17-20020aa7df11000000b00463c5c32c65si2101202edy.457.2022.11.24.23.48.26; Thu, 24 Nov 2022 23:48:50 -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 S229491AbiKYHou (ORCPT + 99 others); Fri, 25 Nov 2022 02:44:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbiKYHot (ORCPT ); Fri, 25 Nov 2022 02:44:49 -0500 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D09772C128; Thu, 24 Nov 2022 23:44:48 -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 4NJRhv2y4jz4xVnK; Fri, 25 Nov 2022 15:44:47 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.40.50]) by mse-fl2.zte.com.cn with SMTP id 2AP7iZ1o090552; Fri, 25 Nov 2022 15:44:35 +0800 (+08) (envelope-from ye.xingchen@zte.com.cn) Received: from mapi (xaxapp02[null]) by mapi (Zmail) with MAPI id mid31; Fri, 25 Nov 2022 15:44:36 +0800 (CST) Date: Fri, 25 Nov 2022 15:44:36 +0800 (CST) X-Zmail-TransId: 2afa638072642d79166f X-Mailer: Zmail v1.0 Message-ID: <202211251544369078587@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , , Subject: =?utf-8?q?=5BPATCH=5D_hwspinlock=3A_Use_device=5Fmatch=5Fof=5Fnode?= =?utf-8?q?=28=29?= X-MAIL: mse-fl2.zte.com.cn 2AP7iZ1o090552 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.250.138.novalocal with ID 6380726F.001 by FangMail milter! X-FangMail-Envelope: 1669362287/4NJRhv2y4jz4xVnK/6380726F.001/10.5.228.133/[10.5.228.133]/mse-fl2.zte.com.cn/ X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 6380726F.001/4NJRhv2y4jz4xVnK X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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?1750453484771501813?= X-GMAIL-MSGID: =?utf-8?q?1750453484771501813?= From: ye xingchen Replace the open-code with device_match_of_node(). Signed-off-by: ye xingchen Reviewed-by: Baolin Wang Reviewed-by: Philippe Mathieu-Daudé --- drivers/hwspinlock/hwspinlock_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwspinlock/hwspinlock_core.c b/drivers/hwspinlock/hwspinlock_core.c index fd5f5c5a5244..22b8f2a70b3b 100644 --- a/drivers/hwspinlock/hwspinlock_core.c +++ b/drivers/hwspinlock/hwspinlock_core.c @@ -367,7 +367,7 @@ int of_hwspin_lock_get_id(struct device_node *np, int index) continue; } - if (hwlock->bank->dev->of_node == args.np) { + if (device_match_of_node(hwlock->bank->dev, args.np)) { ret = 0; break; }