Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4EA6EC433F5 for ; Mon, 22 Nov 2021 10:13:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239058AbhKVKQR (ORCPT ); Mon, 22 Nov 2021 05:16:17 -0500 Received: from foss.arm.com ([217.140.110.172]:39460 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230058AbhKVKQQ (ORCPT ); Mon, 22 Nov 2021 05:16:16 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 508451042; Mon, 22 Nov 2021 02:13:10 -0800 (PST) Received: from a077416.arm.com (unknown [10.163.54.69]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 6B7303F73B; Mon, 22 Nov 2021 02:13:07 -0800 (PST) From: Amit Daniel Kachhap To: linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Andrew Morton , Vincenzo Frascino , Kevin Brodsky , Amit Daniel Kachhap , Al Viro Subject: [PATCH v2] fs/ioctl: Remove unnecessary __user annotation Date: Mon, 22 Nov 2021 15:42:56 +0530 Message-Id: <20211122101256.7875-1-amit.kachhap@arm.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org __user annotations are used by the checker (e.g sparse) to mark user pointers. However here __user is applied to a struct directly, without a pointer being directly involved. Although the presence of __user does not cause sparse to emit a warning, __user should be removed for consistency with other uses of offsetof(). Note: No functional changes intended. Cc: Al Viro Signed-off-by: Amit Daniel Kachhap --- Re-posting v2 with minor commit log changes for v5.16-rc1. fs/ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ioctl.c b/fs/ioctl.c index 504e69578112..1ed097e94af2 100644 --- a/fs/ioctl.c +++ b/fs/ioctl.c @@ -430,7 +430,7 @@ static int ioctl_file_dedupe_range(struct file *file, goto out; } - size = offsetof(struct file_dedupe_range __user, info[count]); + size = offsetof(struct file_dedupe_range, info[count]); if (size > PAGE_SIZE) { ret = -ENOMEM; goto out; -- 2.17.1