All of lore.kernel.org
 help / color / mirror / Atom feed
* [android-common:android-3.18 12862/13339] drivers/char/mem.c:457:8: error: implicit declaration of function 'should_stop_iteration'
@ 2019-12-11 13:31 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2019-12-11 13:31 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3731 bytes --]

Hi Tetsuo,

FYI, the error/warning still remains.

tree:   https://android.googlesource.com/kernel/common android-3.18
head:   c72397f51f6fb40145eac62f8ff244f39aeff009
commit: d8d7791979c3d6045b0904ddf8e17970401a5a80 [12862/13339] /dev/mem: Bail out upon SIGKILL.
config: x86_64-randconfig-d003-20191211 (attached as .config)
compiler: gcc-5 (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010
reproduce:
        git checkout d8d7791979c3d6045b0904ddf8e17970401a5a80
        # save the attached .config to linux build tree
        make ARCH=x86_64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/char/mem.c: In function 'read_kmem':
>> drivers/char/mem.c:457:8: error: implicit declaration of function 'should_stop_iteration' [-Werror=implicit-function-declaration]
       if (should_stop_iteration()) {
           ^
   cc1: some warnings being treated as errors

vim +/should_stop_iteration +457 drivers/char/mem.c

   408	
   409	#ifdef CONFIG_DEVKMEM
   410	/*
   411	 * This function reads the *virtual* memory as seen by the kernel.
   412	 */
   413	static ssize_t read_kmem(struct file *file, char __user *buf,
   414				 size_t count, loff_t *ppos)
   415	{
   416		unsigned long p = *ppos;
   417		ssize_t low_count, read, sz;
   418		char *kbuf; /* k-addr because vread() takes vmlist_lock rwlock */
   419		int err = 0;
   420	
   421		read = 0;
   422		if (p < (unsigned long) high_memory) {
   423			low_count = count;
   424			if (count > (unsigned long)high_memory - p)
   425				low_count = (unsigned long)high_memory - p;
   426	
   427	#ifdef __ARCH_HAS_NO_PAGE_ZERO_MAPPED
   428			/* we don't have page 0 mapped on sparc and m68k.. */
   429			if (p < PAGE_SIZE && low_count > 0) {
   430				sz = size_inside_page(p, low_count);
   431				if (clear_user(buf, sz))
   432					return -EFAULT;
   433				buf += sz;
   434				p += sz;
   435				read += sz;
   436				low_count -= sz;
   437				count -= sz;
   438			}
   439	#endif
   440			while (low_count > 0) {
   441				sz = size_inside_page(p, low_count);
   442	
   443				/*
   444				 * On ia64 if a page has been mapped somewhere as
   445				 * uncached, then it must also be accessed uncached
   446				 * by the kernel or data corruption may occur
   447				 */
   448				kbuf = xlate_dev_kmem_ptr((char *)p);
   449	
   450				if (copy_to_user(buf, kbuf, sz))
   451					return -EFAULT;
   452				buf += sz;
   453				p += sz;
   454				read += sz;
   455				low_count -= sz;
   456				count -= sz;
 > 457				if (should_stop_iteration()) {
   458					count = 0;
   459					break;
   460				}
   461			}
   462		}
   463	
   464		if (count > 0) {
   465			kbuf = (char *)__get_free_page(GFP_KERNEL);
   466			if (!kbuf)
   467				return -ENOMEM;
   468			while (count > 0) {
   469				sz = size_inside_page(p, count);
   470				if (!is_vmalloc_or_module_addr((void *)p)) {
   471					err = -ENXIO;
   472					break;
   473				}
   474				sz = vread(kbuf, (char *)p, sz);
   475				if (!sz)
   476					break;
   477				if (copy_to_user(buf, kbuf, sz)) {
   478					err = -EFAULT;
   479					break;
   480				}
   481				count -= sz;
   482				buf += sz;
   483				read += sz;
   484				p += sz;
   485				if (should_stop_iteration())
   486					break;
   487			}
   488			free_page((unsigned long)kbuf);
   489		}
   490		*ppos = p;
   491		return read ? read : err;
   492	}
   493	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 24063 bytes --]

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

only message in thread, other threads:[~2019-12-11 13:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-11 13:31 [android-common:android-3.18 12862/13339] drivers/char/mem.c:457:8: error: implicit declaration of function 'should_stop_iteration' kbuild test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.