Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp3798992rwb; Mon, 5 Sep 2022 19:31:46 -0700 (PDT) X-Google-Smtp-Source: AA6agR6ZQ9sy0RRZnfWsunuisTeSu69+lBarZvGHnOdd0lPhhaPBDM+FFUi46DVC1TOjk7HsFk2G X-Received: by 2002:a05:6402:d05:b0:425:b5c8:faeb with SMTP id eb5-20020a0564020d0500b00425b5c8faebmr44586266edb.273.1662431506253; Mon, 05 Sep 2022 19:31:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1662431506; cv=pass; d=google.com; s=arc-20160816; b=YHQ+JJGNLTK+8OdMMCCVfQtkyyekYnFYQybAY1n+EYxPDf1tkjUlsIcrHXGIHeBonJ zoKxbJ2GyS5ulqoFv0DyDAbnYMJsPZH+GRd/xMJwlWuAtlZxW8EhLhpLfhhlLDCpzQ4A LM8es5SbRHIde4PRmo8wg6MFwW6CpS/gYFv60UqqSkh8A6w7uIrBPQ2DI8KTpBohYoAM x3D6mt50wSNP1sTS5jv9j6DdHCk2YBp+O+SJ4AKQzFimVtEN6q95Z8Yj1yhlOU5LzPal gaCQpI4xjrdZvQIbE1W6y1+ecFZkU+ViIyYMrXfK/kKAr0OYw84bcZ/HTK/AlbWylNEY sHDQ== ARC-Message-Signature: i=2; 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:dkim-signature; bh=FrS9hoqoMdUTFOq2CIuBksDIPMod1IOZHqz7DavmP90=; b=wSTUEqnlpXEYZVgnhsVUn3ybodiAfaxvdKg5A3rGksHihxvms1Va25lGkXCl7wTGmE EYi0zJ1rG22lDbGQrBuM9tOU3cTOL2K0KYW5wbqcLREpO40RbL8dSa5AR4aAP/biUKAA Pl7s170OKBrmoOLwKxKASFySG/nxLssLdaUb68bjKcM1+zDoi4PGSrEZRV+5BcTutgBe z4j/oXbsSe3rdVDXM/VXnRDhosgMtM/acu3mFgY5PUimy5s8uaSGkG0KY4PnsI/NsoQW eToQvdFUJH9vg89pnplHIH2pIQ+5K8EwF4NViyt7Sb9hU03HExU7dS1b1hXHtH+fMWBt AA3A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@aspeedtech.com header.s=selector1 header.b=qNYbjFk5; arc=pass (i=1 spf=pass spfdomain=aspeedtech.com dkim=pass dkdomain=aspeedtech.com dmarc=pass fromdomain=aspeedtech.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q24-20020aa7d458000000b0044791991d0fsi7463903edr.439.2022.09.05.19.31.21; Mon, 05 Sep 2022 19:31:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@aspeedtech.com header.s=selector1 header.b=qNYbjFk5; arc=pass (i=1 spf=pass spfdomain=aspeedtech.com dkim=pass dkdomain=aspeedtech.com dmarc=pass fromdomain=aspeedtech.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233073AbiIFCVb (ORCPT + 99 others); Mon, 5 Sep 2022 22:21:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230241AbiIFCV3 (ORCPT ); Mon, 5 Sep 2022 22:21:29 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2134.outbound.protection.outlook.com [40.107.117.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C0C121828; Mon, 5 Sep 2022 19:21:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FjDADAY+OblWW0yex//6D8jmCkeaIubk8/PDyQ+f0IH1Sdpe10n32dtQsAyRAPuljuWcYk/BEoWpfO8RnNk9pGBANf0yZOTJq9eMmgder1/484Fq4kWv+wEhiH+ONOylUTb4P59vBsXr04oSi76EQHga01fxqbnGO5RPQCUXF7OfeEzWQX28fculn1K32eVpAOaeNruKIM0CXq2vMatx70mt0YpsLiinwingV8P1yU89P0IrAZaHWh2Nlmpj0AgaLLPTLGbOnw6z5QkZGW5tFjEcgCgnKK9cNIXqd5TNyFd+MUrJPlIA7G9xChWQzZg9AEQnN6Ehib5WOhD5Mo/fWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=FrS9hoqoMdUTFOq2CIuBksDIPMod1IOZHqz7DavmP90=; b=j18/4zElD3a4WDhUO7jx1SsHIW5QAmTAap+2KhEWhrw5g/xf07tRK+wBH8+fqokPmVyPJtKVs7rn/YnFKmx8EUinTeElPSMRzDBzqf5Aw5PjS5PoEeAfQIyJrvSSudo7wmAcF5+rqo9/I9dyZzZS1CbCa5F8lm4YZX5gTEA3YUXUI/RnD9u+Q/jp2NMncLJ+zJORa6TTHtNir1To9P53XjzlqSIX3GDgICh6NDvuVp0ki4odvmWK9Gd/jpMkm5ieM4NRqkyQp17UssaGQGqnlUc5Ie3xpeHC+I6yGAq1C5AC7+IAsor2x4mjrsFKFC/mFdTpqdB5/ljMzJLX9itETA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=aspeedtech.com; dmarc=pass action=none header.from=aspeedtech.com; dkim=pass header.d=aspeedtech.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aspeedtech.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FrS9hoqoMdUTFOq2CIuBksDIPMod1IOZHqz7DavmP90=; b=qNYbjFk5+4jvHfbLa8nbRDNKh96eSg3wK8EjHLOXky6DJBSHQfrFgiUKsl5CxqpEvkYMijMbraq2UpJdkzOXA5SSICn+OGen41aWCkkH4hdNAv0ycr6W1EUM4cfNr73Rjrllt27PZHS9LqrUz/87FQLmnNyBAUKn9KeIA6Qm5rYwFERp0CDYnMmaU2F978SqaXkw2jkEqFetR1C6ckxBtrUPMdCpjfhlsFNLPU3wBUHBzcfovEYxEk/lsCSWgqjCpfSaUvowTn+hx6X8PUZovNNLeSMFj/oYuCF/M0ZlapA7/u9H4Rcl7wMjG/WeEG4lwIAAVb/0qWDNj/HKvXZN2A== Received: from HK0PR06MB3202.apcprd06.prod.outlook.com (2603:1096:203:87::17) by TYZPR06MB4142.apcprd06.prod.outlook.com (2603:1096:400:2c::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.10; Tue, 6 Sep 2022 02:21:21 +0000 Received: from HK0PR06MB3202.apcprd06.prod.outlook.com ([fe80::7c44:6fe1:af1:7b42]) by HK0PR06MB3202.apcprd06.prod.outlook.com ([fe80::7c44:6fe1:af1:7b42%5]) with mapi id 15.20.5588.016; Tue, 6 Sep 2022 02:21:21 +0000 From: Neal Liu To: Herbert Xu CC: "David S . Miller" , Joel Stanley , Andrew Jeffery , "linux-aspeed@lists.ozlabs.org" , "linux-crypto@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , BMC-SW , kernel test robot , Sudip Mukherjee Subject: RE: [PATCH v2] crypto: aspeed: fix build module error Thread-Topic: [PATCH v2] crypto: aspeed: fix build module error Thread-Index: AQHYwNLZ1RAhZZLKJEu2oAdtSs6t4K3QrOGAgAD9dgA= Date: Tue, 6 Sep 2022 02:21:20 +0000 Message-ID: References: <20220905025433.1610696-1-neal_liu@aspeedtech.com> In-Reply-To: Accept-Language: en-US Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=aspeedtech.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 185605d1-19a3-4af8-1aef-08da8fae7ced x-ms-traffictypediagnostic: TYZPR06MB4142:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 5jBnepLeeC5CuA3Fy0gB/ogpwNOAtg0N1jgSHmHKauRtY6PJ36v0ygZCHyPkl1V0T67Pf0Fqy7kNg9J6HaG4nvLHo29foMRF5VkTW1WezAyObjVIvayDDvEKTbNfVX1Y7x7oB2WPnIQoAZZkUUBpJXVwqI4OqTGgT5HjhyF3UeMoV6NxvCryfskzExF41livhhjvhIGQCEUcktJQO1lmZ0oEskJcOIIQUPO9WlJYPvWoQvruMDTqAkmHPj4lHttlSN3jD3eoF8DjYftuaQJpECBWEbxH+r3VjurcSm/G8eY0Q8t6LwdwqRgzQwW6Iub5MIs7OobF/clfRXLUZzqfH30ZRdJvQLiYjPbCG/b1oHMiYHEmKwReJXDbpF/xl9ZiGl3j5qpaClYer2Txn3rLJQs+lKljXlNcsyr/v34OvZ0cAoy04UegrEWdflRyJC2ZdmV85R3wkbQHWpIax628dTCfMPL/JMZ+I5ZwL12OwH7jMTKQ9bOQT76UPgEkB//eQqRoqp5k1qeLRTVAUoWbVJEmDnBULQHTwgZRm270ER3gLKwUH0KSGUhu+tjPEGJtcRMuaCnq/99McvKkZEgd1fH5uHbOM+i9ozk/nitkD6TOUrcerbVv04BK50qONmVYmzLHN6dm2Txb9cMn6BHaUiMXLv/KylmfgF4gcKiPyySok8qJWihS/OWqmzIML7j4pvfVkSNmF+RXq15iQ+sMeCBTlWWus2d0siYQIJoGGcm80XIwvZQ/uUUviQCnznuNcZnqu4aZJNTTGR2ISMflIuVinhjPGFa6pNBsKr5xwYU= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:HK0PR06MB3202.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(346002)(376002)(366004)(136003)(39840400004)(396003)(71200400001)(6916009)(86362001)(53546011)(122000001)(55016003)(38100700002)(54906003)(316002)(966005)(76116006)(4326008)(66946007)(66556008)(66476007)(66446008)(8676002)(478600001)(64756008)(38070700005)(33656002)(83380400001)(2906002)(6506007)(186003)(5660300002)(41300700001)(52536014)(7696005)(8936002)(9686003)(7416002)(26005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?/TTPjkqLar9UUFuM9Vlwmxvhd82mSfDtasKV5/iPnDeKGYAqNDvcX38dXkm9?= =?us-ascii?Q?UFM5yChfvIZzDEd4ojGQQCNCfDDEjGZHCYmDymFDtih/J7WriRYz4QJXmrLR?= =?us-ascii?Q?YCtdSX7StAlRDQ+YIHCrjvS7i9YFezzy1rRvIX8L7L3r93UPq5gTmm43eWzR?= =?us-ascii?Q?n/aT+zBe9oHSvBrtjcFyZ8prc8w+B5XUxKYfuWeSgUwmUPTnRlrQ/rpwzD8a?= =?us-ascii?Q?kgd28PLmhh+r7plQnbqgxfbPwWagCdG46v7tlw1+A+wCyYENrzq3KB8/1dIX?= =?us-ascii?Q?z381g4oC1JmK/JQ1U3gz/V6acTtefYzJr6M3vNdy0sv8NPWlEEzFjWzC4yZa?= =?us-ascii?Q?RQ8Av8CpfYHUCUfbj2/uw+T7JmTkg3bluwfO8AIFFeeVYACdBdQ0F3CwBO5i?= =?us-ascii?Q?+791QriyxuwFxiv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-ascii?Q?aWgFyB8s1PBW0B829EkEG39kvgUYpAqfa5PRJ4XDKXYE3c2any69ya59FcUE?= =?us-ascii?Q?2vsfxmmQijQQrwyMThwK2tAEVO4qS9FltM6XNFX9HGou2qnif6hmm+k7dwVJ?= =?us-ascii?Q?ny8OKWMDNFBBKY6vEK8GouzZSQNIgHlnq8UsjC/GRpFwDSwPpWS0pdF1trft?= =?us-ascii?Q?JdCbW5aPPLqUOYU4+/RlaGp65kqS50rXjdEXPCOn2+1TQvlkGqgM86nBu6PY?= =?us-ascii?Q?V5T+4KP1SdilPnzD18w2uhffuFlKL1zL0QcS+BGy?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: aspeedtech.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: HK0PR06MB3202.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 185605d1-19a3-4af8-1aef-08da8fae7ced X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Sep 2022 02:21:20.9185 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43d4aa98-e35b-4575-8939-080e90d5a249 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: yHuNx1eRkeLuemTSohbdStpaZO/sW3BKMrgju87q2cTCBfYUatiqHvGb8Ru2sDsp4NU3JnY5a8lLU79JwG3YPQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB4142 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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 > -----Original Message----- > From: Herbert Xu > Sent: Monday, September 5, 2022 7:04 PM > To: Neal Liu > Cc: David S . Miller ; Joel Stanley = ; > Andrew Jeffery ; linux-aspeed@lists.ozlabs.org; > linux-crypto@vger.kernel.org; linux-arm-kernel@lists.infradead.org; > linux-kernel@vger.kernel.org; BMC-SW ; kernel > test robot ; Sudip Mukherjee > > Subject: Re: [PATCH v2] crypto: aspeed: fix build module error >=20 > On Mon, Sep 05, 2022 at 10:54:33AM +0800, Neal Liu wrote: > > > > diff --git a/drivers/crypto/aspeed/Makefile > > b/drivers/crypto/aspeed/Makefile index 421e2ca9c53e..3be78cec0ecb > > 100644 > > --- a/drivers/crypto/aspeed/Makefile > > +++ b/drivers/crypto/aspeed/Makefile > > @@ -1,9 +1,6 @@ > > +hace-hash-$(CONFIG_CRYPTO_DEV_ASPEED_HACE_HASH) :=3D aspeed-hace.o > > +aspeed-hace-hash.o > > +hace-crypto-$(CONFIG_CRYPTO_DEV_ASPEED_HACE_CRYPTO) :=3D > aspeed-hace.o > > +aspeed-hace-crypto.o > > + > > obj-$(CONFIG_CRYPTO_DEV_ASPEED) +=3D aspeed_crypto.o > > -aspeed_crypto-objs :=3D aspeed-hace.o \ > > - $(hace-hash-y) \ > > +aspeed_crypto-objs :=3D $(hace-hash-y) \ > > $(hace-crypto-y) >=20 > Does this still build if both HASH and CRYPTO are off? >=20 > I think this it's best if you do: >=20 > hace-hash-$(CONFIG_CRYPTO_DEV_ASPEED_HACE_HASH) :=3D > aspeed-hace-hash.o > hace-crypto-$(CONFIG_CRYPTO_DEV_ASPEED_HACE_CRYPTO) :=3D > aspeed-hace-crypto.o >=20 > obj-$(CONFIG_CRYPTO_DEV_ASPEED) +=3D aspeed_crypto.o > aspeed_crypto-objs :=3D aspeed-hace.o \ > $(hace-hash-y) \ > $(hace-crypto-y) >=20 aspeed-hace.o effects only if either hace-hash-y or hace-crypto-y. If we put aspeed-hace.o in aspeed_crypto-objs, but hace-hash-y and hace-cry= pto-y are empty, apseed-hace.o is just an useless driver which might still = occupy system resources. For this patch, you're right it would still build if both HASH & CRYPTO are= off. But no driver would be run up. That's why I revise it from your suggestion to this patch. Thanks. > Thanks, > -- > Email: Herbert Xu Home Page: > http://gondor.apana.org.au/~herbert/ > PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt