:::::: 
:::::: Manual check reason: "low confidence static check warning: 
drivers/video/aperture.c:343:6: warning: Uninitialized variable: ret 
[uninitvar]"
:::::: 

BCC: [email protected]
CC: [email protected]
CC: Linux Memory Management List <[email protected]>
TO: Thomas Zimmermann <[email protected]>
CC: Javier Martinez Canillas <[email protected]>

Hi Thomas,

FYI, the error/warning was bisected to this commit, please ignore it if it's 
irrelevant.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 
master
head:   8755ae45a9e8ae883fa7f4eb0162830c55aacf14
commit: 9d69ef1838150c7d87afc1a87aa658c637217585 [471/2265] fbdev/core: Remove 
remove_conflicting_pci_framebuffers()
:::::: branch date: 32 hours ago
:::::: commit date: 5 weeks ago
compiler: powerpc-linux-gcc (GCC) 12.1.0
reproduce (cppcheck warning):
        # apt-get install cppcheck
        git checkout 9d69ef1838150c7d87afc1a87aa658c637217585
        cppcheck --quiet --enable=style,performance,portability --template=gcc 
FILE

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <[email protected]>


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> drivers/video/aperture.c:343:6: warning: Uninitialized variable: ret 
>> [uninitvar]
    if (ret)
        ^
   drivers/video/aperture.c:332:20: note: Assuming condition is false
    for (bar = 0; bar < PCI_STD_NUM_BARS; ++bar) {
                      ^
   drivers/video/aperture.c:343:6: note: Uninitialized variable: ret
    if (ret)
        ^
--
>> drivers/video/fbdev/cirrusfb.c:2903:19: warning: Passing NULL after the last 
>> typed argument to a variadic function leads to undefined behaviour. 
>> [varFuncNullUB]
         "CR3F", 0x3F,
                     ^
   drivers/video/fbdev/cirrusfb.c:2936:19: warning: Passing NULL after the last 
typed argument to a variadic function leads to undefined behaviour. 
[varFuncNullUB]
         "SR1F", 0x1F,
                     ^

vim +343 drivers/video/aperture.c

7283f862bd991c Thomas Zimmermann 2022-06-22  331  
7283f862bd991c Thomas Zimmermann 2022-06-22  332        for (bar = 0; bar < 
PCI_STD_NUM_BARS; ++bar) {
7283f862bd991c Thomas Zimmermann 2022-06-22  333                if 
(!(pci_resource_flags(pdev, bar) & IORESOURCE_MEM))
7283f862bd991c Thomas Zimmermann 2022-06-22  334                        
continue;
9d69ef1838150c Thomas Zimmermann 2022-07-18  335  
7283f862bd991c Thomas Zimmermann 2022-06-22  336                base = 
pci_resource_start(pdev, bar);
7283f862bd991c Thomas Zimmermann 2022-06-22  337                size = 
pci_resource_len(pdev, bar);
9d69ef1838150c Thomas Zimmermann 2022-07-18  338                ret = 
aperture_remove_conflicting_devices(base, size, primary, name);
9d69ef1838150c Thomas Zimmermann 2022-07-18  339                if (ret)
9d69ef1838150c Thomas Zimmermann 2022-07-18  340                        break;
7283f862bd991c Thomas Zimmermann 2022-06-22  341        }
7283f862bd991c Thomas Zimmermann 2022-06-22  342  
9d69ef1838150c Thomas Zimmermann 2022-07-18 @343        if (ret)
9d69ef1838150c Thomas Zimmermann 2022-07-18  344                return ret;
9d69ef1838150c Thomas Zimmermann 2022-07-18  345  
9d69ef1838150c Thomas Zimmermann 2022-07-18  346        /*
9d69ef1838150c Thomas Zimmermann 2022-07-18  347         * WARNING: Apparently 
we must kick fbdev drivers before vgacon,
9d69ef1838150c Thomas Zimmermann 2022-07-18  348         * otherwise the vga 
fbdev driver falls over.
9d69ef1838150c Thomas Zimmermann 2022-07-18  349         */
9d69ef1838150c Thomas Zimmermann 2022-07-18  350        ret = 
vga_remove_vgacon(pdev);
9d69ef1838150c Thomas Zimmermann 2022-07-18  351        if (ret)
9d69ef1838150c Thomas Zimmermann 2022-07-18  352                return ret;
9d69ef1838150c Thomas Zimmermann 2022-07-18  353  
7283f862bd991c Thomas Zimmermann 2022-06-22  354        return 0;
7283f862bd991c Thomas Zimmermann 2022-06-22  355  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to