Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp1936658lqo; Sun, 19 May 2024 05:55:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXlVBe+/roT2w/NcV8/Ujcr+RFEYlUj2HnShCxTrmWHdwMP4Oxe4XyklBBX9R2+qn8lxY2kJi9zdNOUsdbgkrN9s4PvFpLx+hd/JiGMnw== X-Google-Smtp-Source: AGHT+IHLk01FIorgYPnthu/IPEFaikBGL4FI/9q/dD3OAzWXocV4vjKjKT7Y/eH+0Ru5ZKFq//jw X-Received: by 2002:a17:90a:b291:b0:2b4:39dc:8caf with SMTP id 98e67ed59e1d1-2b6ccd76d90mr23650766a91.31.1716123334409; Sun, 19 May 2024 05:55:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716123334; cv=pass; d=google.com; s=arc-20160816; b=F9bG3T6Cf+NwULrcnAkTCvRLvTpKdsKCbe90q5kwexdOB8ZbY03ZhdRETGWy7j/DZ5 BzmUUivuV2Q+48SPVGhfXVNAUxBGRzovG/PjVpaBYMJGW/elVsDn6Y7dRrPFSBmk15U+ g+Z//cpsL7HVoZ7JwccP/6B+FOO2ZViRLdPlR9DHQPPGSJPAYoafZ9epMRsOcTZkcP7+ sPhOra0m1AqH7wgUoYVsWozHjrB849vUD6Lvss+Y3WOnJIi1VfjewvGAoyQFG+oIXm8o llsnCMrfplKzIxPbmIkO1eOmh0DTMjpVyCHezlvqbSLo80YjHMnYJNqd49OHUbpNIDjL +7sg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=IdukyeSVMol9uozX3qDqOVLoOKjojIJiN8ffYrHylXU=; fh=gMPvtXv4cahWjB0pyhiN7/Zg9afqqdCBcUQQyQGw1Y4=; b=x7GrPIXmGMJV6PpBNlngFLSmtmW6NMVkB92fy4Sid/ULsDI2WJDSI4g4QjIFSUWcUY 3g15JS4qOJl3DQiznOWcX7+PtCgQHP065lTm3pzpEIaPV4lK1PShas00M/sQv0Ciq+ae aotcPiYeIGvBmhzxqIaHkKtDp5KBrhHeLL9DkHyYnrCummRbrxibtYm7PUK1hZ1/Pdew pZZxNBvm1HY5MOj7ZcWu3Mu0BNDG9Bp62V0DBldBeZEbZACQ8G36JZNCpNIWQVkcZw6O xNMQkWpPQpiEm52U7ucFXGH8Rqnb6s4nufFfYpTtbRGDEXZBnZG4edBAFkO77qWFnEYk g9Lg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=BZzJlsLk; arc=pass (i=1 spf=pass spfdomain=wanadoo.fr dkim=pass dkdomain=wanadoo.fr dmarc=pass fromdomain=wanadoo.fr); spf=pass (google.com: domain of linux-kernel+bounces-183106-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183106-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=wanadoo.fr Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2b670f4cbe7si944632a91.43.2024.05.19.05.55.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 May 2024 05:55:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-183106-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=BZzJlsLk; arc=pass (i=1 spf=pass spfdomain=wanadoo.fr dkim=pass dkdomain=wanadoo.fr dmarc=pass fromdomain=wanadoo.fr); spf=pass (google.com: domain of linux-kernel+bounces-183106-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183106-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 9CD7628165D for ; Sun, 19 May 2024 12:55:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 627D2482DD; Sun, 19 May 2024 12:55:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="BZzJlsLk" Received: from smtp.smtpout.orange.fr (smtp-27.smtpout.orange.fr [80.12.242.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AD7D0DF58; Sun, 19 May 2024 12:55:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.12.242.27 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716123319; cv=none; b=Wk6968E/67FeovUCmeOUBgqCYTUE7uI1w8ndiMoJJAyxCPhs8O3m0hvc2+GKFZDM5H/+6/BBD6xcjgAd3tsPA1h6UkpVFReUI8lzTDLM/iic9spWfZZch/7sQByGNCB9FgCPN98AN9XSTlHKplwdITWFqYKmEKxp1R04YwaDR3U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716123319; c=relaxed/simple; bh=96ddWgy+DqQkkmfLAmqY9C/dPMMuWMqOSDKoVWxeAKs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=DeTQMdZiZIw5wOjloaXukgCuuPx9fMEz8cvfBFtIlTi4dx4E39jUiYmFC3K9PZnxyNyTgN93TQ2Qi0njXnVvLKSDUN76YPEqxIunV4BOb4qLEsZPtD72LdlOXgrDKbX4qqFiehPz0XMACn5dQBr0gQarijaJCRKDXVHcMgBkMeM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr; spf=pass smtp.mailfrom=wanadoo.fr; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b=BZzJlsLk; arc=none smtp.client-ip=80.12.242.27 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wanadoo.fr Received: from [192.168.1.37] ([86.243.17.157]) by smtp.orange.fr with ESMTPA id 8fvNsas0Vml3s8fvOsAwyi; Sun, 19 May 2024 14:46:04 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1716122764; bh=IdukyeSVMol9uozX3qDqOVLoOKjojIJiN8ffYrHylXU=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=BZzJlsLkWkm524qgL4YZGWx+ntPz7Rzw0DUp9YfZpHYTMG1V/qZ1j/xA0rqb31b6D Ze1E4DqsikBm5Ill2qHE+XDEhXWC3ZFehpfiCphM3ASZMwpAAO/CIEfwIM+6x9P6Ky x6WsGkQgBOq1nHhw0PEBknAxA1z+uduyhETuzPgM3mtjxFIH+esfSPTlHY8a47SGMQ SbFz/W6Y7B139j0qJ0iTWL1RRCutlXtYtYAzuRhMi6FxijWkz0RdrpRJ5rWmCOJSgo 7QFtAkzsg4qdY6XoRzEF48NImLtbHFx5GWDL1P0HpI1Sm3lFTze6XFl5jLcuLSJln6 2MqonpmJnfoSw== X-ME-Helo: [192.168.1.37] X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 19 May 2024 14:46:04 +0200 X-ME-IP: 86.243.17.157 Message-ID: <64403766-cc22-4dbe-b4b3-af3ad32fb9ea@wanadoo.fr> Date: Sun, 19 May 2024 14:45:59 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2 net-next] libceph: Use sruct_size() in ceph_create_snap_context() To: kernel test robot , Ilya Dryomov , Xiubo Li , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: oe-kbuild-all@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, ceph-devel@vger.kernel.org References: <5b7c72bdb52703bbfa5511ed500aed4babde1308.1716109606.git.christophe.jaillet@wanadoo.fr> <202405191909.7qhhefnu-lkp@intel.com> Content-Language: en-MW From: Christophe JAILLET In-Reply-To: <202405191909.7qhhefnu-lkp@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Le 19/05/2024 à 13:34, kernel test robot a écrit : > 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: i386-allmodconfig (https://download.01.org/0day-ci/archive/20240519/202405191909.7qhhefnu-lkp@intel.com/config) > compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0 > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240519/202405191909.7qhhefnu-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 > | Closes: https://lore.kernel.org/oe-kbuild-all/202405191909.7qhhefnu-lkp@intel.com/ > > All errors (new ones prefixed by >>): > > net/ceph/snapshot.c: In function 'ceph_create_snap_context': >>> net/ceph/snapshot.c:32:25: error: implicit declaration of function 'sruct_size'; did you mean 'struct_size'? [-Werror=implicit-function-declaration] > 32 | snapc = kzalloc(sruct_size(snapc, snaps, snap_count), gfp_flags); > | ^~~~~~~~~~ > | struct_size >>> net/ceph/snapshot.c:32:43: error: 'snaps' undeclared (first use in this function); did you mean 'snapc'? > 32 | snapc = kzalloc(sruct_size(snapc, snaps, snap_count), gfp_flags); > | ^~~~~ > | snapc > net/ceph/snapshot.c:32:43: note: each undeclared identifier is reported only once for each function it appears in > cc1: some warnings being treated as errors > > > vim +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); Ouch! this was build-tested, but I must have made a mistake when editing the patch file to add the "net-next". Sorry about that. I'll resend when the net-next branch will re-open. CJ > 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 >