From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============8090105859650871338==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: [android-common:android12-kiwi-5.10 4/4] drivers/virtio/virtio_pvclock.c:49:6: warning: no previous prototype for 'update_suspend_time' Date: Tue, 25 Jan 2022 21:42:08 +0800 Message-ID: <202201252119.OR28gWwd-lkp@intel.com> List-Id: --===============8090105859650871338== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable tree: https://android.googlesource.com/kernel/common android12-kiwi-5.10 head: 029865ac9555743665dd106b4bbefb2f371849e9 commit: 029865ac9555743665dd106b4bbefb2f371849e9 [4/4] ANDROID: virtio: vir= tio_pvclock: initial driver impl config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220125= /202201252119.OR28gWwd-lkp(a)intel.com/config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce (this is a W=3D1 build): git remote add android-common https://android.googlesource.com/kern= el/common git fetch --no-tags android-common android12-kiwi-5.10 git checkout 029865ac9555743665dd106b4bbefb2f371849e9 # save the config file to linux build tree mkdir build_dir make W=3D1 O=3Dbuild_dir ARCH=3Di386 SHELL=3D/bin/bash drivers/virt= io/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot 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 de= clarations and code [-Wdeclaration-after-statement] 295 | uint32_t rating =3D | ^~~~~~~~ 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 =3D 0; 52 struct timespec64 inject_time; 53 struct virtio_pvclock *vp; 54 = 55 vp =3D container_of(work, struct virtio_pvclock, 56 update_suspend_time_work); 57 = 58 virtio_cread(vp->vdev, struct virtio_pvclock_config, suspend_time_n= s, 59 &suspend_ns); 60 = 61 mutex_lock(&vp->inject_suspend_lock); 62 if (suspend_ns > vp->injected_suspend_ns) { 63 suspend_time_delta =3D suspend_ns - vp->injected_suspend_ns; 64 vp->injected_suspend_ns =3D suspend_ns; 65 } 66 mutex_unlock(&vp->inject_suspend_lock); 67 = 68 if (suspend_time_delta =3D=3D 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 =3D 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, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============8090105859650871338==--