mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
bpf: Remove unnecessary type castings
Remove/clean up unnecessary void * type castings. Signed-off-by: Yu Zhe <yuzhe@nfschina.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20220413015048.12319-1-yuzhe@nfschina.com
This commit is contained in:
parent
68477ede43
commit
241d50ec5d
2 changed files with 3 additions and 3 deletions
|
@ -263,7 +263,7 @@ int bpf_struct_ops_map_sys_lookup_elem(struct bpf_map *map, void *key,
|
|||
/* No lock is needed. state and refcnt do not need
|
||||
* to be updated together under atomic context.
|
||||
*/
|
||||
uvalue = (struct bpf_struct_ops_value *)value;
|
||||
uvalue = value;
|
||||
memcpy(uvalue, st_map->uvalue, map->value_size);
|
||||
uvalue->state = state;
|
||||
refcount_set(&uvalue->refcnt, refcount_read(&kvalue->refcnt));
|
||||
|
@ -353,7 +353,7 @@ static int bpf_struct_ops_map_update_elem(struct bpf_map *map, void *key,
|
|||
if (err)
|
||||
return err;
|
||||
|
||||
uvalue = (struct bpf_struct_ops_value *)value;
|
||||
uvalue = value;
|
||||
err = check_zero_holes(t, uvalue->data);
|
||||
if (err)
|
||||
return err;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue