Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp912142rdb; Wed, 6 Dec 2023 03:43:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IHzyUtr2pWviuHeBLbGo47e1ditUgdpxNg47Rhiorq5mC3jiTLNP125zaN+b6S+8IQVI0RV X-Received: by 2002:a05:6a00:1796:b0:6ce:5373:96c9 with SMTP id s22-20020a056a00179600b006ce537396c9mr549722pfg.40.1701862991720; Wed, 06 Dec 2023 03:43:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701862991; cv=none; d=google.com; s=arc-20160816; b=p4GvnBbyNgd2PAZ7ools7Zo9QXTFObImXITwHSd64lV+hCPVYKi9JhVnfT3H/ds5zy uOTr50gKKsgz3oantZ1j2PyeNteTfwLoflT/UquZgS4Cy92eo2rAbKAZGpfTcNQWBzbj ZhaW2bF2TD2a7yEzX3Xbly0w09Cpwev3Zsj7DdUQoVXSjmzJyx+T5MY7ZHxeQmRGE0oD v7GTzLEZWhnM04/ICEuj9fajA9JjdZf5+uGOPSp4PQqq3mxJflGBTr9YEiUNW6XQsELW gcVWzWKzUs2xmOU5qTkyFbj8mEBABFdBY2IY0vPswcc4DRwpXPR5ULBfk997A5rKNSXn uigQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=09OKwPVlb9bzEy4ZW9zlFqbD4eAl6gY5kOVk1NWV3Bo=; fh=/DP5IKEOPjqIOeQjLQmDuVn0YOQBN9R/KOZAgUNxT0k=; b=uT4u3Fz4LLaYRI17LYL3xlWiyv8DzTesOuaBsxPO5toFf77UDLWVX03J3NSHL/SZTx 6yz5vx89Xl4vBGvrkFuYfrBly2d2sjqJwzAqZo9gEMr3KFlF1gltDna4H//8Hr43Wr/Q S8TvrVBgvnEKzkt9rMh/HMLoXIPV+euk7SA5FTylJQuO7pGnczPhTZnhYBI2xM3iM8QA pbeV0l38Um/XQrt7vg4H9HaeK0NdDu5V7fGjM9icnlWKBXlnYdEE0TW8OgHPG2ZbfOKm FEEl08+xPKoljUo5OXU0WmhGyRS+5SmWbchMOm9BgyQMA+Z5OnhQg5pI23b7d6/jm0K5 quAg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id q2-20020a056a00150200b006cb5f680e22si6813251pfu.389.2023.12.06.03.43.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 03:43:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 2BB25802A81D; Wed, 6 Dec 2023 03:43:10 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377732AbjLFLmv convert rfc822-to-8bit (ORCPT + 99 others); Wed, 6 Dec 2023 06:42:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377700AbjLFLmu (ORCPT ); Wed, 6 Dec 2023 06:42:50 -0500 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0D268F for ; Wed, 6 Dec 2023 03:42:55 -0800 (PST) Received: from kwepemi500023.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Slb531M4hzShvp; Wed, 6 Dec 2023 19:38:31 +0800 (CST) Received: from dggpemm500006.china.huawei.com (7.185.36.236) by kwepemi500023.china.huawei.com (7.221.188.76) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 6 Dec 2023 19:42:52 +0800 Received: from dggpemm500006.china.huawei.com ([7.185.36.236]) by dggpemm500006.china.huawei.com ([7.185.36.236]) with mapi id 15.01.2507.035; Wed, 6 Dec 2023 19:42:52 +0800 From: "Gonglei (Arei)" To: "Michael S. Tsirkin" , kernel test robot CC: "oe-kbuild-all@lists.linux.dev" , "linux-kernel@vger.kernel.org" Subject: RE: drivers/crypto/virtio/virtio_crypto_common.h:116:13: warning: variable 'cpu' set but not used Thread-Topic: drivers/crypto/virtio/virtio_crypto_common.h:116:13: warning: variable 'cpu' set but not used Thread-Index: AQHaJiLRicCCC7Kd2kaW9jApNQwiILCXe7+AgASpWRA= Date: Wed, 6 Dec 2023 11:42:52 +0000 Message-ID: <3befffb631604bc4bf7fcb67970736df@huawei.com> References: <202312040315.kPrI1OCE-lkp@intel.com> <20231203152646-mutt-send-email-mst@kernel.org> In-Reply-To: <20231203152646-mutt-send-email-mst@kernel.org> Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.174.149.11] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 06 Dec 2023 03:43:10 -0800 (PST) > -----Original Message----- > From: Michael S. Tsirkin [mailto:mst@redhat.com] > Sent: Monday, December 4, 2023 4:27 AM > To: kernel test robot > Cc: Gonglei (Arei) ; oe-kbuild-all@lists.linux.dev; > linux-kernel@vger.kernel.org > Subject: Re: drivers/crypto/virtio/virtio_crypto_common.h:116:13: warning: > variable 'cpu' set but not used > > On Mon, Dec 04, 2023 at 03:55:43AM +0800, kernel test robot wrote: > > Hi Gonglei, > > > > FYI, the error/warning still remains. > > > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > master > > head: 33cc938e65a98f1d29d0a18403dbbee050dcad9a > > commit: dbaf0624ffa57ae6e7d87a823185ccd9a7852d3c crypto: add > virtio-crypto driver > > date: 7 years ago > > config: x86_64-randconfig-015-20231011 > > (https://download.01.org/0day-ci/archive/20231204/202312040315.kPrI1OC > > E-lkp@intel.com/config) > > compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 > > build): > > (https://download.01.org/0day-ci/archive/20231204/202312040315.kPrI1OC > > E-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/202312040315.kPrI1OCE-lkp@inte > > | l.com/ > > > > All warnings (new ones prefixed by >>): > > > > In file included from drivers/crypto/virtio/virtio_crypto_algs.c:28: > > drivers/crypto/virtio/virtio_crypto_common.h: In function > 'virtio_crypto_get_current_node': > > >> drivers/crypto/virtio/virtio_crypto_common.h:116:13: warning: > > >> variable 'cpu' set but not used [-Wunused-but-set-variable] > > 116 | int cpu, node; > > | ^~~ > > -- > > In file included from drivers/crypto/virtio/virtio_crypto_core.c:25: > > drivers/crypto/virtio/virtio_crypto_common.h: In function > 'virtio_crypto_get_current_node': > > >> drivers/crypto/virtio/virtio_crypto_common.h:116:13: warning: > > >> variable 'cpu' set but not used [-Wunused-but-set-variable] > > 116 | int cpu, node; > > | ^~~ The warning occurs when CONFIG_SMG is not set. Will fix it later. > > In file included from drivers/crypto/virtio/virtio_crypto_core.c:20: > > drivers/crypto/virtio/virtio_crypto_core.c: At top level: > > include/linux/module.h:132:13: warning: 'init_module' specifies less > restrictive attribute than its target 'virtio_crypto_driver_init': 'cold' > [-Wmissing-attributes] > > 132 | int init_module(void) __attribute__((alias(#initfn))); > > | ^~~~~~~~~~~ > > include/linux/device.h:1463:1: note: in expansion of macro 'module_init' > > 1463 | module_init(__driver##_init); \ > > | ^~~~~~~~~~~ > > include/linux/virtio.h:190:9: note: in expansion of macro 'module_driver' > > 190 | module_driver(__virtio_driver, register_virtio_driver, \ > > | ^~~~~~~~~~~~~ > > drivers/crypto/virtio/virtio_crypto_core.c:471:1: note: in expansion of > macro 'module_virtio_driver' > > 471 | module_virtio_driver(virtio_crypto_driver); > > | ^~~~~~~~~~~~~~~~~~~~ > > In file included from include/linux/virtio.h:8, > > from include/linux/virtio_config.h:6, > > from drivers/crypto/virtio/virtio_crypto_core.c:21: > > drivers/crypto/virtio/virtio_crypto_core.c:471:22: note: 'init_module' > target declared here > > 471 | module_virtio_driver(virtio_crypto_driver); > > | ^~~~~~~~~~~~~~~~~~~~ > > include/linux/device.h:1459:19: note: in definition of macro > 'module_driver' > > 1459 | static int __init __driver##_init(void) \ > > | ^~~~~~~~ > > drivers/crypto/virtio/virtio_crypto_core.c:471:1: note: in expansion of > macro 'module_virtio_driver' > > 471 | module_virtio_driver(virtio_crypto_driver); > > | ^~~~~~~~~~~~~~~~~~~~ > > include/linux/module.h:138:14: warning: 'cleanup_module' specifies less > restrictive attribute than its target 'virtio_crypto_driver_exit': 'cold' > [-Wmissing-attributes] > > 138 | void cleanup_module(void) > __attribute__((alias(#exitfn))); > > | ^~~~~~~~~~~~~~ > > include/linux/device.h:1468:1: note: in expansion of macro 'module_exit' > > 1468 | module_exit(__driver##_exit); > > | ^~~~~~~~~~~ > > include/linux/virtio.h:190:9: note: in expansion of macro 'module_driver' > > 190 | module_driver(__virtio_driver, register_virtio_driver, \ > > | ^~~~~~~~~~~~~ > > drivers/crypto/virtio/virtio_crypto_core.c:471:1: note: in expansion of > macro 'module_virtio_driver' > > 471 | module_virtio_driver(virtio_crypto_driver); > > | ^~~~~~~~~~~~~~~~~~~~ > > drivers/crypto/virtio/virtio_crypto_core.c:471:22: note: > 'cleanup_module' target declared here > > 471 | module_virtio_driver(virtio_crypto_driver); > > | ^~~~~~~~~~~~~~~~~~~~ > > include/linux/device.h:1464:20: note: in definition of macro > 'module_driver' > > 1464 | static void __exit __driver##_exit(void) \ > > | ^~~~~~~~ > > drivers/crypto/virtio/virtio_crypto_core.c:471:1: note: in expansion of > macro 'module_virtio_driver' > > 471 | module_virtio_driver(virtio_crypto_driver); > > | ^~~~~~~~~~~~~~~~~~~~ > > Actually those warnings were fixed by upstream commit a6e60d84989. > > > > vim +/cpu +116 drivers/crypto/virtio/virtio_crypto_common.h > > > > 113 > > 114 static inline int virtio_crypto_get_current_node(void) > > 115 { > > > 116 int cpu, node; > > 117 > > 118 cpu = get_cpu(); > > 119 node = topology_physical_package_id(cpu); > > 120 put_cpu(); > > 121 > > 122 return node; > > 123 } > > 124 > > > > -- > > 0-DAY CI Kernel Test Service > > https://github.com/intel/lkp-tests/wiki > > Seems easy to fix. Gonglei? > Regards, -Gonglei