Re: [PATCH v2 4/6] bus: mhi: core: Introduce debugfs entries and counters for MHI

2020-05-12 Thread kbuild test robot
Hi Bhaumik,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on next-20200512]
[cannot apply to linus/master v5.7-rc5 v5.7-rc4 v5.7-rc3 v5.7-rc5]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:
https://github.com/0day-ci/linux/commits/Bhaumik-Bhatt/Introduce-features-and-debugfs-sysfs-entries-for-MHI/20200513-014548
base:e098d7762d602be640c53565ceca342f81e55ad2
config: um-allyesconfig (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
# save the attached .config to linux build tree
make ARCH=um 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot 

All errors (new ones prefixed by >>):

drivers/bus/mhi/core/debugfs.c: In function 'mhi_debugfs_trigger_reset':
>> drivers/bus/mhi/core/debugfs.c:294:2: error: implicit declaration of 
>> function 'mhi_pm_sys_err_handler'; did you mean 'mhi_pm_sys_err_worker'? 
>> [-Werror=implicit-function-declaration]
mhi_pm_sys_err_handler(mhi_cntrl);
^~
mhi_pm_sys_err_worker
cc1: some warnings being treated as errors

vim +294 drivers/bus/mhi/core/debugfs.c

   259  
   260  static int mhi_debugfs_trigger_reset(void *data, u64 val)
   261  {
   262  struct mhi_controller *mhi_cntrl = data;
   263  struct mhi_device *mhi_dev = mhi_cntrl->mhi_dev;
   264  struct device *dev = &mhi_dev->dev;
   265  enum mhi_pm_state cur_state;
   266  int ret = -EIO;
   267  
   268  if (!mhi_is_active(mhi_cntrl))
   269  return -ENODEV;
   270  
   271  if (!val)
   272  return -EINVAL;
   273  
   274  ret = mhi_device_get_sync(mhi_dev, MHI_VOTE_DEVICE);
   275  if (ret) {
   276  dev_err(dev, "Device did not enter M0 state, MHI:%s, 
PM:%s\n",
   277  TO_MHI_STATE_STR(mhi_cntrl->dev_state),
   278  to_mhi_pm_state_str(mhi_cntrl->pm_state));
   279  return ret;
   280  }
   281  
   282  if (mhi_cntrl->rddm_image) {
   283  ret = mhi_force_rddm_mode(mhi_cntrl);
   284  goto exit_mhi_trigger_reset;
   285  }
   286  
   287  write_lock_irq(&mhi_cntrl->pm_lock);
   288  cur_state = mhi_tryset_pm_state(mhi_cntrl, 
MHI_PM_SYS_ERR_DETECT);
   289  write_unlock_irq(&mhi_cntrl->pm_lock);
   290  
   291  if (cur_state != MHI_PM_SYS_ERR_DETECT)
   292  goto exit_mhi_trigger_reset;
   293  
 > 294  mhi_pm_sys_err_handler(mhi_cntrl);
   295  ret = 0;
   296  
   297  exit_mhi_trigger_reset:
   298  mhi_device_put(mhi_dev, MHI_VOTE_DEVICE);
   299  
   300  return ret;
   301  }
   302  

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


.config.gz
Description: application/gzip


Re: [PATCH v2 4/6] bus: mhi: core: Introduce debugfs entries and counters for MHI

2020-05-12 Thread kbuild test robot
Hi Bhaumik,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on next-20200512]
[cannot apply to linus/master v5.7-rc5 v5.7-rc4 v5.7-rc3 v5.7-rc5]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:
https://github.com/0day-ci/linux/commits/Bhaumik-Bhatt/Introduce-features-and-debugfs-sysfs-entries-for-MHI/20200513-014548
base:e098d7762d602be640c53565ceca342f81e55ad2
config: m68k-allyesconfig (attached as .config)
compiler: m68k-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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=m68k 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot 

All warnings (new ones prefixed by >>):

drivers/bus/mhi/core/debugfs.c: In function 'mhi_debugfs_events_show':
>> drivers/bus/mhi/core/debugfs.c:71:33: warning: cast from pointer to integer 
>> of different size [-Wpointer-to-int-cast]
71 |   er_ctxt->rp, er_ctxt->wp, (u64)ring->rp,
| ^
>> drivers/bus/mhi/core/debugfs.c:70:53: warning: format '%llx' expects 
>> argument of type 'long long unsigned int', but argument 6 has type 
>> 'dma_addr_t' {aka 'unsigned int'} [-Wformat=]
70 |   " rp:0x%llx wp:0x%llx local rp:0x%llx db:0x%llxn",
|  ~~~^
| |
| long long unsigned int
|  %x
71 |   er_ctxt->rp, er_ctxt->wp, (u64)ring->rp,
72 |   mhi_event->db_cfg.db_val);
|   
||
|dma_addr_t {aka unsigned int}
drivers/bus/mhi/core/debugfs.c: In function 'mhi_debugfs_channels_show':
drivers/bus/mhi/core/debugfs.c:119:7: warning: cast from pointer to integer of 
different size [-Wpointer-to-int-cast]
119 |   (u64)ring->rp, (u64)ring->wp,
|   ^
drivers/bus/mhi/core/debugfs.c:119:22: warning: cast from pointer to integer of 
different size [-Wpointer-to-int-cast]
119 |   (u64)ring->rp, (u64)ring->wp,
|  ^
drivers/bus/mhi/core/debugfs.c:118:59: warning: format '%llx' expects argument 
of type 'long long unsigned int', but argument 5 has type 'dma_addr_t' {aka 
'unsigned int'} [-Wformat=]
118 |   seq_printf(m, " local rp:0x%llx local wp:0x%llx db:0x%llxn",
|~~~^
|   |
|   long long unsigned 
int
|%x
119 |   (u64)ring->rp, (u64)ring->wp,
120 |   mhi_chan->db_cfg.db_val);
|   ~~~
|   |
|   dma_addr_t {aka unsigned int}
drivers/bus/mhi/core/debugfs.c: In function 'mhi_debugfs_trigger_reset':
drivers/bus/mhi/core/debugfs.c:294:2: error: implicit declaration of function 
'mhi_pm_sys_err_handler'; did you mean 'mhi_pm_sys_err_worker'? 
[-Werror=implicit-function-declaration]
294 |  mhi_pm_sys_err_handler(mhi_cntrl);
|  ^~
|  mhi_pm_sys_err_worker
cc1: some warnings being treated as errors

vim +71 drivers/bus/mhi/core/debugfs.c

36  
37  static int mhi_debugfs_events_show(struct seq_file *m, void *d)
38  {
39  struct mhi_controller *mhi_cntrl = m->private;
40  struct mhi_event *mhi_event;
41  struct mhi_event_ctxt *er_ctxt;
42  int i;
43  
44  if (!mhi_is_active(mhi_cntrl)) {
45  seq_puts(m, "Device not ready\n");
46  return -ENODEV;
47  }
48  
49  er_ctxt = mhi_cntrl->mhi_ctxt->er_ctxt;
50  mhi_event = mhi_cntrl->mhi_event;
51  for (i = 0; i < mhi_cntrl->total_ev_rings;
52  i++, er_ctxt++, 
mhi_event++) {
53  struct mhi_ring *ring = &mhi_event->ring;
54  
55  if (mhi_event->offload_ev) {
56  seq_printf(m, "Index:%d is an offload event 
ring\n", i);
57  continue;
58  }
59  
60  seq_printf(m, "Index:%d intmod count:%lu time:%lu",
61 i, (er_ctxt->intmod & EV_CTX_INTMODC_MASK) >>
62 EV_CTX_INTMODC_SHIFT,
63 (er_ctxt->intmod & EV_CTX_INTMODT_MASK) >>
64