public inbox for [email protected]
 help / color / mirror / Atom feed
* [ammarfaizi2-block:google/android/kernel/common/android12-kiwi-5.10 9930/9999] drivers/virtio/virtio_pvclock.c:49:6: warning: no previous prototype for 'update_suspend_time'
@ 2022-03-23  1:35 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-03-23  1:35 UTC (permalink / raw)
  To: Colin Downs-Razouk
  Cc: kbuild-all, GNU/Weeb Mailing List, linux-kernel, Chris Morin

Hi Colin,

FYI, the error/warning still remains.

tree:   https://github.com/ammarfaizi2/linux-block google/android/kernel/common/android12-kiwi-5.10
head:   37d518ce65952e985a207fcb558e16e3288cd139
commit: 029865ac9555743665dd106b4bbefb2f371849e9 [9930/9999] ANDROID: virtio: virtio_pvclock: initial driver impl
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220323/[email protected]/config)
compiler: gcc-9 (Ubuntu 9.4.0-1ubuntu1~20.04) 9.4.0
reproduce (this is a W=1 build):
        # https://github.com/ammarfaizi2/linux-block/commit/029865ac9555743665dd106b4bbefb2f371849e9
        git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
        git fetch --no-tags ammarfaizi2-block google/android/kernel/common/android12-kiwi-5.10
        git checkout 029865ac9555743665dd106b4bbefb2f371849e9
        # save the config file to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/virtio/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>

All warnings (new ones prefixed by >>):

>> drivers/virtio/virtio_pvclock.c:49:6: warning: no previous prototype for 'update_suspend_time' [-Wmissing-prototypes]
      49 | void update_suspend_time(struct work_struct *work)
         |      ^~~~~~~~~~~~~~~~~~~
   drivers/virtio/virtio_pvclock.c: In function 'virtpvclock_validate':
>> drivers/virtio/virtio_pvclock.c:295:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
     295 |  uint32_t rating =
         |  ^~~~~~~~


vim +/update_suspend_time +49 drivers/virtio/virtio_pvclock.c

    48	
  > 49	void update_suspend_time(struct work_struct *work)
    50	{
    51		u64 suspend_ns, suspend_time_delta = 0;
    52		struct timespec64 inject_time;
    53		struct virtio_pvclock *vp;
    54	
    55		vp = container_of(work, struct virtio_pvclock,
    56				  update_suspend_time_work);
    57	
    58		virtio_cread(vp->vdev, struct virtio_pvclock_config, suspend_time_ns,
    59			     &suspend_ns);
    60	
    61		mutex_lock(&vp->inject_suspend_lock);
    62		if (suspend_ns > vp->injected_suspend_ns) {
    63			suspend_time_delta = suspend_ns - vp->injected_suspend_ns;
    64			vp->injected_suspend_ns = suspend_ns;
    65		}
    66		mutex_unlock(&vp->inject_suspend_lock);
    67	
    68		if (suspend_time_delta == 0) {
    69			dev_err(&vp->vdev->dev,
    70				"%s: suspend_time_ns is less than injected_suspend_ns\n",
    71				__func__);
    72			return;
    73		}
    74	
    75		inject_time = ns_to_timespec64(suspend_time_delta);
    76	
    77		timekeeping_inject_sleeptime64(&inject_time);
    78	
    79		dev_info(&vp->vdev->dev, "injected sleeptime: %llu ns\n",
    80			 suspend_time_delta);
    81	}
    82	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-23  1:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-23  1:35 [ammarfaizi2-block:google/android/kernel/common/android12-kiwi-5.10 9930/9999] drivers/virtio/virtio_pvclock.c:49:6: warning: no previous prototype for 'update_suspend_time' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox