From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 61A9DC77B7A for ; Wed, 24 May 2023 10:18:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231461AbjEXKSs (ORCPT ); Wed, 24 May 2023 06:18:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230404AbjEXKSM (ORCPT ); Wed, 24 May 2023 06:18:12 -0400 Received: from 167-179-156-38.a7b39c.syd.nbn.aussiebb.net (167-179-156-38.a7b39c.syd.nbn.aussiebb.net [167.179.156.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B5C010DB; Wed, 24 May 2023 03:17:26 -0700 (PDT) Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1q1lXr-00Cl6E-Rk; Wed, 24 May 2023 18:16:40 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Wed, 24 May 2023 18:16:39 +0800 Date: Wed, 24 May 2023 18:16:39 +0800 From: Herbert Xu To: Randy Dunlap Cc: linux-kernel@vger.kernel.org, Breno =?iso-8859-1?Q?Leit=E3o?= , Nayna Jain , Paulo Flabiano Smorigo , "David S. Miller" , linux-crypto@vger.kernel.org, Michael Ellerman , Nicholas Piggin , Christophe Leroy , linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH] powerpc/crypto: fix build warnings when DEBUG_FS is not enabled Message-ID: References: <20230519223334.11992-1-rdunlap@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230519223334.11992-1-rdunlap@infradead.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 19, 2023 at 03:33:34PM -0700, Randy Dunlap wrote: > Fix build warnings when DEBUG_FS is not enabled by using an empty > do-while loop instead of a value: > > In file included from ../drivers/crypto/nx/nx.c:27: > ../drivers/crypto/nx/nx.c: In function 'nx_register_algs': > ../drivers/crypto/nx/nx.h:173:33: warning: statement with no effect [-Wunused-value] > 173 | #define NX_DEBUGFS_INIT(drv) (0) > ../drivers/crypto/nx/nx.c:573:9: note: in expansion of macro 'NX_DEBUGFS_INIT' > 573 | NX_DEBUGFS_INIT(&nx_driver); > ../drivers/crypto/nx/nx.c: In function 'nx_remove': > ../drivers/crypto/nx/nx.h:174:33: warning: statement with no effect [-Wunused-value] > 174 | #define NX_DEBUGFS_FINI(drv) (0) > ../drivers/crypto/nx/nx.c:793:17: note: in expansion of macro 'NX_DEBUGFS_FINI' > 793 | NX_DEBUGFS_FINI(&nx_driver); > > Also, there is no need to build nx_debugfs.o when DEBUG_FS is not > enabled, so change the Makefile to accommodate that. > > Fixes: ae0222b7289d ("powerpc/crypto: nx driver code supporting nx encryption") > Fixes: aef7b31c8833 ("powerpc/crypto: Build files for the nx device driver") > Signed-off-by: Randy Dunlap > Cc: Breno Leitão > Cc: Nayna Jain > Cc: Paulo Flabiano Smorigo > Cc: Herbert Xu > Cc: "David S. Miller" > Cc: linux-crypto@vger.kernel.org > Cc: Michael Ellerman > Cc: Nicholas Piggin > Cc: Christophe Leroy > Cc: linuxppc-dev@lists.ozlabs.org > --- > drivers/crypto/nx/Makefile | 2 +- > drivers/crypto/nx/nx.h | 4 ++-- > 2 files changed, 3 insertions(+), 3 deletions(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt