mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 20:14:06 +02:00
kmalloc_obj: Clean up after treewide replacements
Coccinelle doesn't handle re-indenting line escapes. Fix the 2 places where these got misaligned. Remove 2 now-redundant type casts, found with: $ git grep -P 'struct (\S+).*\)\s*k\S+alloc_(objs?|flex)\(struct \1' Signed-off-by: Kees Cook <kees@kernel.org>
This commit is contained in:
parent
69050f8d6d
commit
7a70c15bd1
|
|
@ -132,7 +132,7 @@ static inline int tuner_i2c_xfer_send_recv(struct tuner_i2c_props *props,
|
|||
} \
|
||||
} \
|
||||
if (0 == __ret) { \
|
||||
state = kzalloc_obj(type, GFP_KERNEL); \
|
||||
state = kzalloc_obj(type, GFP_KERNEL); \
|
||||
if (NULL == state) \
|
||||
goto __fail; \
|
||||
state->i2c_props.addr = i2caddr; \
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ struct l2addr_node {
|
|||
int ix = MLX5_L2_ADDR_HASH(mac); \
|
||||
type *ptr = NULL; \
|
||||
\
|
||||
ptr = kzalloc_obj(type, gfp); \
|
||||
ptr = kzalloc_obj(type, gfp); \
|
||||
if (ptr) { \
|
||||
ether_addr_copy(ptr->node.addr, mac); \
|
||||
hlist_add_head(&ptr->node.hlist, &(hash)[ix]);\
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ dma_fence_chain_contained(struct dma_fence *fence)
|
|||
* intentional to enforce typesafety.
|
||||
*/
|
||||
#define dma_fence_chain_alloc() \
|
||||
((struct dma_fence_chain *) kmalloc_obj(struct dma_fence_chain, GFP_KERNEL))
|
||||
kmalloc_obj(struct dma_fence_chain, GFP_KERNEL)
|
||||
|
||||
/**
|
||||
* dma_fence_chain_free
|
||||
|
|
|
|||
|
|
@ -460,7 +460,7 @@ int sk_psock_msg_verdict(struct sock *sk, struct sk_psock *psock,
|
|||
* intentional to enforce typesafety.
|
||||
*/
|
||||
#define sk_psock_init_link() \
|
||||
((struct sk_psock_link *) kzalloc_obj(struct sk_psock_link, GFP_ATOMIC | __GFP_NOWARN))
|
||||
kzalloc_obj(struct sk_psock_link, GFP_ATOMIC | __GFP_NOWARN)
|
||||
|
||||
static inline void sk_psock_free_link(struct sk_psock_link *link)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user