From patchwork Tue Apr 23 14:20:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13640161 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) (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 27357139D1B; Tue, 23 Apr 2024 14:22:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.21 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713882132; cv=none; b=Kw/WjGVRXjxOcWKXw66pKQHgqbOSQ5N9XVgNS7oowTn3nyIl5gVn9fcv8SFNyOfMumVhgMGX9QL9CRHTqUXvLpFCn07BQbqZE4uXYwqh0a4OUP8I0OPN5h+CboN7vP//5fhbFOCIfSs44c+Sq9he7RelfrPdnMyHtQ7oSNcPIbQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713882132; c=relaxed/simple; bh=h0MwcUHxXAEj+nVIJL59IQ1CJfo9yrZ784pC1Kz9e88=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rnq7T4aDJTYkF5cFA66crRW+MQzgn+fXAfutIUWmC88IJpE7Zwk5ISsj6zhYdSjDdFseVFTFFNmsV6bIj9QeQPJGbMrQNwp+Sz9vAXUUkwxqBLY32Cfj1uYzZMZo/t26xNdf9CORjSRjG3QGdx51+WmJ49oKbtHSsXTV0hpsIVg= 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=Z2g2qmlH; arc=none smtp.client-ip=198.175.65.21 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="Z2g2qmlH" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1713882131; x=1745418131; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=h0MwcUHxXAEj+nVIJL59IQ1CJfo9yrZ784pC1Kz9e88=; b=Z2g2qmlHc3+S+i3ZBqPdyBYk3RVrjegHrq75QLP02rtGgpIYR2VKmjZp j8um0NVvaOxHWrWsgfoB4dSOsOWmhSS2XX2zA3DvnVNliGJDeEiia8nRr YLkzbonJMVwlM+DvO9c0enBNnOlUjYAPDOzc185CScmHqzRCyVUz//3FF S8Yn1uVTyzNeAZii7quvbv3EEQbHc5qm+y2A8N3DKZ+iVtZC1AAh2LIgl 8Qy3HeQ/hmVSxzOS75fN8UsmAY6cIdslN/IZRY/Di7YW2CsnDUuqAUZR3 d7ToO9bJ1RWBptrNvLi5VMiPsPJ6JnsiZ2PpxMeryr188Uz4kb27N9uTQ Q==; X-CSE-ConnectionGUID: sbpI+DAKQ7OyRtXmQ0TunQ== X-CSE-MsgGUID: JwjogrdIQMSAv6Ebjx8NTw== X-IronPort-AV: E=McAfee;i="6600,9927,11053"; a="9389745" X-IronPort-AV: E=Sophos;i="6.07,222,1708416000"; d="scan'208";a="9389745" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Apr 2024 07:22:10 -0700 X-CSE-ConnectionGUID: lBqee1Y3Q4O8o8QU62LYPg== X-CSE-MsgGUID: wwcOT1aXQkKWOooRTgOoXA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,222,1708416000"; d="scan'208";a="24896044" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa007.jf.intel.com with ESMTP; 23 Apr 2024 07:22:09 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id AFA1E1C5; Tue, 23 Apr 2024 17:22:07 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Matthew Wilcox , Rasmus Villemoes , Andrew Morton Subject: [PATCH v1 1/2] xarray: Use BITS_PER_LONGS() Date: Tue, 23 Apr 2024 17:20:24 +0300 Message-ID: <20240423142204.2408923-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240423142204.2408923-1-andriy.shevchenko@linux.intel.com> References: <20240423142204.2408923-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Use BITS_PER_LONGS() instead of open coded variant. Signed-off-by: Andy Shevchenko --- include/linux/xarray.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/xarray.h b/include/linux/xarray.h index d9d479334c9e..d54a1e98b0ca 100644 --- a/include/linux/xarray.h +++ b/include/linux/xarray.h @@ -1146,7 +1146,7 @@ static inline void xa_release(struct xarray *xa, unsigned long index) #define XA_CHUNK_SIZE (1UL << XA_CHUNK_SHIFT) #define XA_CHUNK_MASK (XA_CHUNK_SIZE - 1) #define XA_MAX_MARKS 3 -#define XA_MARK_LONGS DIV_ROUND_UP(XA_CHUNK_SIZE, BITS_PER_LONG) +#define XA_MARK_LONGS BITS_TO_LONGS(XA_CHUNK_SIZE) /* * @count is the count of every non-NULL element in the ->slots array From patchwork Tue Apr 23 14:20:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13640162 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) (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 5F1B013AD2B; Tue, 23 Apr 2024 14:22:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.9 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713882132; cv=none; b=Hb5ASvRKT1r/nL1nX3pdziD3JlqOX0ginYNoU7rMq7acEmYQAZlLuyiYiAjPG0SPsBT2s05VivFrcbPj59/+O7gRwhGz7Faqu7KKdOI+6Xe+IvMdLIjDgbOXte25xJ+e+JFtD83PfLXsYh1bZJLmwkFT0438YWxoHb2yitleciM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713882132; c=relaxed/simple; bh=zBsBBHL1e2snmIX58IfUqfbnuJKU+3R/sEuhgPszwh8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AAhI097M/SjEJwQ91IOuklZfiyikzdcoOsXU4Yw5/mQbG2SGsQxh1TQdT6SuPxCrF4X9zroiOpLaDrE5ZDw7f/sJJNQUzifgOGs2gY3/QKS+MXcxKR+LsmIcijXt28dtasajoITJoeQiub2apwVTtNNOzKW/LIMjJsnbznAuo7Q= 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=lmjJS+od; arc=none smtp.client-ip=192.198.163.9 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="lmjJS+od" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1713882131; x=1745418131; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=zBsBBHL1e2snmIX58IfUqfbnuJKU+3R/sEuhgPszwh8=; b=lmjJS+odVGNzwrE3GBVPj7eqvUXIPa2vglNuCuhKDGwdf9GBGC775LiR tfq2iwaMYUdzyu+dsX3PYWDBeLFf6pEZ+pvgOxZwZO1fBLLi8QBHk0bqW wIjjoS1J3QO/Vxr4MMvnss042Caoihb2fZO6Xyj+BGQtwUrovHNm3Wa2Z YDlRVGYzMTxasKyK21zbzZHuVk1M8q7gupsxSObwfGDjXTlRwN+Gn0OAR u4Gzbz9R1z3zI/CSBNJwpu/EHKBbh+qVbW1V45YS+VtorZzBZSQGuPuld L8ykiplCF2mZniBwKAFa1xETIFT76PbaMPr2XC0dg8TsHjEZLCbqjUFfG A==; X-CSE-ConnectionGUID: M3/RmmvRRn6StgEKPXJVLg== X-CSE-MsgGUID: I+FQAxkbSBiDHMEtqj5agA== X-IronPort-AV: E=McAfee;i="6600,9927,11053"; a="20163851" X-IronPort-AV: E=Sophos;i="6.07,222,1708416000"; d="scan'208";a="20163851" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Apr 2024 07:22:11 -0700 X-CSE-ConnectionGUID: tlvtzjWDQqmdq3Po0Q2zFQ== X-CSE-MsgGUID: gSnos4jEQQOWrj26zDjTHw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,222,1708416000"; d="scan'208";a="29030064" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa003.jf.intel.com with ESMTP; 23 Apr 2024 07:22:09 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id B55AC489; Tue, 23 Apr 2024 17:22:07 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Matthew Wilcox , Rasmus Villemoes , Andrew Morton Subject: [PATCH v1 2/2] xarray: Don't use "proxy" headers Date: Tue, 23 Apr 2024 17:20:25 +0300 Message-ID: <20240423142204.2408923-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240423142204.2408923-1-andriy.shevchenko@linux.intel.com> References: <20240423142204.2408923-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Update header inclusions to follow IWYU (Include What You Use) principle. Signed-off-by: Andy Shevchenko --- include/linux/xarray.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/linux/xarray.h b/include/linux/xarray.h index d54a1e98b0ca..d2e4d3624689 100644 --- a/include/linux/xarray.h +++ b/include/linux/xarray.h @@ -12,14 +12,18 @@ #include #include #include +#include #include #include -#include +#include +#include #include #include #include #include +struct list_lru; + /* * The bottom two bits of the entry determine how the XArray interprets * the contents: