swiotlb: clean up some coding style and minor issues
authorTianyu Lan <tiala@microsoft.com>
Fri, 22 Jul 2022 03:38:46 +0000 (23:38 -0400)
committerChristoph Hellwig <hch@lst.de>
Fri, 22 Jul 2022 15:20:56 +0000 (17:20 +0200)
commit72311809031217714e635b24f8478e6ecb0d93d9
tree16ba453bcd936f8d97d6f66c3469fb99a3a1581b
parenta45e52bf1eca9bf8a7d075ce12b1e306497ce393
swiotlb: clean up some coding style and minor issues

- Fix the used field of struct io_tlb_area wasn't initialized
- Set area number to be 0 if input area number parameter is 0
- Use array_size() to calculate io_tlb_area array size
- Make parameters of swiotlb_do_find_slots() more reasonable

Fixes: 26ffb91fa5e0 ("swiotlb: split up the global swiotlb lock")
Signed-off-by: Tianyu Lan <tiala@microsoft.com>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Documentation/admin-guide/kernel-parameters.txt
kernel/dma/swiotlb.c