Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4469069pxb; Tue, 2 Mar 2021 16:40:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJyftNxilJK+RFRUpeIrJFliOM4nuWYyc2wqYYfX47D8UFGo1QwWVsrQ6xWCm9PWGDOhYzCb X-Received: by 2002:a17:906:7c57:: with SMTP id g23mr22664656ejp.195.1614732022730; Tue, 02 Mar 2021 16:40:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614732022; cv=none; d=google.com; s=arc-20160816; b=p+Wtg71tk/SAih0CotG/M+NZjpE7RYOwdpzkmRhy8UZrTO4rpzfbakbnqn2RzSlYt6 IwyZttQsXfV0CsmFwno6CV8aXpBQiJmnatFMl0j6g2Q00K6hLhVbfTQsuxgUvql61SX5 VZqlgY7mGCi3jG83TxXhhAXlPrVMRvZMhU3fCfRbuf4oO/o50XTDUzbrjkAlV/IQeHyz 4aMYL34RGamLrSZC9AeMq0kbcLZuK99F6Cylf7jCdyZFE1pn31dL5XMV4a09r30fX6qP oDeZxWIwU1X8RD/v1oFhZ6zcAdAXJI7LbzT+S7bO0LY3znZaXWIceUsfEieHHZVcJPBG kBdQ== 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=laYU4PjWNprWAIBJrOalNFx/0zyuAYkd9kRdS9g61ng=; b=zYm//2U6LcOiFIp/dtmIdyi9pStMvKJ3Yu11rXqRLxnWx6X/NUX0kHSIUpvXbfX1S0 10BRzj9ydspn3L0pAxbmiagEiXT/tqyxhOhHQ/BwXTyTXbBV0V9tSPEZKotEIPeX4F+q bdQfJNKZs/mjlMh/ENlt6CahbAm080ndlVkG8XqUBz7M9iOKk9IJV8faInscgFiPqrmL DW1/ER3xJEDgKJiHgA/SY14OmIdw+Oras29WYfmQAas3GPLHirHNew1yNC4exmTdAbuA BGv83ykUKnST/OuAaw7LYDzy6QTeEbVOwt6vNZwmswmDrJMoyPpAB8o/R30s0IKjybue +RmA== 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 y21si12737134edq.105.2021.03.02.16.40.00; Tue, 02 Mar 2021 16:40:22 -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 S232773AbhCAIIy (ORCPT + 99 others); Mon, 1 Mar 2021 03:08:54 -0500 Received: from out30-131.freemail.mail.aliyun.com ([115.124.30.131]:42581 "EHLO out30-131.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232707AbhCAIIx (ORCPT ); Mon, 1 Mar 2021 03:08:53 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R681e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01424;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0UPvxMk1_1614586089; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0UPvxMk1_1614586089) by smtp.aliyun-inc.com(127.0.0.1); Mon, 01 Mar 2021 16:08:10 +0800 From: Yang Li To: bleung@chromium.org Cc: dmitry.torokhov@gmail.com, groeck@chromium.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH] Input: cros_ec_keyb: Switch to using the new API kobj_to_dev() Date: Mon, 1 Mar 2021 16:08:08 +0800 Message-Id: <1614586088-115182-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: ./drivers/input/keyboard/cros_ec_keyb.c:647:60-61: WARNING opportunity for kobj_to_dev() Reported-by: Abaci Robot Signed-off-by: Yang Li --- drivers/input/keyboard/cros_ec_keyb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/keyboard/cros_ec_keyb.c b/drivers/input/keyboard/cros_ec_keyb.c index 38457d9..fc02c54 100644 --- a/drivers/input/keyboard/cros_ec_keyb.c +++ b/drivers/input/keyboard/cros_ec_keyb.c @@ -644,7 +644,7 @@ static umode_t cros_ec_keyb_attr_is_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 cros_ec_keyb *ckdev = dev_get_drvdata(dev); if (attr == &dev_attr_function_row_physmap.attr && -- 1.8.3.1