All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org, kbuild-all@01.org
Subject: Re: [PATCH v2] drm/i915: Mark i915.inject_load_failure as being hit
Date: Fri, 8 Jun 2018 02:11:17 +0800	[thread overview]
Message-ID: <201806072309.zlo1FkIi%fengguang.wu@intel.com> (raw)
In-Reply-To: <20180606142604.13428-1-chris@chris-wilson.co.uk>

Hi Chris,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on v4.17 next-20180607]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Chris-Wilson/drm-i915-Mark-i915-inject_load_failure-as-being-hit/20180607-174849
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
reproduce:
        # apt-get install sparse
        make ARCH=x86_64 allmodconfig
        make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

>> drivers/gpu/drm/i915/i915_drv.c:61:36: sparse: incorrect type in initializer (different base types) @@    expected int static [signed] [toplevel] i915_load_error_level @@    got evel] i915_load_error_level @@
   drivers/gpu/drm/i915/i915_drv.c:61:36:    expected int static [signed] [toplevel] i915_load_error_level
   drivers/gpu/drm/i915/i915_drv.c:61:36:    got char *<noident>
>> drivers/gpu/drm/i915/i915_drv.c:72:39: sparse: incorrect type in assignment (different base types) @@    expected int static [signed] [toplevel] i915_load_error_level @@    got evel] i915_load_error_level @@
   drivers/gpu/drm/i915/i915_drv.c:72:39:    expected int static [signed] [toplevel] i915_load_error_level
   drivers/gpu/drm/i915/i915_drv.c:72:39:    got char *<noident>
>> drivers/gpu/drm/i915/i915_drv.c:1425:9: sparse: incorrect type in argument 2 (different base types) @@    expected char const *level @@    got int static [signed]char const *level @@
   drivers/gpu/drm/i915/i915_drv.c:1425:9:    expected char const *level
   drivers/gpu/drm/i915/i915_drv.c:1425:9:    got int static [signed] [toplevel] i915_load_error_level
   In file included from include/linux/printk.h:7:0,
                    from include/linux/kernel.h:14,
                    from include/linux/list.h:9,
                    from include/linux/resource_ext.h:17,
                    from include/linux/acpi.h:26,
                    from drivers/gpu/drm/i915/i915_drv.c:30:
   include/linux/kern_levels.h:5:18: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
    #define KERN_SOH "001"  /* ASCII Start Of Header */
                     ^
   include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH'
    #define KERN_ERR KERN_SOH "3" /* error conditions */
                     ^~~~~~~~
   drivers/gpu/drm/i915/i915_drv.c:61:36: note: in expansion of macro 'KERN_ERR'
    static int i915_load_error_level = KERN_ERR;
                                       ^~~~~~~~
   include/linux/kern_levels.h:5:18: error: initializer element is not computable at load time
    #define KERN_SOH "001"  /* ASCII Start Of Header */
                     ^
   include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH'
    #define KERN_ERR KERN_SOH "3" /* error conditions */
                     ^~~~~~~~
   drivers/gpu/drm/i915/i915_drv.c:61:36: note: in expansion of macro 'KERN_ERR'
    static int i915_load_error_level = KERN_ERR;
                                       ^~~~~~~~
   drivers/gpu/drm/i915/i915_drv.c: In function '__i915_inject_load_failure':
   drivers/gpu/drm/i915/i915_drv.c:72:25: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
      i915_load_error_level = KERN_DEBUG;
                            ^
   drivers/gpu/drm/i915/i915_drv.c: In function 'i915_driver_load':
   drivers/gpu/drm/i915/i915_drv.c:123:26: warning: passing argument 2 of '__i915_printk' makes pointer from integer without a cast [-Wint-conversion]
     __i915_printk(dev_priv, i915_load_error_level, fmt, ##__VA_ARGS__)
                             ^
   drivers/gpu/drm/i915/i915_drv.c:1425:2: note: in expansion of macro 'i915_load_error'
     i915_load_error(dev_priv, "Device initialization failed (%d)n", ret);
     ^~~~~~~~~~~~~~~
   drivers/gpu/drm/i915/i915_drv.c:87:1: note: expected 'const char *' but argument is of type 'int'
    __i915_printk(struct drm_i915_private *dev_priv, const char *level,
    ^~~~~~~~~~~~~

vim +61 drivers/gpu/drm/i915/i915_drv.c

    58	
    59	#if IS_ENABLED(CONFIG_DRM_I915_DEBUG)
    60	static unsigned int i915_load_fail_count;
  > 61	static int i915_load_error_level = KERN_ERR;
    62	
    63	bool __i915_inject_load_failure(const char *func, int line)
    64	{
    65		if (i915_load_fail_count >= i915_modparams.inject_load_failure)
    66			return false;
    67	
    68		if (++i915_load_fail_count == i915_modparams.inject_load_failure) {
    69			DRM_INFO("Injecting failure at checkpoint %u [%s:%d]\n",
    70				 i915_modparams.inject_load_failure, func, line);
    71			i915_modparams.inject_load_failure = 0;
  > 72			i915_load_error_level = KERN_DEBUG;
    73			return true;
    74		}
    75	
    76		return false;
    77	}
    78	#else
    79	#define i915_load_error_level KERN_ERR
    80	#endif
    81	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2018-06-07 18:12 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-06 13:09 [PATCH] drm/i915: Mark i915.inject_load_failure as being hit Chris Wilson
2018-06-06 13:25 ` Michal Wajdeczko
2018-06-06 13:33   ` Chris Wilson
2018-06-06 14:19     ` Chris Wilson
2018-06-06 14:28       ` Michal Wajdeczko
2018-06-06 13:57 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2018-06-06 14:12 ` ✗ Fi.CI.BAT: failure " Patchwork
2018-06-06 14:26 ` [PATCH v2] " Chris Wilson
2018-06-07 11:09   ` kbuild test robot
2018-06-07 11:17   ` kbuild test robot
2018-06-07 18:11   ` kbuild test robot [this message]
2018-06-06 14:41 ` [PATCH v3] " Chris Wilson
2018-06-06 14:50   ` Michał Winiarski
2018-06-06 14:54     ` Michal Wajdeczko
2018-06-06 17:40       ` Chris Wilson
2018-06-06 14:55     ` Chris Wilson
2018-06-06 15:21 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Mark i915.inject_load_failure as being hit (rev3) Patchwork
2018-06-06 15:36 ` ✓ Fi.CI.BAT: success " Patchwork
2018-06-06 18:07 ` ✓ Fi.CI.IGT: " Patchwork

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=201806072309.zlo1FkIi%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=kbuild-all@01.org \
    /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.