Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2338249rdb; Sun, 3 Dec 2023 12:27:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IFeeVAOkhQg6+sJarP1xHE1+c0XtRumRzoprf7kl3M8fuBGDjO/97yzUXwESmYt6EaLzx2+ X-Received: by 2002:a17:902:ec89:b0:1cf:bd98:6357 with SMTP id x9-20020a170902ec8900b001cfbd986357mr1342798plg.34.1701635232596; Sun, 03 Dec 2023 12:27:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701635232; cv=none; d=google.com; s=arc-20160816; b=HV+0CV+jh6oxQ/dP/1JnIV6w9fGokwivxnm7ktOTPeC0FksqhvL0qYm/1v/NzlK6YY a6crZoD5Zw7S/MOSmvRwzaUPTtEXGpwFoQKVIZY4mchi4g7DILxEFN3lJ3vjDxeN8XMZ Ieu8B4pxbtCjb019wS9sDjKXE/UfrmkuqLol0Tf3Ji3jzpClQBlZgA0SyodRMlu3RS1O XIBy+Bvoy6wG7FUc7gecj8UbRZpF6LOJVJa//JGAPwNKXcIWh+vh9AZhUOW7/46jU/MJ WV2nw8lzibOX33B5PpkxXIXXjVOWLokms7UtAYayTKrtaMGF/FWyoMR9SXxhznIJiQ0w xsEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=pYTrpCRDHy3pVYrmuekoON7KTgLSFaRDili/ZX0QPtg=; fh=aNFEdlUD2Sw2uba5+q7IILs2Ix+a7LmTbC4K86qX4dQ=; b=n9McdY2oDxLHvWXlfhqZO/EQ5HxHckMvAE0OFHfuRC6pEgBRPB3RkYVtLm4FV9nNZg KO1AyQe5lRC+033fJqDW7aZ0DktV6LhYjPjAUys4cbcrflXDZ6amltERdJfakxMjNzEl BVei/E8UHny8ueijctYbdYcdF6jYqyaytq39GOrRo8UXTjVoYqmG++CZmLVLOVcbjvgR D90GXiDSkuc00ML+6J5K0ZjXiIXi0pDnHJioMaZp0zrw09GD/u7NbQNFshhl8R96fE9X m24xbZlmlkeaqUIoF4Q5rOcz/pAiNDGk51DPk10X9SSrzPStjI49tIzHisszAYpQa1j+ RNhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PXp7JWwF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id ba12-20020a170902720c00b001cfff65b7d7si6673452plb.256.2023.12.03.12.27.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Dec 2023 12:27:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PXp7JWwF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 8E3FB8092EE5; Sun, 3 Dec 2023 12:27:11 -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 S229826AbjLCU1B (ORCPT + 99 others); Sun, 3 Dec 2023 15:27:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229548AbjLCU1A (ORCPT ); Sun, 3 Dec 2023 15:27:00 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD978B8 for ; Sun, 3 Dec 2023 12:27:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701635225; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pYTrpCRDHy3pVYrmuekoON7KTgLSFaRDili/ZX0QPtg=; b=PXp7JWwFelrplehkPZ5O6j3mtYAB7pTDMkbGjthX2rk7g8Ah69Gc/k5rdGMFrpXFSbG7jB VeeQmV64/mkoHfWHe4DfonTOI7NGIWYuKYSd1JDWGo3LXK4Rf3PG/O3+E7k0B9QNc1/+Pj gEBVYNBvIl2nPh6OX6FUQdPp9a4iTRg= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-526-oTgG0_iMPhWJ8v5pdZTMRg-1; Sun, 03 Dec 2023 15:27:04 -0500 X-MC-Unique: oTgG0_iMPhWJ8v5pdZTMRg-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-40c0329d868so13740865e9.2 for ; Sun, 03 Dec 2023 12:27:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701635223; x=1702240023; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=pYTrpCRDHy3pVYrmuekoON7KTgLSFaRDili/ZX0QPtg=; b=BNFJE5oNp/kbmPBh8u5igZfrH4LiZYr7suIGbrEd0RZ4nT0KoEkJWkgPXRBKaBqs1a wTRJk204TwQyVY7VV60qWBnLb5ZxlDKcJr8fXp9zEJWaP78ejU5hWt0+wMsBcqtWKMcs vudCOwIDPrSruDRe1LALhAby9Jn2kKfXinmltKpR9XnAgf38VShfBML/atLBPea/U0vV HG451zrrFpozkIcA3efbhkGb8o6IVE93RntxKxI9csl46SvQezggoMnR5NTy7LiD71+b 4OUVMQ0heSnAP57XNNi7sJ6IMfNsRPzBA1d+IyMhG201ZI2FNKK8mKJmGtEXSY1JJd8x J+Vg== X-Gm-Message-State: AOJu0Yx1FJJqSGrNPaOFO9Mm9C0PmIklaUWd+PGLK37CXXfUZh+jUsC8 Qg01XAXyRt+b2LKQuCM5Ac4up44x5FZfkT6RHUIdlypUuCiqNmV5qCzxDQsTzvBuCTXTE/n/nA/ QOJI4VyuHgEVAh2I7bx393MCp X-Received: by 2002:a05:600c:2218:b0:40c:9a7:5253 with SMTP id z24-20020a05600c221800b0040c09a75253mr579770wml.127.1701635223362; Sun, 03 Dec 2023 12:27:03 -0800 (PST) X-Received: by 2002:a05:600c:2218:b0:40c:9a7:5253 with SMTP id z24-20020a05600c221800b0040c09a75253mr579767wml.127.1701635222966; Sun, 03 Dec 2023 12:27:02 -0800 (PST) Received: from redhat.com ([2.55.57.48]) by smtp.gmail.com with ESMTPSA id x10-20020a5d490a000000b003333c06fa79sm4270161wrq.71.2023.12.03.12.27.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Dec 2023 12:27:02 -0800 (PST) Date: Sun, 3 Dec 2023 15:26:59 -0500 From: "Michael S. Tsirkin" To: kernel test robot Cc: Gonglei , 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 Message-ID: <20231203152646-mutt-send-email-mst@kernel.org> References: <202312040315.kPrI1OCE-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202312040315.kPrI1OCE-lkp@intel.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, 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]); Sun, 03 Dec 2023 12:27:11 -0800 (PST) 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.kPrI1OCE-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.kPrI1OCE-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@intel.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; > | ^~~ > 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); > | ^~~~~~~~~~~~~~~~~~~~ > > > 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? -- MST