Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

Kees Cook 7a70c15b 69050f8d

+4 -4
+1 -1
drivers/media/tuners/tuner-i2c.h
··· 132 132 } \ 133 133 } \ 134 134 if (0 == __ret) { \ 135 - state = kzalloc_obj(type, GFP_KERNEL); \ 135 + state = kzalloc_obj(type, GFP_KERNEL); \ 136 136 if (NULL == state) \ 137 137 goto __fail; \ 138 138 state->i2c_props.addr = i2caddr; \
+1 -1
drivers/net/ethernet/mellanox/mlx5/core/lib/mpfs.h
··· 72 72 int ix = MLX5_L2_ADDR_HASH(mac); \ 73 73 type *ptr = NULL; \ 74 74 \ 75 - ptr = kzalloc_obj(type, gfp); \ 75 + ptr = kzalloc_obj(type, gfp); \ 76 76 if (ptr) { \ 77 77 ether_addr_copy(ptr->node.addr, mac); \ 78 78 hlist_add_head(&ptr->node.hlist, &(hash)[ix]);\
+1 -1
include/linux/dma-fence-chain.h
··· 91 91 * intentional to enforce typesafety. 92 92 */ 93 93 #define dma_fence_chain_alloc() \ 94 - ((struct dma_fence_chain *) kmalloc_obj(struct dma_fence_chain, GFP_KERNEL)) 94 + kmalloc_obj(struct dma_fence_chain, GFP_KERNEL) 95 95 96 96 /** 97 97 * dma_fence_chain_free
+1 -1
include/linux/skmsg.h
··· 460 460 * intentional to enforce typesafety. 461 461 */ 462 462 #define sk_psock_init_link() \ 463 - ((struct sk_psock_link *) kzalloc_obj(struct sk_psock_link, GFP_ATOMIC | __GFP_NOWARN)) 463 + kzalloc_obj(struct sk_psock_link, GFP_ATOMIC | __GFP_NOWARN) 464 464 465 465 static inline void sk_psock_free_link(struct sk_psock_link *link) 466 466 {