From nobody Wed Dec 17 05:57:12 2025 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ACF3314B951 for ; Tue, 7 May 2024 20:02:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715112163; cv=none; b=mVsfYkp3nGA5HCh+1pI9W4WjxI1FcbCbY8uuFCwhZ3T3YTKU/nQT6PyYjCAkfY7MCAJ4/6pip7Wer/Z4BIBZsTt2A7c6McbUbYpm55IvVxgbuZjz8KQ7ee1p3//iKG+E5jUUmkwNt2/QVQmclXMdpaijOwC7+hYmQF86LJC9vFs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715112163; c=relaxed/simple; bh=rstZsC4tr4kAVi9rKuNsg0sqQb+KdmStQAo2N0cQNL0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Dv/IT7TNXhWRsn12x3e07tKKe3TfQy2LA6o2YCZdHC3woxB5o1FdniX1h4AX+RVTU4hBiLBib3KQmjKXmxE4T5Jh6QJDkycjrcttkZFz3qEW+4NmuuwlIZTTA58TwGkXzUrzvBmQb2IoK2OjZcxGKjYE4zWVQ0MzGtKtwWjp4Hs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=jkJ6L5z1; arc=none smtp.client-ip=198.175.65.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="jkJ6L5z1" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715112161; x=1746648161; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=rstZsC4tr4kAVi9rKuNsg0sqQb+KdmStQAo2N0cQNL0=; b=jkJ6L5z1HNAfukuXDK92ktleL/xYvZy5egiGEJouy+xHwAjHBSrt6W7I I8NBFONGiiWmhm4H5+uNcKqSE/wY4ntya2cgRXqC5pAd/jE33vJzxbvbP hRvmBPqtz7ES7F24KvzlFs9EJSwo5kw/aeuQDq35HbD9/h0zdY2+8y8s6 DNlQFkz1E1saIt+qjdMVVj4OY6wzxBc7OYIFX3Gf5ll83y9+mK6UwYH2a Ghaz6r2cSMRfjnH0b2+tsCVBzdd4r+Mawvh9RyOlw+peVXukz+h8YpHCu 4wrdfBXJ0fE+Rn21TkgqRYyMs03ath4w3p39zX6fzBOrv5ed8Bktzkik5 Q==; X-CSE-ConnectionGUID: TZfzy3CRSW6cXyRoGrz9Bw== X-CSE-MsgGUID: gcVX+gn1TmmnwMc5vXDVag== X-IronPort-AV: E=McAfee;i="6600,9927,11066"; a="11063692" X-IronPort-AV: E=Sophos;i="6.08,143,1712646000"; d="scan'208";a="11063692" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 May 2024 13:02:41 -0700 X-CSE-ConnectionGUID: vheEd5gkSOi78xYXy0kbfw== X-CSE-MsgGUID: +/dvpArbT3CveaVezFu47w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,143,1712646000"; d="scan'208";a="29168275" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa007.jf.intel.com with ESMTP; 07 May 2024 13:02:40 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 7AA94E7; Tue, 07 May 2024 23:02:38 +0300 (EEST) From: Andy Shevchenko To: Yury Norov , Andy Shevchenko , linux-kernel@vger.kernel.org Cc: Rasmus Villemoes , Andrew Morton Subject: [PATCH v2 1/2] bitops: Move aligned_byte_mask() to wordpart.h Date: Tue, 7 May 2024 23:01:31 +0300 Message-ID: <20240507200236.527688-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240507200236.527688-1-andriy.shevchenko@linux.intel.com> References: <20240507200236.527688-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The bitops.h is for bit related operations. The aligned_byte_mask() is about byte (or part of the machine word) operations, for which we have a separate header, move the mentioned macro to wordpart.h to consolidate similar operations. Signed-off-by: Andy Shevchenko --- include/linux/bitops.h | 7 ------- include/linux/wordpart.h | 7 +++++++ lib/usercopy.c | 1 + 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/include/linux/bitops.h b/include/linux/bitops.h index 0b561ee6b4a4..ec45284c03f5 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h @@ -8,13 +8,6 @@ =20 #include =20 -/* Set bits in the first 'n' bytes when loaded from memory */ -#ifdef __LITTLE_ENDIAN -# define aligned_byte_mask(n) ((1UL << 8*(n))-1) -#else -# define aligned_byte_mask(n) (~0xffUL << (BITS_PER_LONG - 8 - 8*(n))) -#endif - #define BITS_PER_TYPE(type) (sizeof(type) * BITS_PER_BYTE) #define BITS_TO_LONGS(nr) __KERNEL_DIV_ROUND_UP(nr, BITS_PER_TYPE(long)) #define BITS_TO_U64(nr) __KERNEL_DIV_ROUND_UP(nr, BITS_PER_TYPE(u64)) diff --git a/include/linux/wordpart.h b/include/linux/wordpart.h index f6f8f83b15b0..4ca1ba66d2f0 100644 --- a/include/linux/wordpart.h +++ b/include/linux/wordpart.h @@ -39,4 +39,11 @@ */ #define REPEAT_BYTE(x) ((~0ul / 0xff) * (x)) =20 +/* Set bits in the first 'n' bytes when loaded from memory */ +#ifdef __LITTLE_ENDIAN +# define aligned_byte_mask(n) ((1UL << 8*(n))-1) +#else +# define aligned_byte_mask(n) (~0xffUL << (BITS_PER_LONG - 8 - 8*(n))) +#endif + #endif // _LINUX_WORDPART_H diff --git a/lib/usercopy.c b/lib/usercopy.c index d29fe29c6849..4b62e6299cc8 100644 --- a/lib/usercopy.c +++ b/lib/usercopy.c @@ -3,6 +3,7 @@ #include #include #include +#include #include =20 /* out-of-line parts */ --=20 2.43.0.rc1.1336.g36b5255a03ac From nobody Wed Dec 17 05:57:12 2025 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4E17114B964 for ; Tue, 7 May 2024 20:02:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715112164; cv=none; b=C8qvpKmwUREX+e2Qx6x4lrBzcJDeyovtPeIQnXYhXmgrDt0/8GJ3A/o5NC/K6JF8IFOhXh72xFu0EeLKj6R5Uo6Y1+lu9hhOKmypjFlFum4HugdIaEvK36tmYcX6qN/9BY7fem2aafHOqRTK61ZGGylLPrblHljjvttqKzN7gfY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715112164; c=relaxed/simple; bh=d3kIVb3N3T3QMxmT6SHLpGgbVBfU5Yf262Tqt572UNA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=b+KfMTDuxLwepvPH5dYkFkRigTWatNIaOzBKL4u5wh8CS/hXAzsju5YsiA0dDXWVsxnc6exIpnTTdeCQWMv/7bZzH0Kk4uiDd/5/7LV8fNvbUSP27F/or6Ta3YFPWcznElouspyl+pApUfANNY1skJcE5y1a/XoXsNj5A5+R46E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=cgEXDvCV; arc=none smtp.client-ip=198.175.65.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="cgEXDvCV" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715112163; x=1746648163; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=d3kIVb3N3T3QMxmT6SHLpGgbVBfU5Yf262Tqt572UNA=; b=cgEXDvCV6RlUQYs/PZQ2BVMligSoGz5xVLDYWyVaTVBXGfd0dpB+4aL7 sOUPOyEKbLJYgQu0FGM/129RgCeixqjgMcteG0t0y1S8mscizbYLzfKup OqdfV2rs4M+ARfOAV+CBzUpfSgKu58gGFvkZCJ/pT+9NOhvXMarjK+krV eQYlJy81xcjR1eb1v2z0TBy5I1B41G+YuLE3+Q9FxYxzhYuNdV+81BfFt tBPVsYkS9082/VUYQijwkUR1wzpqKR7QyNiiXRCqPb/48mwAzvwk3TxtJ l8aYNEQ8tdbXTqINaEXFO8tn6wZdTJ2q0PwMXBFqynoBDsQX8i0bXnSz2 A==; X-CSE-ConnectionGUID: 1XXxJIdNSFerHlCoOdYXPQ== X-CSE-MsgGUID: YWB+NPXWSoS796KUffOCYw== X-IronPort-AV: E=McAfee;i="6600,9927,11066"; a="11063696" X-IronPort-AV: E=Sophos;i="6.08,143,1712646000"; d="scan'208";a="11063696" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 May 2024 13:02:41 -0700 X-CSE-ConnectionGUID: pbvQYyhCR3e1AFbn7AX55w== X-CSE-MsgGUID: 9aGDmB9PQICAPz3YLVrkxQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,143,1712646000"; d="scan'208";a="29168276" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa007.jf.intel.com with ESMTP; 07 May 2024 13:02:40 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 8A2985E8; Tue, 07 May 2024 23:02:38 +0300 (EEST) From: Andy Shevchenko To: Yury Norov , Andy Shevchenko , linux-kernel@vger.kernel.org Cc: Rasmus Villemoes , Andrew Morton Subject: [PATCH v2 2/2] usercopy: Don't use "proxy" headers Date: Tue, 7 May 2024 23:01:32 +0300 Message-ID: <20240507200236.527688-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240507200236.527688-1-andriy.shevchenko@linux.intel.com> References: <20240507200236.527688-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Update header inclusions to follow IWYU (Include What You Use) principle. Signed-off-by: Andy Shevchenko --- lib/usercopy.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/usercopy.c b/lib/usercopy.c index 4b62e6299cc8..499a7a7d54db 100644 --- a/lib/usercopy.c +++ b/lib/usercopy.c @@ -1,10 +1,14 @@ // SPDX-License-Identifier: GPL-2.0 -#include +#include +#include +#include #include #include +#include +#include +#include #include #include -#include =20 /* out-of-line parts */ =20 --=20 2.43.0.rc1.1336.g36b5255a03ac