Skip to content

Commit f366d32

Browse files
dhowellsdjbw
authored andcommitted
UAPI: ndctl: Remove use of PAGE_SIZE
The macro PAGE_SIZE isn't valid outside of the kernel, so it should not appear in UAPI headers. Furthermore, the actual machine page size could theoretically change from an application's point of view if it's running in a container that gets migrated to another machine (say 4K/ppc64 to 64K/ppc64). Fixes: f2ba5a5 ("libnvdimm, namespace: make min namespace size 4K") Signed-off-by: David Howells <[email protected]> Signed-off-by: Dan Williams <[email protected]>
1 parent 9607871 commit f366d32

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

include/linux/ndctl.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Copyright (c) 2014-2016, Intel Corporation.
3+
*
4+
* This program is free software; you can redistribute it and/or modify it
5+
* under the terms and conditions of the GNU Lesser General Public License,
6+
* version 2.1, as published by the Free Software Foundation.
7+
*
8+
* This program is distributed in the hope it will be useful, but WITHOUT ANY
9+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10+
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
11+
* more details.
12+
*/
13+
#ifndef _LINUX_NDCTL_H
14+
#define _LINUX_NDCTL_H
15+
16+
#include <uapi/linux/ndctl.h>
17+
18+
enum {
19+
ND_MIN_NAMESPACE_SIZE = PAGE_SIZE,
20+
};
21+
22+
#endif /* _LINUX_NDCTL_H */

include/uapi/linux/ndctl.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,6 @@ enum nd_driver_flags {
202202
ND_DRIVER_DAX_PMEM = 1 << ND_DEVICE_DAX_PMEM,
203203
};
204204

205-
enum {
206-
ND_MIN_NAMESPACE_SIZE = PAGE_SIZE,
207-
};
208-
209205
enum ars_masks {
210206
ARS_STATUS_MASK = 0x0000FFFF,
211207
ARS_EXT_STATUS_SHIFT = 16,

0 commit comments

Comments
 (0)