Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp6005pxb; Tue, 2 Mar 2021 17:11:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJy3q07zk+XQ6K65ot2LIwvTe5P6ER+OGksWPO/MCYgGmlQZUJnmpgyiczn8RPN/PvE5hsJ3 X-Received: by 2002:a17:906:d9d1:: with SMTP id qk17mr984751ejb.52.1614733894879; Tue, 02 Mar 2021 17:11:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614733894; cv=none; d=google.com; s=arc-20160816; b=C1mpiLQwoEVS8MjWIfYLh6cYi7rY5TcL/kXwmiesknwiqctxrMkTrKMprqkZJIihJq r1zKO/ez0ZNJjvscJnPnY6FiGeaUTIKL/vI+0qH6q66sJRrxKJ2upCRNyZVAptnHXsp0 46cYozZ0s3OmScRQPWOjGtfD//d3UdR/3IAyoFaV0/ZWPE4kspo9xt7mhUGRdMnhCGoI 92cbEV4iAHXIYVFeM7QrrnNe26LvYSc9aNBBQzYSFqKUZ5ZkoOxN1p/U8R5g1mM4V9Dh QEZGIlF0fkwPvvRkUYb+c6QKnB6mltPSivfpnDug12mZ8KhBV2DUSIvLRhO9bKSCU5+r mVeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=IbD1b7/rueEcENifhVuXKKAxarEvojqTWJYIab6Qe2o=; b=a3KW7jaT0HTcxHFnhCXRQHrTBwttTeAVC66t8/4IcnVhIjrxWEIABz0YE6k6KglAJ5 jvXxwrugImHLbcGdwLYKNzgro5o9hmAauDSm4tTI8Ve9lLGxWrp0V/hysimSr5d4qgpj yULH7nJoKQor2r6tiw8IdmjjLLr/ZlT/UZmPjfhpeWX/e7UlV28vGQyxqQZd+T0ebWfL r2kfO6KBONp4kP/Or9wLDa0XHNum+2AEHaqR6LSbrpNZFX0RzE9AFNfzwpAvEOc+VNeR Xnu8RbHO+6FFBXUQrb1pE7Ogl1P6z3hu5SrDjWHBqdGmw5CLnT/YlTJQYFI86YJ8UBoY curw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h6si14115222ejs.315.2021.03.02.17.11.12; Tue, 02 Mar 2021 17:11:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233722AbhCAJOL (ORCPT + 99 others); Mon, 1 Mar 2021 04:14:11 -0500 Received: from out30-42.freemail.mail.aliyun.com ([115.124.30.42]:57251 "EHLO out30-42.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233009AbhCAJOJ (ORCPT ); Mon, 1 Mar 2021 04:14:09 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R581e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04420;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=3;SR=0;TI=SMTPD_---0UPxZNk7_1614590005; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0UPxZNk7_1614590005) by smtp.aliyun-inc.com(127.0.0.1); Mon, 01 Mar 2021 17:13:26 +0800 From: Yang Li To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH] driver core: Switch to using the new API kobj_to_dev() Date: Mon, 1 Mar 2021 17:13:24 +0800 Message-Id: <1614590004-69592-1-git-send-email-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org fixed the following coccicheck: ./include/linux/device.h:590:46-47: WARNING opportunity for kobj_to_dev() Reported-by: Abaci Robot Signed-off-by: Yang Li --- include/linux/device.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/device.h b/include/linux/device.h index ba66073..31d7137 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -587,7 +587,7 @@ struct device_link { static inline struct device *kobj_to_dev(struct kobject *kobj) { - return container_of(kobj, struct device, kobj); + return kobj_to_dev(kobj); } /** -- 1.8.3.1