All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
	Ilya Dryomov <idryomov@gmail.com>, Xiubo Li <xiubli@redhat.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org,
	Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
	ceph-devel@vger.kernel.org
Subject: Re: [PATCH 1/2 net-next] libceph: Use sruct_size() in ceph_create_snap_context()
Date: Sun, 19 May 2024 19:55:48 +0800	[thread overview]
Message-ID: <202405191916.QmDasdJ5-lkp@intel.com> (raw)
In-Reply-To: <5b7c72bdb52703bbfa5511ed500aed4babde1308.1716109606.git.christophe.jaillet@wanadoo.fr>

Hi Christophe,

kernel test robot noticed the following build errors:

[auto build test ERROR on net-next/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Christophe-JAILLET/libceph-Use-__counted_by-in-struct-ceph_snap_context/20240519-172142
base:   net-next/main
patch link:    https://lore.kernel.org/r/5b7c72bdb52703bbfa5511ed500aed4babde1308.1716109606.git.christophe.jaillet%40wanadoo.fr
patch subject: [PATCH 1/2 net-next] libceph: Use sruct_size() in ceph_create_snap_context()
config: x86_64-rhel-8.3-rust (https://download.01.org/0day-ci/archive/20240519/202405191916.QmDasdJ5-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240519/202405191916.QmDasdJ5-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405191916.QmDasdJ5-lkp@intel.com/

All errors (new ones prefixed by >>):

>> net/ceph/snapshot.c:32:18: error: call to undeclared function 'sruct_size'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      32 |         snapc = kzalloc(sruct_size(snapc, snaps, snap_count), gfp_flags);
         |                         ^
>> net/ceph/snapshot.c:32:36: error: use of undeclared identifier 'snaps'; did you mean 'snapc'?
      32 |         snapc = kzalloc(sruct_size(snapc, snaps, snap_count), gfp_flags);
         |                                           ^~~~~
         |                                           snapc
   net/ceph/snapshot.c:30:28: note: 'snapc' declared here
      30 |         struct ceph_snap_context *snapc;
         |                                   ^
   2 errors generated.


vim +/sruct_size +32 net/ceph/snapshot.c

    11	
    12	/*
    13	 * Ceph snapshot contexts are reference counted objects, and the
    14	 * returned structure holds a single reference.  Acquire additional
    15	 * references with ceph_get_snap_context(), and release them with
    16	 * ceph_put_snap_context().  When the reference count reaches zero
    17	 * the entire structure is freed.
    18	 */
    19	
    20	/*
    21	 * Create a new ceph snapshot context large enough to hold the
    22	 * indicated number of snapshot ids (which can be 0).  Caller has
    23	 * to fill in snapc->seq and snapc->snaps[0..snap_count-1].
    24	 *
    25	 * Returns a null pointer if an error occurs.
    26	 */
    27	struct ceph_snap_context *ceph_create_snap_context(u32 snap_count,
    28							gfp_t gfp_flags)
    29	{
    30		struct ceph_snap_context *snapc;
    31	
  > 32		snapc = kzalloc(sruct_size(snapc, snaps, snap_count), gfp_flags);
    33		if (!snapc)
    34			return NULL;
    35	
    36		refcount_set(&snapc->nref, 1);
    37		snapc->num_snaps = snap_count;
    38	
    39		return snapc;
    40	}
    41	EXPORT_SYMBOL(ceph_create_snap_context);
    42	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

      parent reply	other threads:[~2024-05-19 11:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-19  9:09 [PATCH 1/2 net-next] libceph: Use sruct_size() in ceph_create_snap_context() Christophe JAILLET
2024-05-19  9:09 ` [PATCH 2/2 net-next] libceph: Use __counted_by() in struct ceph_snap_context Christophe JAILLET
2024-05-19 11:34 ` [PATCH 1/2 net-next] libceph: Use sruct_size() in ceph_create_snap_context() kernel test robot
2024-05-19 12:45   ` Christophe JAILLET
2024-05-19 11:55 ` kernel test robot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202405191916.QmDasdJ5-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=idryomov@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pabeni@redhat.com \
    --cc=xiubli@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.