Re: [PATCH] s390/dasd: avoid calling do_gettimeofday()

From: kbuild test robot
Date: Wed Nov 08 2017 - 10:48:43 EST


Hi Arnd,

I love your patch! Yet something to improve:

[auto build test ERROR on s390/features]
[also build test ERROR on v4.14-rc8 next-20171108]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Arnd-Bergmann/s390-dasd-avoid-calling-do_gettimeofday/20171108-213507
base: https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git features
config: s390-default_defconfig (attached as .config)
compiler: s390x-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
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
make.cross ARCH=s390

All errors (new ones prefixed by >>):

In file included from include/linux/ktime.h:272:0,
from include/linux/timer.h:5,
from include/linux/workqueue.h:8,
from include/linux/srcu.h:34,
from include/linux/notifier.h:15,
from arch/s390/include/asm/uprobes.h:11,
from include/linux/uprobes.h:62,
from include/linux/mm_types.h:13,
from include/linux/fs.h:21,
from drivers/s390/block/dasd_eer.c:12:
drivers/s390/block/dasd_eer.c: In function 'dasd_eer_write_standard_trigger':
>> drivers/s390/block/dasd_eer.c:312:23: error: 'ts' undeclared (first use in this function)
ktime_get_real_ts64(&ts);
^
include/linux/timekeeping.h:160:50: note: in definition of macro 'ktime_get_real_ts64'
#define ktime_get_real_ts64(ts) getnstimeofday64(ts)
^~
drivers/s390/block/dasd_eer.c:312:23: note: each undeclared identifier is reported only once for each function it appears in
ktime_get_real_ts64(&ts);
^
include/linux/timekeeping.h:160:50: note: in definition of macro 'ktime_get_real_ts64'
#define ktime_get_real_ts64(ts) getnstimeofday64(ts)
^~
drivers/s390/block/dasd_eer.c:298:20: warning: unused variable 'ts64' [-Wunused-variable]
struct timespec64 ts64;
^~~~

vim +/ts +312 drivers/s390/block/dasd_eer.c

284
285 /*
286 * The following function can be used for those triggers that have
287 * all necessary data available when the function is called.
288 * If the parameter cqr is not NULL, the chain of requests will be searched
289 * for valid sense data, and all valid sense data sets will be added to
290 * the triggers data.
291 */
292 static void dasd_eer_write_standard_trigger(struct dasd_device *device,
293 struct dasd_ccw_req *cqr,
294 int trigger)
295 {
296 struct dasd_ccw_req *temp_cqr;
297 int data_size;
298 struct timespec64 ts64;
299 struct dasd_eer_header header;
300 unsigned long flags;
301 struct eerbuffer *eerb;
302 char *sense;
303
304 /* go through cqr chain and count the valid sense data sets */
305 data_size = 0;
306 for (temp_cqr = cqr; temp_cqr; temp_cqr = temp_cqr->refers)
307 if (dasd_get_sense(&temp_cqr->irb))
308 data_size += 32;
309
310 header.total_size = sizeof(header) + data_size + 4; /* "EOR" */
311 header.trigger = trigger;
> 312 ktime_get_real_ts64(&ts);
313 header.tv_sec = ts.tv_sec;
314 header.tv_usec = ts.tv_nsec / NSEC_PER_USEC;
315 strncpy(header.busid, dev_name(&device->cdev->dev),
316 DASD_EER_BUSID_SIZE);
317
318 spin_lock_irqsave(&bufferlock, flags);
319 list_for_each_entry(eerb, &bufferlist, list) {
320 dasd_eer_start_record(eerb, header.total_size);
321 dasd_eer_write_buffer(eerb, (char *) &header, sizeof(header));
322 for (temp_cqr = cqr; temp_cqr; temp_cqr = temp_cqr->refers) {
323 sense = dasd_get_sense(&temp_cqr->irb);
324 if (sense)
325 dasd_eer_write_buffer(eerb, sense, 32);
326 }
327 dasd_eer_write_buffer(eerb, "EOR", 4);
328 }
329 spin_unlock_irqrestore(&bufferlock, flags);
330 wake_up_interruptible(&dasd_eer_read_wait_queue);
331 }
332

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip