Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp11662pxb; Tue, 2 Mar 2021 17:21:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJzKWpBpy1c73X8r78bp2Zm42dRJsxPXb9pQ6sUDovBRdRooM41WEU/juksh1dil2s3+LXLV X-Received: by 2002:a17:906:18aa:: with SMTP id c10mr23190158ejf.248.1614734513722; Tue, 02 Mar 2021 17:21:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614734513; cv=none; d=google.com; s=arc-20160816; b=Hy7qlv6F9gmwajf98bkIp8lJxnCKDttu95Dt+1thoWCWU1b5eZI0K52wsq5CnR21ac Yr8Rqi5eKJEjPnY1HvX5iqQRG1RNpf9v5hgG6NBC/NgI5RfPdfIXJlVrjKiYMWEvHjvr +bSuaIqZyMEhFnZ+XoRnatYmGnZEJzHMrXo7iYTypF5wLnqw0iRcSUk8kDrgIW2f2TYf 33jMtW+FQP67ndjXCNw3VgSybTShibVHVVupPHNW8rgUMsj5pwLwvQ9UfTxsuLp9rSMU 43eM6hFa2bNXlrHV4iN0bpuC0TRMqr7zoPlIw4mhovhlDCYrRM+3pS9+W5BzCxVrAWrk XiEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=kEP6wQ8CuetZOGKjzWAz5q71BK7pAqQ5OJaCNZay9oE=; b=lD4Uo9OqtzMWrX2xvUWzGYmHGdGDmXsTyZnENEDIeHObgApDn4vQiKSn8nQjSVXxRl vHq4c5mE5kp03TLUIYVY1DupkmKHL/BbQTsNSkAElMPTP/eM9tdoFiwZQ9ncJfXMBkZd ck2m666m0Dd/w1h/UNIpbnSC3m7jz+MnbPJER6tRUdpSsbQttWGZ7l0hMKhC7j8evZwp NNdMIoSZxm45M5jZpv4IsyrxQ8VsJQalPkC5qX/y4cVv34arU+iPk0iXzPQMIe5+J56E z60vfHUPo/z9voyuYm9+MAEQqecK7THM8exe1BcHpqKbytmXv1FcsaNFNSaCXKvOaY5C Dgfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rGWMCEHv; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j19si11514021edp.531.2021.03.02.17.21.31; Tue, 02 Mar 2021 17:21:53 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rGWMCEHv; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233903AbhCAJ1f (ORCPT + 99 others); Mon, 1 Mar 2021 04:27:35 -0500 Received: from mail.kernel.org ([198.145.29.99]:44222 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233896AbhCAJ1e (ORCPT ); Mon, 1 Mar 2021 04:27:34 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1F39164E45; Mon, 1 Mar 2021 09:26:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614590813; bh=VHgTRak+sl2GIrklguql/soqsfocI2iCaJWV3c8IHHk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rGWMCEHvjKg+rR1m2mrP0pGyK+uM8DfH1ppCkDe+10csVsmBcl7bTgq8USCqzE3JJ n/OUqPeNZS3ZPs4O3urTjunt9CXRgwZMZxPDIKhjDrv8OA5UrYY5slDEyT4p5o9/J6 547SMOJkYMjI4x+w4ZS3ulgWOmZID0JQvMrTD74o= Date: Mon, 1 Mar 2021 10:26:51 +0100 From: Greg KH To: Yang Li Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] driver core: Switch to using the new API kobj_to_dev() Message-ID: References: <1614590004-69592-1-git-send-email-yang.lee@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1614590004-69592-1-git-send-email-yang.lee@linux.alibaba.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 01, 2021 at 05:13:24PM +0800, Yang Li wrote: > 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); > } Did you test this change? Please do so... {sigh} greg k-h