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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A4132C433F5 for ; Fri, 19 Nov 2021 16:35:50 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4497361B1E for ; Fri, 19 Nov 2021 16:35:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4497361B1E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id E7AB6409E2; Fri, 19 Nov 2021 16:35:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MJ7UggaQua2t; Fri, 19 Nov 2021 16:35:49 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp4.osuosl.org (Postfix) with ESMTPS id 78F50409D8; Fri, 19 Nov 2021 16:35:48 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 5BDEDC001E; Fri, 19 Nov 2021 16:35:48 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id C06C9C0012 for ; Fri, 19 Nov 2021 16:35:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id BA0C040554 for ; Fri, 19 Nov 2021 16:35:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BFeJV2lrvRNI for ; Fri, 19 Nov 2021 16:35:45 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by smtp2.osuosl.org (Postfix) with ESMTPS id 7AB2B400DA for ; Fri, 19 Nov 2021 16:35:45 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10172"; a="234391725" X-IronPort-AV: E=Sophos;i="5.87,248,1631602800"; d="scan'208";a="234391725" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Nov 2021 08:35:44 -0800 X-IronPort-AV: E=Sophos;i="5.87,248,1631602800"; d="scan'208";a="737108569" Received: from smile.fi.intel.com ([10.237.72.184]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Nov 2021 08:35:35 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.95) (envelope-from ) id 1mo6rG-008arp-NU; Fri, 19 Nov 2021 18:35:26 +0200 Date: Fri, 19 Nov 2021 18:35:26 +0200 From: Andy Shevchenko To: "Alejandro Colomar (man-pages)" Subject: Re: [PATCH 00/17] Add memberof(), split some headers, and slightly simplify code Message-ID: References: <20211119113644.1600-1-alx.manpages@gmail.com> <434296d3-8fe1-f1d2-ee9d-ea25d6c4e43e@gmail.com> <2d790206-124b-f850-895f-a57a74c55f79@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <2d790206-124b-f850-895f-a57a74c55f79@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Cc: Corey Minyard , Ajit Khaparde , "Michael S. Tsirkin" , Joonas Lahtinen , Rasmus Villemoes , Bjorn Andersson , Chris Mason , Christian Brauner , Ketan Mukadam , linux-scsi , Subbu Seetharaman , "Rafael J. Wysocki" , Russell King , Mike Rapoport , ACPI Devel Maling List , Miguel Ojeda , Borislav Petkov , "open list:DRM DRIVER FOR QEMU'S CIRRUS DEVICE" , Len Brown , Kees Cook , Arnd Bergmann , John Hubbard , Intel Graphics , Josef Bacik , Jani Nikula , Jitendra Bhivare , Rodrigo Vivi , Jonathan Cameron , David Sterba , Somnath Kotur , Linux ARM , Sriharsha Basavapatna , Networking , Nick Desaulniers , LKML , "John S . Gruber" , Andrew Morton , linux-btrfs X-BeenThere: virtualization@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux virtualization List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" On Fri, Nov 19, 2021 at 05:22:48PM +0100, Alejandro Colomar (man-pages) wrote: > > > On 11/19/21 17:18, Arnd Bergmann wrote: > > On Fri, Nov 19, 2021 at 5:10 PM Andy Shevchenko > > wrote: > >> On Fri, Nov 19, 2021 at 04:57:46PM +0100, Arnd Bergmann wrote: > > > >>> The main problem with this approach is that as soon as you start > >>> actually reducing the unneeded indirect includes, you end up with > >>> countless .c files that no longer build because they are missing a > >>> direct include for something that was always included somewhere > >>> deep underneath, so I needed a second set of scripts to add > >>> direct includes to every .c file. > >> > >> Can't it be done with cocci support? > > > > There are many ways of doing it, but they all tend to suffer from the > > problem of identifying which headers are actually needed based on > > the contents of a file, and also figuring out where to put the extra > > #include if there are complex #ifdefs. > > > > For reference, see below for the naive pattern matching I tried. > > This is obviously incomplete and partially wrong. > > FYI, if you may not know the tool, > theres include-what-you-use(1) (a.k.a. iwyu(1))[1], > although it is still not mature, > and I'm helping improve it a bit. Yes, I know the tool, but it produces insanity. Jonathan (maintainer of IIO subsystem) actually found it useful after manual work applied. Perhaps you can chat with him about usage of it in the Linux kernel. > If I understood better the kernel Makefiles, > I'd try it. > > You can try it yourselves. > I still can't use it for my own code, > since it has a lot of false positives. > [1]: -- With Best Regards, Andy Shevchenko _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization