Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp798447pxu; Thu, 26 Nov 2020 12:11:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJynchF/QAh/q3prAgkfbndgK/TQ90yHmtIH/j4+zS7FXsgijuS9Jr9oPJ123Gkzp7Q35jx2 X-Received: by 2002:a17:906:fa86:: with SMTP id lt6mr4178652ejb.483.1606421494480; Thu, 26 Nov 2020 12:11:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606421494; cv=none; d=google.com; s=arc-20160816; b=gh8yreoRqo0mziITaKUcMrhoCzf/ZuKH+2EVW3LiokuY6tv5p1cwJZgQMdraguKflf PWRW//TBVZNWqsb2EapEKIskHWvhltZy9xlSqGZOuuP47BzJm1u7Xu//05APK93WXyCh F6vLfvGYZZnJhNZod1LfaofyW02la9CCIBFCC9v4WFdlatHUa14XHpxY9UseCug6F/kz 2LN06YrGXYzyHyHBwXWOHU8OTi0ZR62GhcHfxPa5UX76GiteUmPkO/7eWQkCEL8FBvVd pdCJxsenqtcRIARvC6Umx6oWUgvZ+muLeBegcWBJlwuK39jIfXmtEhp8sXhTp8On2yeW WaqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=gtYC1eCeWKJx6/0nnW+LCkWJbQifYmk1xtEyWMT5dZw=; b=vMf85Vpoah09DPXw3d8N9USJdrq+Q5PB2EA+kgYbqLvzACBKCWOeP9oHjUO9m9Lt5n 5oPTJ5eCo2v5NzF/1m1T1Am4aAglNOkzBIHyOEfAkMCEsB+QOo+M4J7N+t6lNiKAzmrw m9OF8+f+pdFAEJEpA33wznbpGL6RKHucBJqVtj4sqTY/B6ib6h28SvHvGLUExbHBTrQe 6Tg5MNo51yXZAmjyW8WJZ/3Iapu90AWpsyatT91dSGKIOapiv3VZ1w+eioaQePBY26CS 4UDL2yhZBzcdMA94Bpv7yW7T8PxA09BvnN2o1eO+GuV0S99oryQaSQzsSvsv9skdAhTk tZbg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ce26si1710971edb.168.2020.11.26.12.11.12; Thu, 26 Nov 2020 12: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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733237AbgKZCVC (ORCPT + 99 others); Wed, 25 Nov 2020 21:21:02 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:8590 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732766AbgKZCVC (ORCPT ); Wed, 25 Nov 2020 21:21:02 -0500 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4ChM1F02LXzLrQ3; Thu, 26 Nov 2020 10:20:33 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.487.0; Thu, 26 Nov 2020 10:20:58 +0800 From: Tian Tao To: , CC: , Subject: [PATCH] hwmon: (abx500): Switch to using the new API kobj_to_dev() Date: Thu, 26 Nov 2020 10:21:20 +0800 Message-ID: <1606357280-51921-1-git-send-email-tiantao6@hisilicon.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org fixed the following coccicheck: drivers/hwmon/abx500.c:266:60-61: WARNING opportunity for kobj_to_dev(). Signed-off-by: Tian Tao --- 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) -- 2.7.4