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 2BA67C83F2B for ; Thu, 31 Aug 2023 03:56:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239936AbjHaD4F (ORCPT ); Wed, 30 Aug 2023 23:56:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241724AbjHaD4E (ORCPT ); Wed, 30 Aug 2023 23:56:04 -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 3EAAFCF4; Wed, 30 Aug 2023 20:55:56 -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 1qbYmd-009Wqh-8x; Thu, 31 Aug 2023 11:55:52 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Thu, 31 Aug 2023 11:55:52 +0800 Date: Thu, 31 Aug 2023 11:55:52 +0800 From: Herbert Xu To: Andy Shevchenko Cc: Lucas Segarra Fernandez , linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, qat-linux@intel.com, alx@kernel.org, Giovanni Cabiddu Subject: Re: [PATCH v2 1/2] crypto: qat - refactor included headers Message-ID: References: <20230818102322.142582-1-lucas.segarra.fernandez@intel.com> <20230818102322.142582-2-lucas.segarra.fernandez@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Tue, Aug 29, 2023 at 05:08:37PM +0300, Andy Shevchenko wrote: > > Do I understand correctly that you want *ideally* to have THE kernel.h > as a _single_ header and that's it? My rule of thumb for a .c file is that if you need more than two headers directly included by kernel.h then you should just use kernel.h. > While I understand your motivation as a maintainer, I hate the idea of current > kernel.h to be included as a silver bullet to every file because people are not > capable to understand this C language part of design. The usage of the proper > headers show that developer _thought_ very well about what they are doing in > the driver. Neglecting this affects the quality of the code in my opinion. > That's why I strongly recommend to avoid kernel.h inclusion unless it's indeed > the one that provides something that is used in the driver. Even though, the > rest headers also need to be included (as it wasn't done by kernel.h at any > circumstances). I have no qualms with fixing header files that include kernel.h to include whatever it is that they need directly. That is a worthy goal and should be enforced for all new header files. I just don't share your enthusiasm about doing the same for .c files. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt