Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp744515pxb; Tue, 14 Sep 2021 07:52:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkhXvswWGo0BgvPz0MAFQYyo8MMyF7k3b98Bj3A/OqnsWjv7Cj1afiPL4DvIwpWtp9137x X-Received: by 2002:a05:6e02:d05:: with SMTP id g5mr8660661ilj.34.1631631143927; Tue, 14 Sep 2021 07:52:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631631143; cv=none; d=google.com; s=arc-20160816; b=ivYUcOK27si9AiMjHtm7bhCkMTwiX7jYyzkg6/TVQobqh9tq5S/hHAqaIzeWGYpEwE S2bNLECaVnnRb9I5tHo2SvLLLzf4lph2wNdI+Du96hpLamPLY1S8JfwZFXU7UtdUzs+m QS7GwaTDd6YUXdXinbeVP6ji/TjNNusWTigX1/hp71ceNmcD1oSb4IVcASPIUGjgsati H1E3qc3d3FTZMe/ba+0JPZUQ8Ayp9mngFXnyMnIiHErxY30ZweFHU6GNZFXxzUoeSuSx fGk/jikQ/AOIWToexQn0LAixmj+DpCH7v6gx1Aqf3YWqkwDK23ZR1tEezARy5PvvpPi9 8nVw== 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=BYQMughCQy/8lX/q0HQESrSe7vtU8x/5LuHYlvbZb2Y=; b=GZgFR4b7ELwo08xsB0oBReD80RJWsVmIuVxP4uCoe0XY1fTvTR0nm8EeIUOd/6L8y8 S3ef9mRkvD7R4jK3Oh2pn/QGArvlw+G7C63dP+SxJzDOywv+kXfyuPafDkhyiNLJB86I ZvuTQQfuK7eJj26C0+dgPtFEns3S6p6SxIX5K4VbqHiBDLGta46J+RUC1agTjEgC+Wx+ ddqwdlN/C/ywTKEUM7PEH/66eu9Rov+rO34G0VY6S9qD5alvES5oPxZpFl3xrieq+7Nh OPqJxtaPDvje/NeTZaK5HCaC4/ilx5PGSsi90JNkDlPmWgs51sL9NrkfkqIDYJUP/wGR 9HWw== 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=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k17si12376267jav.64.2021.09.14.07.52.11; Tue, 14 Sep 2021 07:52:23 -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=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235033AbhINOuy (ORCPT + 99 others); Tue, 14 Sep 2021 10:50:54 -0400 Received: from foss.arm.com ([217.140.110.172]:45764 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233883AbhINOum (ORCPT ); Tue, 14 Sep 2021 10:50:42 -0400 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 232F6101E; Tue, 14 Sep 2021 07:49:25 -0700 (PDT) Received: from a077416.arm.com (unknown [10.163.44.128]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 069773F5A1; Tue, 14 Sep 2021 07:49:22 -0700 (PDT) From: Amit Daniel Kachhap To: linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Vincenzo Frascino , Amit Daniel Kachhap , Al Viro Subject: [PATCH] fs/ioctl: Remove unnecessary __user annotation Date: Tue, 14 Sep 2021 20:19:12 +0530 Message-Id: <20210914144912.11687-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(). Cc: Al Viro Signed-off-by: Amit Daniel Kachhap --- 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