Re: [bpf-next PATCH v1] samples/bpf: Cleanup repetitive swap function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/17/23 5:46 PM, Anh Tuan Phan wrote:
Use the macro version of swap function and move its definition to
bpf_util.h since it is repetitive in some files. This commit also fixes
a warning from coccinelle:

- ./samples/bpf/xdp_sample_user.c:1493:8-9: WARNING opportunity for swap()
- ./samples/bpf/xdp_rxq_info_user.c:435:8-9: WARNING opportunity for swap()

Signed-off-by: Anh Tuan Phan <tuananhlfc@xxxxxxxxx>

I don't think it really improves anything. If a user takes this sample, he/she
now needs to figure out that the swap implementation is actually somewhere hidden
deep in tools/testing/selftests/bpf/bpf_util.h to ensure/audit that there's nothing
special about it.

Thanks,
Daniel




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux