Re: [ceph-client:testing 10/10] include/linux/ceph/pagelist.h:76:11: error: 'ERANGE' undeclared

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 25, 2018 at 6:52 PM kbuild test robot <lkp@xxxxxxxxx> wrote:
>
> tree:   https://github.com/ceph/ceph-client.git testing
> head:   e44e41fbcdc053bb569518e84dd0ddb85ecca912
> commit: e44e41fbcdc053bb569518e84dd0ddb85ecca912 [10/10] libceph: check string length in ceph_pagelist_encode_string() for safety
> config: xtensa-allyesconfig (attached as .config)
> compiler: xtensa-linux-gcc (GCC) 8.1.0
> reproduce:
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         git checkout e44e41fbcdc053bb569518e84dd0ddb85ecca912
>         # save the attached .config to linux build tree
>         GCC_VERSION=8.1.0 make.cross ARCH=xtensa
>
> All errors (new ones prefixed by >>):
>
>    In file included from fs/ceph/xattr.c:3:
>    include/linux/ceph/pagelist.h: In function 'ceph_pagelist_encode_string':
> >> include/linux/ceph/pagelist.h:76:11: error: 'ERANGE' undeclared (first use in this function)
>       return -ERANGE;
>               ^~~~~~
>    include/linux/ceph/pagelist.h:76:11: note: each undeclared identifier is reported only once for each function it appears in
>
> vim +/ERANGE +76 include/linux/ceph/pagelist.h
>
>     44
>     45  extern void ceph_pagelist_set_cursor(struct ceph_pagelist *pl,
>     46                                       struct ceph_pagelist_cursor *c);
>     47
>     48  extern int ceph_pagelist_truncate(struct ceph_pagelist *pl,
>     49                                    struct ceph_pagelist_cursor *c);
>     50
>     51  static inline int ceph_pagelist_encode_64(struct ceph_pagelist *pl, u64 v)
>     52  {
>     53          __le64 ev = cpu_to_le64(v);
>     54          return ceph_pagelist_append(pl, &ev, sizeof(ev));
>     55  }
>     56  static inline int ceph_pagelist_encode_32(struct ceph_pagelist *pl, u32 v)
>     57  {
>     58          __le32 ev = cpu_to_le32(v);
>     59          return ceph_pagelist_append(pl, &ev, sizeof(ev));
>     60  }
>     61  static inline int ceph_pagelist_encode_16(struct ceph_pagelist *pl, u16 v)
>     62  {
>     63          __le16 ev = cpu_to_le16(v);
>     64          return ceph_pagelist_append(pl, &ev, sizeof(ev));
>     65  }
>     66  static inline int ceph_pagelist_encode_8(struct ceph_pagelist *pl, u8 v)
>     67  {
>     68          return ceph_pagelist_append(pl, &v, 1);
>     69  }
>     70  static inline int ceph_pagelist_encode_string(struct ceph_pagelist *pl,
>     71                                                char *s, size_t len)
>     72  {
>     73          int ret;
>     74
>     75          if (len > U32_MAX)
>   > 76                  return -ERANGE;
>     77          ret = ceph_pagelist_encode_32(pl, len);
>     78          if (ret)
>     79                  return ret;
>     80          if (len)
>     81                  return ceph_pagelist_append(pl, s, len);
>     82          return 0;
>     83  }
>     84

Now fixed.

Thanks,

                Ilya
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux