Re: [PATCH] Revert "swiotlb: panic if nslabs is too small"

From: Yu Zhao
Date: Wed Aug 31 2022 - 02:20:12 EST


On Wed, Aug 31, 2022 at 12:01 AM Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:
>
> Hi Yu,
>
> url: https://github.com/intel-lab-lkp/linux/commits/Yu-Zhao/Revert-swiotlb-panic-if-nslabs-is-too-small/20220830-073123
> base: c40e8341e3b3bb27e3a65b06b5b454626234c4f0
> config: x86_64-randconfig-m001 (https://download.01.org/0day-ci/archive/20220831/202208310701.LKr1WDCh-lkp@xxxxxxxxx/config)
> compiler: gcc-11 (Debian 11.3.0-5) 11.3.0
>
> If you fix the issue, kindly add following tag where applicable
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
>
> smatch warnings:
> kernel/dma/swiotlb.c:334 swiotlb_init_remap() error: uninitialized symbol 'nslabs'.
>
> vim +/nslabs +334 kernel/dma/swiotlb.c
>
> 7374153d294eb5 kernel/dma/swiotlb.c Christoph Hellwig 2022-03-14 307 void __init swiotlb_init_remap(bool addressing_limit, unsigned int flags,
> 7374153d294eb5 kernel/dma/swiotlb.c Christoph Hellwig 2022-03-14 308 int (*remap)(void *tlb, unsigned long nslabs))
> ^^^^^^
>
> abbceff7d7a884 lib/swiotlb.c FUJITA Tomonori 2010-05-10 309 {
> 6424e31b1c050a kernel/dma/swiotlb.c Christoph Hellwig 2022-03-15 310 struct io_tlb_mem *mem = &io_tlb_default_mem;
> 20347fca71a387 kernel/dma/swiotlb.c Tianyu Lan 2022-07-08 311 unsigned long nslabs;
> ^^^^^^
> Merge issue? How does this compile?

Sorry, I deleted an extra line while resolving the conflict.

Resending the patch.