lkml.org 
[lkml]   [2021]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectlinux-next: manual merge of the akpm-current tree with the ftrace tree
Hi all,

Today's linux-next merge of the akpm-current tree got a conflict in:

lib/bootconfig.c

between commit:

4ee1b4cac236 ("bootconfig: Cleanup dummy headers in tools/bootconfig")

from the ftrace tree and commit:

13ab40b0e60e ("memblock: use memblock_free for freeing virtual pointers")

from the akpm-current tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

--
Cheers,
Stephen Rothwell

diff --cc lib/bootconfig.c
index a056ae137750,547558d80e64..000000000000
--- a/lib/bootconfig.c
+++ b/lib/bootconfig.c
@@@ -42,50 -34,6 +42,50 @@@ static int xbc_err_pos __initdata
static int open_brace[XBC_DEPTH_MAX] __initdata;
static int brace_index __initdata;

+#ifdef __KERNEL__
+static inline void *xbc_alloc_mem(size_t size)
+{
+ return memblock_alloc(size, SMP_CACHE_BYTES);
+}
+
+static inline void xbc_free_mem(void *addr, size_t size)
+{
- memblock_free_ptr(addr, size);
++ memblock_free(addr, size);
+}
+
+#else /* !__KERNEL__ */
+
+static inline void *xbc_alloc_mem(size_t size)
+{
+ return malloc(size);
+}
+
+static inline void xbc_free_mem(void *addr, size_t size)
+{
+ free(addr);
+}
+#endif
+/**
+ * xbc_get_info() - Get the information of loaded boot config
+ * node_size: A pointer to store the number of nodes.
+ * data_size: A pointer to store the size of bootconfig data.
+ *
+ * Get the number of used nodes in @node_size if it is not NULL,
+ * and the size of bootconfig data in @data_size if it is not NULL.
+ * Return 0 if the boot config is initialized, or return -ENODEV.
+ */
+int __init xbc_get_info(int *node_size, size_t *data_size)
+{
+ if (!xbc_data)
+ return -ENODEV;
+
+ if (node_size)
+ *node_size = xbc_node_num;
+ if (data_size)
+ *data_size = xbc_data_size;
+ return 0;
+}
+
static int __init xbc_parse_error(const char *msg, const char *p)
{
xbc_err_msg = msg;
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2021-10-25 10:55    [W:0.057 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site