Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3218981pxj; Mon, 7 Jun 2021 05:30:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYIPJdg1iBTS9XfhgS+DIPTiHuxNEBuv74ZeHESQGF8j+moVYjKQn75RvO2ww3aDAK0u3D X-Received: by 2002:a17:906:af55:: with SMTP id ly21mr17198152ejb.276.1623069026068; Mon, 07 Jun 2021 05:30:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623069026; cv=none; d=google.com; s=arc-20160816; b=QNi5O2QaoIpnWw9hTC5SsH5k9AqM1a0zeuguRKaY75VYK5k59IOnNxIvZZT0vrwNqA iPzC8FnxnBJfaVCg4lGGDFevCrfP54nzMOZqAhNacwKv/0SCpd31FcYrCJu8ONzJkyxy JwD9Q8aXINBTy7EIuqNqoBDMtRjoXB802ZOcZDh0e4g/YbyHU2OzMxF4czWqriRax0sG yowKoU1yupv1W7n+jzXQoVSTC9990+QZXfFNSnSQ6bV8UyZ9kA6nVnMFFmkHA4UACYZK INRxIBYY1VYJpfU9lbYoDG41lWdrDmf++1Hkz+6FP9HWC0pVfptuowmowSXtPP/zRH9l 0RNQ== 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=z8kZ5X+ouk/96Sm6C4LYoKPi0MVTmHNJEs3qndSOv4A=; b=SDIkV8iU8xbLiHLiOP3fbfYWcj65dgUaIj7xEINXzrxjMTMAuFhRJcyc4Qs9shpDvE aKdfspXQ/Dv+f6S7n0vQENPDuJUXI4AkxYtYxuR9LcEX/GGPyM+bBcKvap4ZHzmoeQrM +jzd83pA147t1/GPFcMRab1JugxasYKPuridaE2NghxKf1qcx/oePawpk/1y6sTpXPRF 0bVB358ezLYA7lRs5kvv0GHM3P7hWrB3BZskLOMKdDkJ0HyMV6UgOLI8uDFTuv7qr05C aTPw4FJ8A7/7bJX4yunaJwUKwtVPRFTlB+BorPIOueUjWgTkSv8pqP/gDm42LUAwBgcv Bh5Q== 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=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y25si14701524ejb.210.2021.06.07.05.30.01; Mon, 07 Jun 2021 05:30:26 -0700 (PDT) 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=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230340AbhFGM3R (ORCPT + 99 others); Mon, 7 Jun 2021 08:29:17 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:4380 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230203AbhFGM3Q (ORCPT ); Mon, 7 Jun 2021 08:29:16 -0400 Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.54]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4FzCFy2J65z6v8d; Mon, 7 Jun 2021 20:23:34 +0800 (CST) Received: from dggema769-chm.china.huawei.com (10.1.198.211) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Mon, 7 Jun 2021 20:27:24 +0800 Received: from localhost (10.174.179.215) by dggema769-chm.china.huawei.com (10.1.198.211) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Mon, 7 Jun 2021 20:27:23 +0800 From: YueHaibing To: , CC: , , YueHaibing Subject: [PATCH -next] Input: trackpoint - Fix kobj_to_dev.cocci warnings Date: Mon, 7 Jun 2021 20:27:22 +0800 Message-ID: <20210607122722.36736-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.174.179.215] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggema769-chm.china.huawei.com (10.1.198.211) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use kobj_to_dev() instead of container_of() Generated by: scripts/coccinelle/api/kobj_to_dev.cocci Signed-off-by: YueHaibing --- drivers/input/mouse/trackpoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/mouse/trackpoint.c b/drivers/input/mouse/trackpoint.c index ef2fa0905208..4a86b3e31d3b 100644 --- a/drivers/input/mouse/trackpoint.c +++ b/drivers/input/mouse/trackpoint.c @@ -214,7 +214,7 @@ static bool trackpoint_is_attr_available(struct psmouse *psmouse, static umode_t trackpoint_is_attr_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 serio *serio = to_serio_port(dev); struct psmouse *psmouse = serio_get_drvdata(serio); -- 2.17.1