ceph-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [ceph-client:testing 2/3] net/ceph/mon_client.c:928:2: warning: function 'do_mon_command_vargs' might be a candidate for 'gnu_printf' format attribute
@ 2020-09-16 21:11 kernel test robot
  2020-09-17  9:16 ` Ilya Dryomov
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2020-09-16 21:11 UTC (permalink / raw)
  To: Ilya Dryomov; +Cc: kbuild-all, ceph-devel

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

tree:   https://github.com/ceph/ceph-client.git testing
head:   a274f50dee76e2182580cafeb908d95bda2cac70
commit: c3e9a9f0a4b9178a5c4068b73d6579e8346cd3f3 [2/3] libceph: switch to the new "osd blocklist add" command
config: arm-randconfig-r012-20200916 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout c3e9a9f0a4b9178a5c4068b73d6579e8346cd3f3
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm 

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 >>):

   net/ceph/mon_client.c: In function 'do_mon_command_vargs':
>> net/ceph/mon_client.c:928:2: warning: function 'do_mon_command_vargs' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
     928 |  len = vsprintf(h->str, fmt, ap);
         |  ^~~

# https://github.com/ceph/ceph-client/commit/c3e9a9f0a4b9178a5c4068b73d6579e8346cd3f3
git remote add ceph-client https://github.com/ceph/ceph-client.git
git fetch --no-tags ceph-client testing
git checkout c3e9a9f0a4b9178a5c4068b73d6579e8346cd3f3
vim +928 net/ceph/mon_client.c

   898	
   899	static int do_mon_command_vargs(struct ceph_mon_client *monc,
   900					const char *fmt, va_list ap)
   901	{
   902		struct ceph_mon_generic_request *req;
   903		struct ceph_mon_command *h;
   904		int ret = -ENOMEM;
   905		int len;
   906	
   907		req = alloc_generic_request(monc, GFP_NOIO);
   908		if (!req)
   909			goto out;
   910	
   911		req->request = ceph_msg_new(CEPH_MSG_MON_COMMAND, 256, GFP_NOIO, true);
   912		if (!req->request)
   913			goto out;
   914	
   915		req->reply = ceph_msg_new(CEPH_MSG_MON_COMMAND_ACK, 512, GFP_NOIO,
   916					  true);
   917		if (!req->reply)
   918			goto out;
   919	
   920		mutex_lock(&monc->mutex);
   921		register_generic_request(req);
   922		h = req->request->front.iov_base;
   923		h->monhdr.have_version = 0;
   924		h->monhdr.session_mon = cpu_to_le16(-1);
   925		h->monhdr.session_mon_tid = 0;
   926		h->fsid = monc->monmap->fsid;
   927		h->num_strs = cpu_to_le32(1);
 > 928		len = vsprintf(h->str, fmt, ap);
   929		h->str_len = cpu_to_le32(len);
   930		send_generic_request(monc, req);
   931		mutex_unlock(&monc->mutex);
   932	
   933		ret = wait_generic_request(req);
   934	out:
   935		put_generic_request(req);
   936		return ret;
   937	}
   938	

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

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ceph-client:testing 2/3] net/ceph/mon_client.c:928:2: warning: function 'do_mon_command_vargs' might be a candidate for 'gnu_printf' format attribute
  2020-09-16 21:11 [ceph-client:testing 2/3] net/ceph/mon_client.c:928:2: warning: function 'do_mon_command_vargs' might be a candidate for 'gnu_printf' format attribute kernel test robot
@ 2020-09-17  9:16 ` Ilya Dryomov
  0 siblings, 0 replies; 2+ messages in thread
From: Ilya Dryomov @ 2020-09-17  9:16 UTC (permalink / raw)
  To: kernel test robot; +Cc: kbuild-all, Ceph Development

On Wed, Sep 16, 2020 at 11:11 PM kernel test robot <lkp@intel.com> wrote:
>
> tree:   https://github.com/ceph/ceph-client.git testing
> head:   a274f50dee76e2182580cafeb908d95bda2cac70
> commit: c3e9a9f0a4b9178a5c4068b73d6579e8346cd3f3 [2/3] libceph: switch to the new "osd blocklist add" command
> config: arm-randconfig-r012-20200916 (attached as .config)
> compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
> reproduce (this is a W=1 build):
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         git checkout c3e9a9f0a4b9178a5c4068b73d6579e8346cd3f3
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
>
> 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 >>):
>
>    net/ceph/mon_client.c: In function 'do_mon_command_vargs':
> >> net/ceph/mon_client.c:928:2: warning: function 'do_mon_command_vargs' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
>      928 |  len = vsprintf(h->str, fmt, ap);
>          |  ^~~
>
> # https://github.com/ceph/ceph-client/commit/c3e9a9f0a4b9178a5c4068b73d6579e8346cd3f3
> git remote add ceph-client https://github.com/ceph/ceph-client.git
> git fetch --no-tags ceph-client testing
> git checkout c3e9a9f0a4b9178a5c4068b73d6579e8346cd3f3
> vim +928 net/ceph/mon_client.c
>
>    898
>    899  static int do_mon_command_vargs(struct ceph_mon_client *monc,
>    900                                  const char *fmt, va_list ap)
>    901  {
>    902          struct ceph_mon_generic_request *req;
>    903          struct ceph_mon_command *h;
>    904          int ret = -ENOMEM;
>    905          int len;
>    906
>    907          req = alloc_generic_request(monc, GFP_NOIO);
>    908          if (!req)
>    909                  goto out;
>    910
>    911          req->request = ceph_msg_new(CEPH_MSG_MON_COMMAND, 256, GFP_NOIO, true);
>    912          if (!req->request)
>    913                  goto out;
>    914
>    915          req->reply = ceph_msg_new(CEPH_MSG_MON_COMMAND_ACK, 512, GFP_NOIO,
>    916                                    true);
>    917          if (!req->reply)
>    918                  goto out;
>    919
>    920          mutex_lock(&monc->mutex);
>    921          register_generic_request(req);
>    922          h = req->request->front.iov_base;
>    923          h->monhdr.have_version = 0;
>    924          h->monhdr.session_mon = cpu_to_le16(-1);
>    925          h->monhdr.session_mon_tid = 0;
>    926          h->fsid = monc->monmap->fsid;
>    927          h->num_strs = cpu_to_le32(1);
>  > 928          len = vsprintf(h->str, fmt, ap);
>    929          h->str_len = cpu_to_le32(len);
>    930          send_generic_request(monc, req);
>    931          mutex_unlock(&monc->mutex);
>    932
>    933          ret = wait_generic_request(req);
>    934  out:
>    935          put_generic_request(req);
>    936          return ret;
>    937  }
>    938
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Yup, missed that.  Now fixed.

Thanks,

                Ilya

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-17  9:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-16 21:11 [ceph-client:testing 2/3] net/ceph/mon_client.c:928:2: warning: function 'do_mon_command_vargs' might be a candidate for 'gnu_printf' format attribute kernel test robot
2020-09-17  9:16 ` Ilya Dryomov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).