All of lore.kernel.org
 help / color / mirror / Atom feed
* [miquelraynal:mtd/next 8/8] drivers/mtd/mtdconcat.c:129:4: warning: 'return' with no value, in function returning non-void
@ 2020-08-27 14:18 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-08-27 14:18 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://github.com/miquelraynal/linux-0day.git mtd/next
head:   9b3913fe065c506ade957fa83fb8f2c7ea33b9ff
commit: 9b3913fe065c506ade957fa83fb8f2c7ea33b9ff [8/8] mtd: mtdconcat: map through panic write handler
config: x86_64-randconfig-s022-20200827 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.2-191-g10164920-dirty
        git checkout 9b3913fe065c506ade957fa83fb8f2c7ea33b9ff
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

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

All warnings (new ones prefixed by >>):

   drivers/mtd/mtdconcat.c: In function 'concat_panic_write':
>> drivers/mtd/mtdconcat.c:129:4: warning: 'return' with no value, in function returning non-void [-Wreturn-type]
     129 |    return;
         |    ^~~~~~
   drivers/mtd/mtdconcat.c:106:1: note: declared here
     106 | concat_panic_write(struct mtd_info *mtd, loff_t to, size_t len,
         | ^~~~~~~~~~~~~~~~~~

# https://github.com/miquelraynal/linux-0day/commit/9b3913fe065c506ade957fa83fb8f2c7ea33b9ff
git remote add miquelraynal https://github.com/miquelraynal/linux-0day.git
git fetch --no-tags miquelraynal mtd/next
git checkout 9b3913fe065c506ade957fa83fb8f2c7ea33b9ff
vim +/return +129 drivers/mtd/mtdconcat.c

   104	
   105	static int
   106	concat_panic_write(struct mtd_info *mtd, loff_t to, size_t len,
   107		     size_t * retlen, const u_char * buf)
   108	{
   109		struct mtd_concat *concat = CONCAT(mtd);
   110		int err = -EINVAL;
   111		int i;
   112		for (i = 0; i < concat->num_subdev; i++) {
   113			struct mtd_info *subdev = concat->subdev[i];
   114			size_t size, retsize;
   115	
   116			if (to >= subdev->size) {
   117				size = 0;
   118				to -= subdev->size;
   119				continue;
   120			}
   121			if (to + len > subdev->size)
   122				size = subdev->size - to;
   123			else
   124				size = len;
   125	
   126			err = mtd_panic_write(subdev, to, size, &retsize, buf);
   127			if (err == -EOPNOTSUPP) {
   128				printk(KERN_ERR "mtdconcat: Cannot write from panic without panic_write\n");
 > 129				return;
   130			}
   131			if (err)
   132				break;
   133	
   134			*retlen += retsize;
   135			len -= size;
   136			if (len == 0)
   137				break;
   138	
   139			err = -EINVAL;
   140			buf += size;
   141			to = 0;
   142		}
   143		return err;
   144	}
   145	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

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

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

only message in thread, other threads:[~2020-08-27 14:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-27 14:18 [miquelraynal:mtd/next 8/8] drivers/mtd/mtdconcat.c:129:4: warning: 'return' with no value, in function returning non-void kernel 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.