Message ID | 202211171431525183998@zte.com.cn |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp243936wrr; Wed, 16 Nov 2022 22:38:18 -0800 (PST) X-Google-Smtp-Source: AA0mqf6J3BPJBjzqStwiukuzp9Lz8oFDpUAk3I/icfDW4nXeiVRicNPcJvr6NZazb6+JX5eOJDTW X-Received: by 2002:a17:906:19d2:b0:78e:11ea:8528 with SMTP id h18-20020a17090619d200b0078e11ea8528mr1014965ejd.190.1668667097876; Wed, 16 Nov 2022 22:38:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668667097; cv=none; d=google.com; s=arc-20160816; b=N3QBhMH8wpwG1Tum0Ydo2Qltug4wMt4gzKUUuqH1cBDzH5xzg8s9q7+4NEN2g4ZYdL MjKSZ5Hat4fbrEjn9SelUEvKoQYxHE7efh7W5fhDTiKSjK2akK5tU7bCi7MwjkQCPYPN U8BXoJeIGB+Y3XDQck6JCTUlO17oQChk9F83a6f9PRTWWQ+fzdS9mHV/hbw2/CC7KEZi njkV72V+L9IZAyt14NwyJ81HvJUsf6eTxvekpLxCyZAb32O5EztSjsvzqyMnc4KHHiFb N5NBeiJ+vCAKIDrlgyHMUxhK10QBRRJw6bPpyRowJrFTyJ1LRNNqBNNWFQSFXdoRmOCm RrhA== 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=Ayc95Lib1CB5bG49CDlq6A3ELFkc7X/0xWbxfe2TB90=; b=ISfTczMCrRQg43+OYjcWPMvv27Ymc0zdhp9T6Jlt7yO7T8wmpna8bzP+ssxIwMgmo+ pRt1Fm1nDjDISVoViy614Q02f5IV+9SOR3TqsQU+sNTSqFrsc27E/F2cxIj+L1lgKjP4 1jdROURdQh+PUzr1aTaQDhS2aLMEKqBi5a7Z5IKFNfUGBJgFTHbmiAeM6xA64x0IL6x7 JZ2AiDZKoUI3fAyoMRAiCDvEea1ttmrMFq/Rthw5HWDg3k1FzGbyFlSrdG/lSZbxhUmS wwYLIzFjr1eOqrYNgM+4sKzYdGO0O7wDlDgg76caZdyqTnZsC/yPuXxPgFmkgjLy4TRk 4mpw== 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 hd39-20020a17090796a700b007ae72fcabb3si18735051ejc.838.2022.11.16.22.37.54; Wed, 16 Nov 2022 22:38:17 -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 S234615AbiKQGcH (ORCPT <rfc822;just.gull.subs@gmail.com> + 99 others); Thu, 17 Nov 2022 01:32:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231748AbiKQGcF (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 17 Nov 2022 01:32:05 -0500 Received: from mxct.zte.com.cn (mxct.zte.com.cn [183.62.165.209]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32982DFAF for <linux-kernel@vger.kernel.org>; Wed, 16 Nov 2022 22:32:03 -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 mxct.zte.com.cn (FangMail) with ESMTPS id 4NCVSf0W3jz4y0vH; Thu, 17 Nov 2022 14:32:02 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.40.50]) by mse-fl2.zte.com.cn with SMTP id 2AH6VokF020503; Thu, 17 Nov 2022 14:31:50 +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 14:31:52 +0800 (CST) Date: Thu, 17 Nov 2022 14:31:52 +0800 (CST) X-Zmail-TransId: 2af96375d558ffffffffbcb9afb4 X-Mailer: Zmail v1.0 Message-ID: <202211171431525183998@zte.com.cn> Mime-Version: 1.0 From: <ye.xingchen@zte.com.cn> To: <maarten.lankhorst@linux.intel.com> Cc: <mripard@kernel.org>, <tzimmermann@suse.de>, <airlied@gmail.com>, <daniel@ffwll.ch>, <dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org> Subject: =?utf-8?q?=5BPATCH_linux-next=5D_drm/bridge=3A_Use_device=5Fmatch?= =?utf-8?q?=5Fof=5Fnode=28=29?= Content-Type: text/plain; charset="UTF-8" X-MAIL: mse-fl2.zte.com.cn 2AH6VokF020503 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.251.13.novalocal with ID 6375D562.000 by FangMail milter! X-FangMail-Envelope: 1668666722/4NCVSf0W3jz4y0vH/6375D562.000/10.5.228.133/[10.5.228.133]/mse-fl2.zte.com.cn/<ye.xingchen@zte.com.cn> X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 6375D562.000/4NCVSf0W3jz4y0vH 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749724270868992718?= X-GMAIL-MSGID: =?utf-8?q?1749724270868992718?= |
Series |
[linux-next] drm/bridge: Use device_match_of_node()
|
|
Commit Message
ye.xingchen@zte.com.cn
Nov. 17, 2022, 6:31 a.m. UTC
From: ye xingchen <ye.xingchen@zte.com.cn> Replace the open-code with device_match_of_node(). Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> --- drivers/gpu/drm/drm_bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Hi, Thank you for the patch! Yet something to improve: [auto build test ERROR on next-20221116] url: https://github.com/intel-lab-lkp/linux/commits/ye-xingchen-zte-com-cn/drm-bridge-Use-device_match_of_node/20221117-143318 patch link: https://lore.kernel.org/r/202211171431525183998%40zte.com.cn patch subject: [PATCH linux-next] drm/bridge: Use device_match_of_node() config: i386-randconfig-a002 compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/ac41c97354fe9c549e20dc7e50a237a577cd71e9 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review ye-xingchen-zte-com-cn/drm-bridge-Use-device_match_of_node/20221117-143318 git checkout ac41c97354fe9c549e20dc7e50a237a577cd71e9 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/gpu/drm/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> All errors (new ones prefixed by >>): >> drivers/gpu/drm/drm_bridge.c:1310:28: error: incompatible pointer types passing 'struct drm_bridge *' to parameter of type 'struct device *' [-Werror,-Wincompatible-pointer-types] if (device_match_of_node(bridge, np)) { ^~~~~~ include/linux/device/bus.h:145:41: note: passing argument to parameter 'dev' here int device_match_of_node(struct device *dev, const void *np); ^ 1 error generated. vim +1310 drivers/gpu/drm/drm_bridge.c 1292 1293 #ifdef CONFIG_OF 1294 /** 1295 * of_drm_find_bridge - find the bridge corresponding to the device node in 1296 * the global bridge list 1297 * 1298 * @np: device node 1299 * 1300 * RETURNS: 1301 * drm_bridge control struct on success, NULL on failure 1302 */ 1303 struct drm_bridge *of_drm_find_bridge(struct device_node *np) 1304 { 1305 struct drm_bridge *bridge; 1306 1307 mutex_lock(&bridge_lock); 1308 1309 list_for_each_entry(bridge, &bridge_list, list) { > 1310 if (device_match_of_node(bridge, np)) { 1311 mutex_unlock(&bridge_lock); 1312 return bridge; 1313 } 1314 } 1315 1316 mutex_unlock(&bridge_lock); 1317 return NULL; 1318 } 1319 EXPORT_SYMBOL(of_drm_find_bridge); 1320 #endif 1321
Hi, Thank you for the patch! Yet something to improve: [auto build test ERROR on next-20221116] url: https://github.com/intel-lab-lkp/linux/commits/ye-xingchen-zte-com-cn/drm-bridge-Use-device_match_of_node/20221117-143318 patch link: https://lore.kernel.org/r/202211171431525183998%40zte.com.cn patch subject: [PATCH linux-next] drm/bridge: Use device_match_of_node() config: m68k-randconfig-r035-20221117 compiler: m68k-linux-gcc (GCC) 12.1.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/ac41c97354fe9c549e20dc7e50a237a577cd71e9 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review ye-xingchen-zte-com-cn/drm-bridge-Use-device_match_of_node/20221117-143318 git checkout ac41c97354fe9c549e20dc7e50a237a577cd71e9 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash drivers/gpu/drm/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> All errors (new ones prefixed by >>): drivers/gpu/drm/drm_bridge.c: In function 'of_drm_find_bridge': >> drivers/gpu/drm/drm_bridge.c:1310:42: error: passing argument 1 of 'device_match_of_node' from incompatible pointer type [-Werror=incompatible-pointer-types] 1310 | if (device_match_of_node(bridge, np)) { | ^~~~~~ | | | struct drm_bridge * In file included from include/linux/device.h:30, from include/linux/hdmi.h:28, from include/drm/drm_modes.h:30, from include/drm/drm_crtc.h:32, from include/drm/drm_atomic.h:31, from include/drm/drm_bridge.h:30, from drivers/gpu/drm/drm_bridge.c:30: include/linux/device/bus.h:145:41: note: expected 'struct device *' but argument is of type 'struct drm_bridge *' 145 | int device_match_of_node(struct device *dev, const void *np); | ~~~~~~~~~~~~~~~^~~ cc1: some warnings being treated as errors vim +/device_match_of_node +1310 drivers/gpu/drm/drm_bridge.c 1292 1293 #ifdef CONFIG_OF 1294 /** 1295 * of_drm_find_bridge - find the bridge corresponding to the device node in 1296 * the global bridge list 1297 * 1298 * @np: device node 1299 * 1300 * RETURNS: 1301 * drm_bridge control struct on success, NULL on failure 1302 */ 1303 struct drm_bridge *of_drm_find_bridge(struct device_node *np) 1304 { 1305 struct drm_bridge *bridge; 1306 1307 mutex_lock(&bridge_lock); 1308 1309 list_for_each_entry(bridge, &bridge_list, list) { > 1310 if (device_match_of_node(bridge, np)) { 1311 mutex_unlock(&bridge_lock); 1312 return bridge; 1313 } 1314 } 1315 1316 mutex_unlock(&bridge_lock); 1317 return NULL; 1318 } 1319 EXPORT_SYMBOL(of_drm_find_bridge); 1320 #endif 1321
Hi, Thank you for the patch! Yet something to improve: [auto build test ERROR on next-20221116] url: https://github.com/intel-lab-lkp/linux/commits/ye-xingchen-zte-com-cn/drm-bridge-Use-device_match_of_node/20221117-143318 patch link: https://lore.kernel.org/r/202211171431525183998%40zte.com.cn patch subject: [PATCH linux-next] drm/bridge: Use device_match_of_node() config: arm-randconfig-r024-20221117 compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project bbe6bd724a6335e497c7edaed191d37a828d0390) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install arm cross compiling tool for clang build # apt-get install binutils-arm-linux-gnueabi # https://github.com/intel-lab-lkp/linux/commit/ac41c97354fe9c549e20dc7e50a237a577cd71e9 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review ye-xingchen-zte-com-cn/drm-bridge-Use-device_match_of_node/20221117-143318 git checkout ac41c97354fe9c549e20dc7e50a237a577cd71e9 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> All errors (new ones prefixed by >>): >> drivers/gpu/drm/drm_bridge.c:1310:28: error: incompatible pointer types passing 'struct drm_bridge *' to parameter of type 'struct device *' [-Werror,-Wincompatible-pointer-types] if (device_match_of_node(bridge, np)) { ^~~~~~ include/linux/device/bus.h:145:41: note: passing argument to parameter 'dev' here int device_match_of_node(struct device *dev, const void *np); ^ 1 error generated. vim +1310 drivers/gpu/drm/drm_bridge.c 1292 1293 #ifdef CONFIG_OF 1294 /** 1295 * of_drm_find_bridge - find the bridge corresponding to the device node in 1296 * the global bridge list 1297 * 1298 * @np: device node 1299 * 1300 * RETURNS: 1301 * drm_bridge control struct on success, NULL on failure 1302 */ 1303 struct drm_bridge *of_drm_find_bridge(struct device_node *np) 1304 { 1305 struct drm_bridge *bridge; 1306 1307 mutex_lock(&bridge_lock); 1308 1309 list_for_each_entry(bridge, &bridge_list, list) { > 1310 if (device_match_of_node(bridge, np)) { 1311 mutex_unlock(&bridge_lock); 1312 return bridge; 1313 } 1314 } 1315 1316 mutex_unlock(&bridge_lock); 1317 return NULL; 1318 } 1319 EXPORT_SYMBOL(of_drm_find_bridge); 1320 #endif 1321
diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c index 1545c50fd1c8..4a8cafe2b130 100644 --- a/drivers/gpu/drm/drm_bridge.c +++ b/drivers/gpu/drm/drm_bridge.c @@ -1307,7 +1307,7 @@ struct drm_bridge *of_drm_find_bridge(struct device_node *np) mutex_lock(&bridge_lock); list_for_each_entry(bridge, &bridge_list, list) { - if (bridge->of_node == np) { + if (device_match_of_node(bridge, np)) { mutex_unlock(&bridge_lock); return bridge; }