Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4324650pxb; Tue, 2 Mar 2021 12:06:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJyIlRFvLDKItPhFDEKws6/v488U3P2nqSprxc1CsXGXakB1dQopUeMwHBIT//mVCNvgaL7I X-Received: by 2002:a17:906:a157:: with SMTP id bu23mr21675633ejb.491.1614715594150; Tue, 02 Mar 2021 12:06:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614715594; cv=none; d=google.com; s=arc-20160816; b=BpPwqxxK/3AGXSzCrwCgkCGLfpT7vAPz4Xxfp7qE57mOKRSOZbjw+Ge3uJi5puSbws etjNxkj7Hus98RWR+fIL8uKf2r5EQshKU735xgb4hBlvU1oAEcrRC9KGs6nX/02ackjq uJrF2kJHWPDqkEHfmyDmY6/TZDVfBITtcP4Gdz+Eipi8HiT9+kufSVw7KqfHzu85ycPf 9b0xn+LuJ73uS93TBM5yYALgbcNJF0cAMsthSAKNzFuaIT9MOEDYA0Xm4TY3drgKs5n/ Dq7ch1LlEHMlM1tE+U2q80MoS1VHHbm9DhAwoNjqVoME5hOU7mSXeW+yTQUiSDUOrCeG Es4g== 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=ndfH+fNWWqeqPWwtWnw4DOzBhfCqNsEYcsxlzty/VNM=; b=phKC7FnrVTC2nrxBIu2l3IrwhtSbLf3WnvlpQq3XZ3gfRdKw7bMQy6RcfjIirVRxja MHDNedfVURt/XlSeeyynlDa28h4mgWf+gmTYHLQqCa51ejhrUR6sdHWTLB2lfb4L3jG8 HByqYZVfkDULBPUwHo7JMjMnrVGQJQYCz6h6jxOEv90ZK06FZV5e80CHPg3UAbFPBtBY 2bw3XB9cN+4ZrYJnVFNRHDAPZ/RXQ/BntmhGjclzo3ZGbAM6mRYooAFT6hFejXvxIL32 6Lx3mTqzPHKjEWB+hIM7Kx3KJAXtZ1YS/Z/ROszE/sSEBgyABdiLGbJDWjhR8/blOxFu A0Mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TosIvsAf; 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 q18si6934624ejy.55.2021.03.02.12.06.02; Tue, 02 Mar 2021 12:06: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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TosIvsAf; 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 S1836638AbhCBHTK (ORCPT + 99 others); Tue, 2 Mar 2021 02:19:10 -0500 Received: from mail.kernel.org ([198.145.29.99]:43610 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1835931AbhCBG1r (ORCPT ); Tue, 2 Mar 2021 01:27:47 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4C2A46148E; Tue, 2 Mar 2021 06:27:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614666426; bh=+3Kv/EyqZjPRD+Ojky4zLLPgLaC/qvoYz7Cg7qQNlrY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TosIvsAfWKqiI7ePx73vBmF1fNpgflKKlKo9BMAvbAdW9Kg7T8LXGGUs9s5lq2IAg S6R6h1F57+OkErmWIhAzD56x8wVue/UN5C/GrVcdbuDC3V6TvSiwYJk66blRUgL1QY mDMvP2uGGxahSHsfTRbZjGczc/B9ABsJE2i4AaUE= Date: Tue, 2 Mar 2021 07:27:01 +0100 From: Greg KH To: Tian Tao Cc: rikard.falkeborn@gmail.com, zbr@ioremap.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH] w1: ds2708 and ds2781 use the new API kobj_to_dev() Message-ID: References: <1614665822-12258-1-git-send-email-tiantao6@hisilicon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1614665822-12258-1-git-send-email-tiantao6@hisilicon.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 02, 2021 at 02:17:02PM +0800, Tian Tao wrote: > fix the below warnning which reported by coccicheck. > /drivers/w1/slaves/w1_ds2780.c:93:60-61: WARNING opportunity for > kobj_to_dev(). > /drivers/w1/slaves/w1_ds2781.c:90:60-61: WARNING opportunity for > kobj_to_dev(). > > Signed-off-by: Tian Tao > --- > drivers/w1/slaves/w1_ds2780.c | 2 +- > drivers/w1/slaves/w1_ds2781.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/w1/slaves/w1_ds2780.c b/drivers/w1/slaves/w1_ds2780.c > index c281fe5..9dcb5a5 100644 > --- a/drivers/w1/slaves/w1_ds2780.c > +++ b/drivers/w1/slaves/w1_ds2780.c > @@ -90,7 +90,7 @@ static ssize_t w1_slave_read(struct file *filp, struct kobject *kobj, > struct bin_attribute *bin_attr, char *buf, > loff_t off, size_t count) > { > - struct device *dev = container_of(kobj, struct device, kobj); > + struct device *dev = kobj_to_dev(kobj); > return w1_ds2780_io(dev, buf, off, count, 0); > } > > diff --git a/drivers/w1/slaves/w1_ds2781.c b/drivers/w1/slaves/w1_ds2781.c > index f0d393a..2cb7c02 100644 > --- a/drivers/w1/slaves/w1_ds2781.c > +++ b/drivers/w1/slaves/w1_ds2781.c > @@ -87,7 +87,7 @@ static ssize_t w1_slave_read(struct file *filp, struct kobject *kobj, > struct bin_attribute *bin_attr, char *buf, > loff_t off, size_t count) > { > - struct device *dev = container_of(kobj, struct device, kobj); > + struct device *dev = kobj_to_dev(kobj); > return w1_ds2781_io(dev, buf, off, count, 0); > } > > -- > 2.7.4 > Hi, This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree. You are receiving this message because of the following common error(s) as indicated below: - This looks like a new version of a previously submitted patch, but you did not list below the --- line any changes from the previous version. Please read the section entitled "The canonical patch format" in the kernel file, Documentation/SubmittingPatches for what needs to be done here to properly describe this. If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers. thanks, greg k-h's patch email bot