All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Thomas Zimmermann <tzimmermann@suse.de>,
	airlied@redhat.com, jfalempe@redhat.com, daniel@ffwll.ch
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	Thomas Zimmermann <tzimmermann@suse.de>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/mgag200: Fail on I2C initialization errors
Date: Fri, 6 May 2022 05:06:19 +0800	[thread overview]
Message-ID: <202205060439.bfJ2FmzU-lkp@intel.com> (raw)
In-Reply-To: <20220505152244.413-1-tzimmermann@suse.de>

Hi Thomas,

I love your patch! Perhaps something to improve:

[auto build test WARNING on drm/drm-next]
[also build test WARNING on drm-exynos/exynos-drm-next drm-intel/for-linux-next drm-tip/drm-tip tegra-drm/drm/tegra/for-next v5.18-rc5 next-20220505]
[cannot apply to airlied/drm-next]
[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]

url:    https://github.com/intel-lab-lkp/linux/commits/Thomas-Zimmermann/drm-mgag200-Fail-on-I2C-initialization-errors/20220505-234643
base:   git://anongit.freedesktop.org/drm/drm drm-next
config: i386-randconfig-a013 (https://download.01.org/0day-ci/archive/20220506/202205060439.bfJ2FmzU-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 5e004fb787698440a387750db7f8028e7cb14cfc)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/11682b9fc557a02edac08b0dedc91ce704c2f749
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Thomas-Zimmermann/drm-mgag200-Fail-on-I2C-initialization-errors/20220505-234643
        git checkout 11682b9fc557a02edac08b0dedc91ce704c2f749
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/gpu/drm/mgag200/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/mgag200/mgag200_mode.c:819:47: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
                   drm_err(dev, "failed to add DDC bus: %d\n", ret);
                                                               ^~~
   include/drm/drm_print.h:438:46: note: expanded from macro 'drm_err'
           __drm_printk((drm), err,, "*ERROR* " fmt, ##__VA_ARGS__)
                                                       ^~~~~~~~~~~
   include/drm/drm_print.h:425:48: note: expanded from macro '__drm_printk'
           dev_##level##type((drm)->dev, "[drm] " fmt, ##__VA_ARGS__)
                                                         ^~~~~~~~~~~
   include/linux/dev_printk.h:144:65: note: expanded from macro 'dev_err'
           dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
                                                                          ^~~~~~~~~~~
   include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap'
                   _p_func(dev, fmt, ##__VA_ARGS__);                       \
                                       ^~~~~~~~~~~
   drivers/gpu/drm/mgag200/mgag200_mode.c:815:9: note: initialize the variable 'ret' to silence this warning
           int ret;
                  ^
                   = 0
   1 warning generated.


vim +/ret +819 drivers/gpu/drm/mgag200/mgag200_mode.c

   808	
   809	static int mgag200_vga_connector_init(struct mga_device *mdev)
   810	{
   811		struct drm_device *dev = &mdev->base;
   812		struct mga_connector *mconnector = &mdev->connector;
   813		struct drm_connector *connector = &mconnector->base;
   814		struct mga_i2c_chan *i2c;
   815		int ret;
   816	
   817		i2c = mgag200_i2c_create(dev);
   818		if (IS_ERR(i2c)) {
 > 819			drm_err(dev, "failed to add DDC bus: %d\n", ret);
   820			return PTR_ERR(i2c);
   821		}
   822	
   823		ret = drm_connector_init_with_ddc(dev, connector,
   824						  &mga_vga_connector_funcs,
   825						  DRM_MODE_CONNECTOR_VGA,
   826						  &i2c->adapter);
   827		if (ret)
   828			goto err_mgag200_i2c_destroy;
   829		drm_connector_helper_add(connector, &mga_vga_connector_helper_funcs);
   830	
   831		mconnector->i2c = i2c;
   832	
   833		return 0;
   834	
   835	err_mgag200_i2c_destroy:
   836		mgag200_i2c_destroy(i2c);
   837		return ret;
   838	}
   839	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Thomas Zimmermann <tzimmermann@suse.de>,
	airlied@redhat.com, jfalempe@redhat.com, daniel@ffwll.ch
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	dri-devel@lists.freedesktop.org,
	Thomas Zimmermann <tzimmermann@suse.de>
Subject: Re: [PATCH] drm/mgag200: Fail on I2C initialization errors
Date: Fri, 6 May 2022 05:06:19 +0800	[thread overview]
Message-ID: <202205060439.bfJ2FmzU-lkp@intel.com> (raw)
In-Reply-To: <20220505152244.413-1-tzimmermann@suse.de>

Hi Thomas,

I love your patch! Perhaps something to improve:

[auto build test WARNING on drm/drm-next]
[also build test WARNING on drm-exynos/exynos-drm-next drm-intel/for-linux-next drm-tip/drm-tip tegra-drm/drm/tegra/for-next v5.18-rc5 next-20220505]
[cannot apply to airlied/drm-next]
[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]

url:    https://github.com/intel-lab-lkp/linux/commits/Thomas-Zimmermann/drm-mgag200-Fail-on-I2C-initialization-errors/20220505-234643
base:   git://anongit.freedesktop.org/drm/drm drm-next
config: i386-randconfig-a013 (https://download.01.org/0day-ci/archive/20220506/202205060439.bfJ2FmzU-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 5e004fb787698440a387750db7f8028e7cb14cfc)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/11682b9fc557a02edac08b0dedc91ce704c2f749
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Thomas-Zimmermann/drm-mgag200-Fail-on-I2C-initialization-errors/20220505-234643
        git checkout 11682b9fc557a02edac08b0dedc91ce704c2f749
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/gpu/drm/mgag200/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/mgag200/mgag200_mode.c:819:47: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
                   drm_err(dev, "failed to add DDC bus: %d\n", ret);
                                                               ^~~
   include/drm/drm_print.h:438:46: note: expanded from macro 'drm_err'
           __drm_printk((drm), err,, "*ERROR* " fmt, ##__VA_ARGS__)
                                                       ^~~~~~~~~~~
   include/drm/drm_print.h:425:48: note: expanded from macro '__drm_printk'
           dev_##level##type((drm)->dev, "[drm] " fmt, ##__VA_ARGS__)
                                                         ^~~~~~~~~~~
   include/linux/dev_printk.h:144:65: note: expanded from macro 'dev_err'
           dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
                                                                          ^~~~~~~~~~~
   include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap'
                   _p_func(dev, fmt, ##__VA_ARGS__);                       \
                                       ^~~~~~~~~~~
   drivers/gpu/drm/mgag200/mgag200_mode.c:815:9: note: initialize the variable 'ret' to silence this warning
           int ret;
                  ^
                   = 0
   1 warning generated.


vim +/ret +819 drivers/gpu/drm/mgag200/mgag200_mode.c

   808	
   809	static int mgag200_vga_connector_init(struct mga_device *mdev)
   810	{
   811		struct drm_device *dev = &mdev->base;
   812		struct mga_connector *mconnector = &mdev->connector;
   813		struct drm_connector *connector = &mconnector->base;
   814		struct mga_i2c_chan *i2c;
   815		int ret;
   816	
   817		i2c = mgag200_i2c_create(dev);
   818		if (IS_ERR(i2c)) {
 > 819			drm_err(dev, "failed to add DDC bus: %d\n", ret);
   820			return PTR_ERR(i2c);
   821		}
   822	
   823		ret = drm_connector_init_with_ddc(dev, connector,
   824						  &mga_vga_connector_funcs,
   825						  DRM_MODE_CONNECTOR_VGA,
   826						  &i2c->adapter);
   827		if (ret)
   828			goto err_mgag200_i2c_destroy;
   829		drm_connector_helper_add(connector, &mga_vga_connector_helper_funcs);
   830	
   831		mconnector->i2c = i2c;
   832	
   833		return 0;
   834	
   835	err_mgag200_i2c_destroy:
   836		mgag200_i2c_destroy(i2c);
   837		return ret;
   838	}
   839	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

  parent reply	other threads:[~2022-05-05 21:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-05 15:22 [PATCH] drm/mgag200: Fail on I2C initialization errors Thomas Zimmermann
2022-05-05 15:49 ` Jocelyn Falempe
2022-05-06 10:53   ` Thomas Zimmermann
2022-05-05 21:06 ` kernel test robot [this message]
2022-05-05 21:06   ` kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2022-05-06  2:25 kernel test robot
2022-05-06  7:26 ` Dan Carpenter
2022-05-06  7:26 ` Dan Carpenter

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=202205060439.bfJ2FmzU-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=airlied@redhat.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jfalempe@redhat.com \
    --cc=kbuild-all@lists.01.org \
    --cc=llvm@lists.linux.dev \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.