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 E1D8FC43219 for ; Fri, 19 Nov 2021 15:38:53 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 420E5601FA for ; Fri, 19 Nov 2021 15:38:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 420E5601FA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CCDB26E194; Fri, 19 Nov 2021 15:38:52 +0000 (UTC) Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1337A6E194 for ; Fri, 19 Nov 2021 15:38:51 +0000 (UTC) Received: by mail-wm1-x32c.google.com with SMTP id r9-20020a7bc089000000b00332f4abf43fso7982746wmh.0 for ; Fri, 19 Nov 2021 07:38:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=AFmWJJSoUz1GaSVge39mjbycrDT+hCXLvixsJ9Vd/mM=; b=ODBGo6Iv/FduaI9j0vjuZl2NIBuAxnbGU2bcovlrBdrVJzhUS8rZrJbsWWThxKF4YM 2piqpAuwsNCJaU29VFoQO7tYp0p/gz57fLRCb6NKGAYpsf7vZMEwatmAL2pakRYrkGS3 5CyApPlAsK96e4LS/ADUfaZIM6u9y3xUyqMhnbblZWK2zi7mqI87xxyPxJjl4cr+/jre TLKuGOqq84YkD9L4lOHMJstQssFNG/qb6pVtF5F1cB7J9M9uCr9cT69YM7CQNz4GtnWJ HylPvDX49+FriE9yIj2XYmJ+i5Fb1PUieUloxr46vjRuxiOg6D7glHMfGbWoTqqKniMy hK7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=AFmWJJSoUz1GaSVge39mjbycrDT+hCXLvixsJ9Vd/mM=; b=qCSKqbRdta4so/2vRc57xw461c3X3xJKejK7T/kc0lOmzFCkE39GVNwB7WCLu3DMvi oZpa/OqMN5NF8DNa0X2XUSWJwet/YK7v9tjFPyaExdEaGonLkhAqxzZ4wZ/+4NhqSrod GoDJKOp4uhk1CjkntgSw8UrWYZJtwCJiJBdYW7GU4SrI4ksE0AIjhnSKbZoXI3Xes325 NwIKRXkeBm8xFIIeUE1ooE17O0t1KdLbmp+a9yCpnJojkjS9IG9vkVTPX7KqwWSQQYwE McceJooYSP0lSQeX8UWS27ZaOh1T4XJHbmyylgpka1dDlsXoXZq8CNIU5/zLEcYIztgq m5ww== X-Gm-Message-State: AOAM532vKvjP4nFwrwAKLj0sjRu69B/qgye6aOvqLGY3+b0fQdZE9MEO PSiduIM29/EQg0d0fOf/JPs= X-Google-Smtp-Source: ABdhPJyzLCj+QPqjCFbp0MdNnUqJ9A2TJYw2WJIoMils7KWBN9n8betYgJkYA9Hvx/wFV4EI5SabHA== X-Received: by 2002:a1c:790d:: with SMTP id l13mr641345wme.101.1637336329656; Fri, 19 Nov 2021 07:38:49 -0800 (PST) Received: from [192.168.0.160] ([170.253.36.171]) by smtp.gmail.com with ESMTPSA id g18sm15729789wmq.4.2021.11.19.07.38.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 19 Nov 2021 07:38:49 -0800 (PST) Message-ID: Date: Fri, 19 Nov 2021 16:38:46 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Content-Language: en-US To: Andy Shevchenko References: <20211119113644.1600-1-alx.manpages@gmail.com> <434296d3-8fe1-f1d2-ee9d-ea25d6c4e43e@gmail.com> From: "Alejandro Colomar (man-pages)" In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Intel-gfx] [PATCH 00/17] Add memberof(), split some headers, and slightly simplify code X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Corey Minyard , Ajit Khaparde , "Michael S. Tsirkin" , Jason Wang , Rasmus Villemoes , Bjorn Andersson , Chris Mason , Christian Brauner , Ketan Mukadam , linux-scsi@vger.kernel.org, Subbu Seetharaman , "Rafael J. Wysocki" , Russell King , Mike Rapoport , linux-acpi@vger.kernel.org, Miguel Ojeda , Borislav Petkov , virtualization@lists.linux-foundation.org, Len Brown , Kees Cook , Arnd Bergmann , John Hubbard , intel-gfx@lists.freedesktop.org, Josef Bacik , Jitendra Bhivare , Jonathan Cameron , David Sterba , Somnath Kotur , linux-arm-kernel@lists.infradead.org, Sriharsha Basavapatna , netdev@vger.kernel.org, Nick Desaulniers , LKML , "John S . Gruber" , Andrew Morton , linux-btrfs@vger.kernel.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Hi Andy, On 11/19/21 16:34, Andy Shevchenko wrote: > On Fri, Nov 19, 2021 at 04:06:27PM +0100, Alejandro Colomar (man-pages) wrote: >> Yes, I would like to untangle the dependencies. >> >> The main reason I started doing this splitting >> is because I wouldn't be able to include >> in some headers, >> because it pulled too much stuff that broke unrelated things. >> >> So that's why I started from there. >> >> I for example would like to get NULL in memberof() >> without puling anything else, >> so makes sense for that. > > I don't believe that the code that uses NULL won't include types.h. I'm not sure about the error I got (I didn't write it down), but I got a compilation error. That's why I split NULL. If one could anwer my doubt, I would be in better position to learn how to avoid them. See below. On 11/19/21 16:06, Alejandro Colomar (man-pages) wrote: > BTW, I also have a longstanding doubt about > how header files are organized in the kernel, > and which headers can and cannot be included > from which other files. > > For example I see that files in samples or scripts or tools, > that redefine many things such as offsetof() or ARRAY_SIZE(), > and I don't know if there's a good reason for that, > or if I should simply remove all that stuff and > include everywhere I see offsetof() being used. Thanks, Alex -- Alejandro Colomar Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/ http://www.alejandro-colomar.es/