Skip to content

Commit 1848757

Browse files
committed
Merge branches 'hns' and 'misc' into k.o/for-next
Signed-off-by: Doug Ledford <[email protected]>
3 parents 7ae6f2a + 400d324 + 4d45b75 commit 1848757

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+6669
-922
lines changed

drivers/infiniband/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
menuconfig INFINIBAND
22
tristate "InfiniBand support"
3-
depends on PCI || BROKEN
43
depends on HAS_IOMEM
54
depends on NET
65
depends on INET

drivers/infiniband/core/uverbs.h

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,28 @@
4747
#include <rdma/ib_umem.h>
4848
#include <rdma/ib_user_verbs.h>
4949

50-
#define INIT_UDATA(udata, ibuf, obuf, ilen, olen) \
51-
do { \
52-
(udata)->inbuf = (const void __user *) (ibuf); \
53-
(udata)->outbuf = (void __user *) (obuf); \
54-
(udata)->inlen = (ilen); \
55-
(udata)->outlen = (olen); \
56-
} while (0)
50+
static inline void
51+
ib_uverbs_init_udata(struct ib_udata *udata,
52+
const void __user *ibuf,
53+
void __user *obuf,
54+
size_t ilen, size_t olen)
55+
{
56+
udata->inbuf = ibuf;
57+
udata->outbuf = obuf;
58+
udata->inlen = ilen;
59+
udata->outlen = olen;
60+
}
5761

58-
#define INIT_UDATA_BUF_OR_NULL(udata, ibuf, obuf, ilen, olen) \
59-
do { \
60-
(udata)->inbuf = (ilen) ? (const void __user *) (ibuf) : NULL; \
61-
(udata)->outbuf = (olen) ? (void __user *) (obuf) : NULL; \
62-
(udata)->inlen = (ilen); \
63-
(udata)->outlen = (olen); \
64-
} while (0)
62+
static inline void
63+
ib_uverbs_init_udata_buf_or_null(struct ib_udata *udata,
64+
const void __user *ibuf,
65+
void __user *obuf,
66+
size_t ilen, size_t olen)
67+
{
68+
ib_uverbs_init_udata(udata,
69+
ilen ? ibuf : NULL, olen ? obuf : NULL,
70+
ilen, olen);
71+
}
6572

6673
/*
6774
* Our lifetime rules for these structs are the following:

0 commit comments

Comments
 (0)