Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1459602pxu; Fri, 27 Nov 2020 07:44:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJySQhlWHryKjR98a57EPu63oBj29K9r02YWresCfa7HPKcAlnvjvKq584gHXdZppXrZ7zR2 X-Received: by 2002:a05:6402:1593:: with SMTP id c19mr7768316edv.269.1606491863524; Fri, 27 Nov 2020 07:44:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606491863; cv=none; d=google.com; s=arc-20160816; b=0SI7AwXNqmhOFYabw9jsmvQY46qS6Z65Ox7GvIsYwfC3Z9uOewn/PARdza+nZLRJdg WzcA30YUcibEiWCmNDMFc1pF3jdlUJzHGED+J3wLg7eX8orvuR4kGTd39bk5v3Y62q7D q3PIBkvqoWTmp4ljcR2RTc3RYZG14buax+2/JkmWC7tUYBm0eYxkGuTqpzoGXmG28gwJ btOjZ+DEl6ULkdgq33DHeqZehbjT5Ik1BaQ4t6wsEg/lnv8gWZEm6ce3eIQcnezuwXIu gx562NJ4SIrZ5TcJVElZa9Cg5Paqm6BuJZ8R99c4WeFipMoIZtn932CuK/acyoZ37J31 JVJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=2pBYS0YD09ZNwP3MsMG1NDl3sTm6BHmwAJZST+7OreY=; b=bZiVGmOsyvQ75NmD7ffvTIoLRVcUgxAdVVm+U5Qwc/cckDHsiCY49HE/m54yCyUy7x Mtiw6PgZurweCg876z6HtPfD4iNSMJlkURyfKcySv4Tvm9JfFllwK7yp069PwNqaVsml eiqVHMXr1T0Kuj7PemVNTSnxShIYZ0AyGAFILXks+2ycEUk0LFKvtkOlOvW+znv5wbfS ZnY2UlQQPXq7had8N73VmxnTUEswIIx6ZNQ1HPzw5vmINE4IDzEdswAyhDpcKirU5P+l 4DyxmrufX87epuUnzdnIEU+5w5SPJr1czAhxGLR7JMzXN5h3KuAkZWl5LEnauBYJIcv7 PwKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@roeck-us.net header.s=default header.b=mU1NS5xb; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o2si5238177ejn.501.2020.11.27.07.43.59; Fri, 27 Nov 2020 07:44:23 -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=fail header.i=@roeck-us.net header.s=default header.b=mU1NS5xb; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731137AbgK0Pkg (ORCPT + 99 others); Fri, 27 Nov 2020 10:40:36 -0500 Received: from gproxy8-pub.mail.unifiedlayer.com ([67.222.33.93]:56120 "EHLO gproxy8-pub.mail.unifiedlayer.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730324AbgK0Pkg (ORCPT ); Fri, 27 Nov 2020 10:40:36 -0500 Received: from CMGW (unknown [10.9.0.13]) by gproxy8.mail.unifiedlayer.com (Postfix) with ESMTP id 4BE801AB105 for ; Fri, 27 Nov 2020 08:40:35 -0700 (MST) Received: from bh-25.webhostbox.net ([208.91.199.152]) by cmsmtp with ESMTP id ifrOkytFfi1lMifrPkxY5K; Fri, 27 Nov 2020 08:40:35 -0700 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.2 cv=dd3w5Tfe c=1 sm=1 tr=0 a=QNED+QcLUkoL9qulTODnwA==:117 a=2cfIYNtKkjgZNaOwnGXpGw==:17 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=kj9zAlcOel0A:10 a=nNwsprhYR40A:10 a=evQFzbml-YQA:10 a=BTeA3XvPAAAA:8 a=YPWOSqNe3Y0DLtFEYbAA:9 a=CjuIK1q_8ugA:10 a=tafbbOV3vt1XuEhzTjGK:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=roeck-us.net; s=default; h=In-Reply-To:Content-Type:MIME-Version:References :Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding :Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=2pBYS0YD09ZNwP3MsMG1NDl3sTm6BHmwAJZST+7OreY=; b=mU1NS5xbIQgt7NWROsUxDeh636 7T7Peb3cxkzSYOBke/uczLqX44EvTKAXiRBDIJ0Zg+s9/ABG2g7SuWi25roGuW5Fsh/5j6Jd95dlz Pnugl1PUaROLki/091SjC25z7BdbhQUgcBcQ6MMc4B0KIHYbdE9i+3+UGBZqjcZi1/dckpEo8GOpH MAd2qrEUwP4c3i30bBm+LDzZCBX8KBh9BfWgwF5kWIhauesmDuvtaquxy+cMq5PrwULH0e/I3K6hG hZv60x+8deyA5qAK2cEMYm0ilwdsglBmvMHQ8gV9g7yX8mjcM01u9cNexZ2mlWSZObxcFUW6xmkEx Kua1sBWQ==; Received: from 108-223-40-66.lightspeed.sntcca.sbcglobal.net ([108.223.40.66]:43368 helo=localhost) by bh-25.webhostbox.net with esmtpa (Exim 4.93) (envelope-from ) id 1kifrO-002bDh-Dy; Fri, 27 Nov 2020 15:40:34 +0000 Date: Fri, 27 Nov 2020 07:40:33 -0800 From: Guenter Roeck To: Tian Tao Cc: jdelvare@suse.com, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] hwmon: (abx500): Switch to using the new API kobj_to_dev() Message-ID: <20201127154033.GA9268@roeck-us.net> References: <1606357280-51921-1-git-send-email-tiantao6@hisilicon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1606357280-51921-1-git-send-email-tiantao6@hisilicon.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-BWhitelist: no X-Source-IP: 108.223.40.66 X-Source-L: No X-Exim-ID: 1kifrO-002bDh-Dy X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 108-223-40-66.lightspeed.sntcca.sbcglobal.net (localhost) [108.223.40.66]:43368 X-Source-Auth: guenter@roeck-us.net X-Email-Count: 6 X-Source-Cap: cm9lY2s7YWN0aXZzdG07YmgtMjUud2ViaG9zdGJveC5uZXQ= X-Local-Domain: yes Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 26, 2020 at 10:21:20AM +0800, Tian Tao wrote: > fixed the following coccicheck: > drivers/hwmon/abx500.c:266:60-61: WARNING opportunity for kobj_to_dev(). > > Signed-off-by: Tian Tao Applied. Thanks, Guenter > --- > drivers/hwmon/abx500.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/hwmon/abx500.c b/drivers/hwmon/abx500.c > index 50e67cd..4b96488 100644 > --- a/drivers/hwmon/abx500.c > +++ b/drivers/hwmon/abx500.c > @@ -263,7 +263,7 @@ static ssize_t max_alarm_show(struct device *dev, > static umode_t abx500_attrs_visible(struct kobject *kobj, > struct attribute *attr, int n) > { > - struct device *dev = container_of(kobj, struct device, kobj); > + struct device *dev = kobj_to_dev(kobj); > struct abx500_temp *data = dev_get_drvdata(dev); > > if (data->ops.is_visible)