Re: [PATCH v6 14/14] drm/print: Add tracefs support to the drm logging helpers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sean,

I love your patch! Perhaps something to improve:

[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on tegra-drm/drm/tegra/for-next drm-tip/drm-tip linus/master drm-exynos/exynos-drm-next v5.9-rc1 next-20200818]
[cannot apply to drm/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/0day-ci/linux/commits/Sean-Paul/drm-trace-Mirror-DRM-debug-logs-to-tracefs/20200819-050745
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: openrisc-randconfig-s031-20200818 (attached as .config)
compiler: or1k-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.2-183-gaa6ede3b-dirty
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=openrisc 

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


sparse warnings: (new ones prefixed by >>)

>> drivers/gpu/drm/drm_print.c:459:21: sparse: sparse: non-ANSI function declaration of function 'drm_trace_init'
>> drivers/gpu/drm/drm_print.c:498:24: sparse: sparse: non-ANSI function declaration of function 'drm_trace_cleanup'
   drivers/gpu/drm/drm_print.c:467:15: sparse: sparse: undefined identifier 'trace_array_init_printk'
   drivers/gpu/drm/drm_print.c: note: in included file (through arch/openrisc/include/asm/io.h, include/linux/io.h):
   include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32

# https://github.com/0day-ci/linux/commit/fe0a955028a2121ce9ab9acd1c2ab74d219cdc60
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Sean-Paul/drm-trace-Mirror-DRM-debug-logs-to-tracefs/20200819-050745
git checkout fe0a955028a2121ce9ab9acd1c2ab74d219cdc60
vim +/drm_trace_init +459 drivers/gpu/drm/drm_print.c

   452	
   453	/**
   454	 * drm_trace_init - initializes the drm trace array
   455	 *
   456	 * This function fetches (or creates) the drm trace array. This should be called
   457	 * once on drm subsystem creation and matched with drm_trace_cleanup().
   458	 */
 > 459	void drm_trace_init()
   460	{
   461		int ret;
   462	
   463		trace_arr = trace_array_get_by_name("drm");
   464		if (!trace_arr)
   465			return;
   466	
   467		ret = trace_array_init_printk(trace_arr);
   468		if (ret)
   469			drm_trace_cleanup();
   470	}
   471	EXPORT_SYMBOL(drm_trace_init);
   472	
   473	/**
   474	 * drm_trace_printf - adds an entry to the drm tracefs instance
   475	 * @format: printf format of the message to add to the trace
   476	 *
   477	 * This function adds a new entry in the drm tracefs instance
   478	 */
   479	void drm_trace_printf(const char *format, ...)
   480	{
   481		struct va_format vaf;
   482		va_list args;
   483	
   484		va_start(args, format);
   485		vaf.fmt = format;
   486		vaf.va = &args;
   487		trace_array_printk(trace_arr, _THIS_IP_, "%pV", &vaf);
   488		va_end(args);
   489	}
   490	
   491	/**
   492	 * drm_trace_cleanup - destroys the drm trace array
   493	 *
   494	 * This function destroys the drm trace array created with drm_trace_init. This
   495	 * should be called once on drm subsystem close and matched with
   496	 * drm_trace_init().
   497	 */
 > 498	void drm_trace_cleanup()

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux