Re: [PATCH v2] ufs: core: ufshcd: use local_clock() for debugging timestamps

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

 



Hi Daniil,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on jejb-scsi/for-next]
[also build test ERROR on mkp-scsi/for-next linus/master v5.19 next-20220728]
[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/Daniil-Lunev/ufs-core-ufshcd-use-local_clock-for-debugging-timestamps/20220801-123157
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
config: x86_64-randconfig-a001-20220801 (https://download.01.org/0day-ci/archive/20220802/202208020844.RaNi6Dg0-lkp@xxxxxxxxx/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 52cd00cabf479aa7eb6dbb063b7ba41ea57bce9e)
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/45a46347597e5c368c27a9fe01e400af675eb5e9
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Daniil-Lunev/ufs-core-ufshcd-use-local_clock-for-debugging-timestamps/20220801-123157
        git checkout 45a46347597e5c368c27a9fe01e400af675eb5e9
        # 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=x86_64 SHELL=/bin/bash drivers/ufs/ kernel/

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

All errors (new ones prefixed by >>):

>> drivers/ufs/core/ufshcd.c:2143:39: error: call to undeclared function 'local_clock'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           lrbp->issue_time_stamp_local_clock = local_clock();
                                                ^
   drivers/ufs/core/ufshcd.c:4227:45: error: call to undeclared function 'local_clock'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                   hba->ufs_stats.last_hibern8_exit_tstamp = local_clock();
                                                             ^
   drivers/ufs/core/ufshcd.c:4729:22: error: call to undeclared function 'local_clock'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           e->tstamp[e->pos] = local_clock();
                               ^
   drivers/ufs/core/ufshcd.c:5362:40: error: call to undeclared function 'local_clock'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                   lrbp->compl_time_stamp_local_clock = local_clock();
                                                        ^
   drivers/ufs/core/ufshcd.c:6651:32: error: call to undeclared function 'local_clock'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           hba->ufs_stats.last_intr_ts = local_clock();
                                         ^
   drivers/ufs/core/ufshcd.c:9553:44: warning: shift count >= width of type [-Wshift-count-overflow]
                   if (!dma_set_mask_and_coherent(hba->dev, DMA_BIT_MASK(64)))
                                                            ^~~~~~~~~~~~~~~~
   include/linux/dma-mapping.h:76:54: note: expanded from macro 'DMA_BIT_MASK'
   #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
                                                        ^ ~~~
   1 warning and 5 errors generated.


vim +/local_clock +2143 drivers/ufs/core/ufshcd.c

  2130	
  2131	/**
  2132	 * ufshcd_send_command - Send SCSI or device management commands
  2133	 * @hba: per adapter instance
  2134	 * @task_tag: Task tag of the command
  2135	 */
  2136	static inline
  2137	void ufshcd_send_command(struct ufs_hba *hba, unsigned int task_tag)
  2138	{
  2139		struct ufshcd_lrb *lrbp = &hba->lrb[task_tag];
  2140		unsigned long flags;
  2141	
  2142		lrbp->issue_time_stamp = ktime_get();
> 2143		lrbp->issue_time_stamp_local_clock = local_clock();
  2144		lrbp->compl_time_stamp = ktime_set(0, 0);
  2145		lrbp->compl_time_stamp_local_clock = 0;
  2146		ufshcd_add_command_trace(hba, task_tag, UFS_CMD_SEND);
  2147		ufshcd_clk_scaling_start_busy(hba);
  2148		if (unlikely(ufshcd_should_inform_monitor(hba, lrbp)))
  2149			ufshcd_start_monitor(hba, lrbp);
  2150	
  2151		spin_lock_irqsave(&hba->outstanding_lock, flags);
  2152		if (hba->vops && hba->vops->setup_xfer_req)
  2153			hba->vops->setup_xfer_req(hba, task_tag, !!lrbp->cmd);
  2154		__set_bit(task_tag, &hba->outstanding_reqs);
  2155		ufshcd_writel(hba, 1 << task_tag, REG_UTP_TRANSFER_REQ_DOOR_BELL);
  2156		spin_unlock_irqrestore(&hba->outstanding_lock, flags);
  2157	}
  2158	

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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux