Linux-fbdev Archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Thomas Zimmermann <tzimmermann@suse.de>,
	javierm@redhat.com, pjones@redhat.com, deller@gmx.de,
	ardb@kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
	Thomas Zimmermann <tzimmermann@suse.de>
Subject: Re: [PATCH v2 2/8] video: Provide screen_info_get_pci_dev() to find screen_info's PCI device
Date: Sun, 4 Feb 2024 09:53:24 +0800	[thread overview]
Message-ID: <202402040957.xNqUV75N-lkp@intel.com> (raw)
In-Reply-To: <20240202120140.3517-3-tzimmermann@suse.de>

Hi Thomas,

kernel test robot noticed the following build warnings:

[auto build test WARNING on drm-misc/drm-misc-next]
[also build test WARNING on drm-tip/drm-tip linus/master v6.8-rc2 next-20240202]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Thomas-Zimmermann/video-Add-helpers-for-decoding-screen_info/20240202-200314
base:   git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
patch link:    https://lore.kernel.org/r/20240202120140.3517-3-tzimmermann%40suse.de
patch subject: [PATCH v2 2/8] video: Provide screen_info_get_pci_dev() to find screen_info's PCI device
config: i386-buildonly-randconfig-004-20240203 (https://download.01.org/0day-ci/archive/20240204/202402040957.xNqUV75N-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240204/202402040957.xNqUV75N-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202402040957.xNqUV75N-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/video/screen_info_pci.c:10:6: warning: variable 'pdev' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
      10 |         if (!(res->flags & IORESOURCE_MEM))
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/video/screen_info_pci.c:13:19: note: uninitialized use occurs here
      13 |         for_each_pci_dev(pdev) {
         |                          ^~~~
   include/linux/pci.h:546:80: note: expanded from macro 'for_each_pci_dev'
     546 | #define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL)
         |                                                                                ^
   drivers/video/screen_info_pci.c:10:2: note: remove the 'if' if its condition is always true
      10 |         if (!(res->flags & IORESOURCE_MEM))
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      11 |                 return NULL;
   drivers/video/screen_info_pci.c:8:22: note: initialize the variable 'pdev' to silence this warning
       8 |         struct pci_dev *pdev;
         |                             ^
         |                              = NULL
   1 warning generated.


vim +10 drivers/video/screen_info_pci.c

     5	
     6	static struct pci_dev *__screen_info_pci_dev(struct resource *res)
     7	{
     8		struct pci_dev *pdev;
     9	
  > 10		if (!(res->flags & IORESOURCE_MEM))
    11			return NULL;
    12	
    13		for_each_pci_dev(pdev) {
    14			const struct resource *r;
    15	
    16			if ((pdev->class >> 16) != PCI_BASE_CLASS_DISPLAY)
    17				continue;
    18	
    19			r = pci_find_resource(pdev, res);
    20			if (r)
    21				return pdev;
    22		}
    23	
    24		return NULL;
    25	}
    26	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  parent reply	other threads:[~2024-02-04  1:53 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-02 11:58 [PATCH v2 0/8] firmware/sysfb: Track parent device for screen_info Thomas Zimmermann
2024-02-02 11:58 ` [PATCH v2 1/8] video: Add helpers for decoding screen_info Thomas Zimmermann
2024-02-02 11:58 ` [PATCH v2 2/8] video: Provide screen_info_get_pci_dev() to find screen_info's PCI device Thomas Zimmermann
2024-02-02 16:31   ` [v2,2/8] " Sui Jingfeng
2024-02-05  8:14     ` Thomas Zimmermann
2024-02-02 17:03   ` Sui Jingfeng
2024-02-05  8:17     ` Thomas Zimmermann
2024-02-05 10:05       ` Sui Jingfeng
2024-02-05 12:32         ` Thomas Zimmermann
2024-02-04  1:53   ` kernel test robot [this message]
2024-02-02 11:58 ` [PATCH v2 3/8] firmware/sysfb: Set firmware-framebuffer parent device Thomas Zimmermann
2024-02-02 14:40   ` [v2,3/8] " Sui Jingfeng
2024-02-02 15:23   ` Sui Jingfeng
2024-02-05  8:24     ` Thomas Zimmermann
2024-02-07 15:34       ` Sui Jingfeng
2024-02-03 19:12   ` [PATCH v2 3/8] " kernel test robot
2024-02-04  2:13   ` kernel test robot
2024-02-02 11:58 ` [PATCH v2 4/8] fbdev/efifb: Remove PM for " Thomas Zimmermann
2024-02-02 11:58 ` [PATCH v2 5/8] firmware/sysfb: Create firmware device only for enabled PCI devices Thomas Zimmermann
2024-02-02 17:50   ` [v2,5/8] " Sui Jingfeng
2024-02-05  8:25     ` [v2, 5/8] " Thomas Zimmermann
2024-02-02 11:58 ` [PATCH v2 6/8] fbdev/efifb: Do not track parent device status Thomas Zimmermann
2024-02-02 11:58 ` [PATCH v2 7/8] firmware/sysfb: Update screen_info for relocated EFI framebuffers Thomas Zimmermann
2024-02-02 17:54   ` [v2,7/8] " Sui Jingfeng
2024-02-05 10:11     ` Thomas Zimmermann
2024-02-02 18:00   ` Sui Jingfeng
2024-02-06 16:45     ` Thomas Zimmermann
2024-02-02 11:58 ` [PATCH v2 8/8] fbdev/efifb: Remove framebuffer relocation tracking Thomas Zimmermann
2024-02-02 18:07   ` [v2,8/8] " Sui Jingfeng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202402040957.xNqUV75N-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=ardb@kernel.org \
    --cc=deller@gmx.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=javierm@redhat.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pjones@redhat.com \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).