mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Wei Yang <richard.weiyang@gmail.com>
To: Wei Yang <richard.weiyang@gmail.com>
Cc: "Liam R. Howlett" <Liam.Howlett@oracle.com>,
	Matthew Wilcox <willy@infradead.org>,
	akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] radix tree test suite: include kconfig.h with incomplete path
Date: Mon, 29 Jul 2024 01:53:20 +0000	[thread overview]
Message-ID: <20240729015320.p6ef54kdcgnrgkyh@master> (raw)
In-Reply-To: <20240717003432.xbb3zs3iednce6vf@master>

On Wed, Jul 17, 2024 at 12:34:32AM +0000, Wei Yang wrote:
>On Tue, Jul 16, 2024 at 11:54:47AM -0400, Liam R. Howlett wrote:
>>* Wei Yang <richard.weiyang@gmail.com> [240716 03:56]:
>>> On Tue, Jul 16, 2024 at 03:31:06AM +0100, Matthew Wilcox wrote:
>>> >On Tue, Jul 16, 2024 at 02:15:43AM +0000, Wei Yang wrote:
>>> >> If you think my understanding is correct, I would send a v2 with proper
>>> >> changelog to describe it.
>>> >
>>> >It seems like you're trying to change something that isn't broken.
>>> 
>>> Currently we don't find the problem because these two kconfig.h is similar.
>>> The only difference is the one in tools/ doesn't include "generated/autoconf.h".
>>
>>We need that include.
>>
>
>I see your point, but I find current code has a chance not does do this.
>
>>> 
>>> And in related files, like include/linux/xarray.h, includes the correct
>>> kconfig.h.
>>> 
>>> It is not broken, but doesn't mean it is correct, IMO.
>>
>>This is really annoying because it works today and your change was
>>correct enough to look right, but it doesn't include the
>>generated/autoconf.h  - so it's not right.  It took a lot of time to
>>figure out that it isn't right.
>>
>
>I am not sure you have read my second mail.
>
>Here is what I find.
>
>I add a warning in tools/include/linux/kconfig.h.
>
>diff --git a/tools/include/linux/kconfig.h b/tools/include/linux/kconfig.h
>index 13b86bd3b746..12d3ed5f16b2 100644
>--- a/tools/include/linux/kconfig.h
>+++ b/tools/include/linux/kconfig.h
>@@ -2,6 +2,8 @@
> #ifndef _TOOLS_LINUX_KCONFIG_H
> #define _TOOLS_LINUX_KCONFIG_H
> 
>+#warning include local kconfig.h
>+
>
>Then I run the command:
>
>$make maple.o
>cc -I. -I../../include -I../../../lib -g -Og -Wall -D_LGPL_SOURCE -fsanitize=address -fsanitize=undefined   -c -o maple.o maple.c
>In file included from ./linux/kernel.h:14,
>                 from ../../include/linux/list.h:7,
>                 from ./linux/../../../../include/linux/radix-tree.h:13,
>                 from ./linux/radix-tree.h:5,
>                 from test.h:4,
>                 from maple.c:11:
>./linux/../../../include/linux/kconfig.h:5:2: warning: #warning include local kconfig.h [-Wcpp]
>    5 | #warning include local kconfig.h
>      |  ^~~~~~~
>
>This means current code may include tools/include/linux/kconfig.h, which doesn't
>include generated/autoconf.h.
>

Liam,

Do you think what I found is real?

Look forward your insight.

>After I change to <linux/kconfig.h> in kernel.h, the warning message is gone.
>
>Current behavior is not what you expected, right? We have a chance to include
>the kconfig.h which doesn't include generated/autoconf.h. 
>
>Hope not waste your time.
>
>-- 
>Wei Yang
>Help you, Help me

-- 
Wei Yang
Help you, Help me

      reply	other threads:[~2024-07-29  1:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-12  7:41 Wei Yang
2024-07-12  7:41 ` [PATCH 2/2] radix tree test suite: remove the local copy of kconfig.h Wei Yang
2024-07-15 16:17 ` [PATCH 1/2] radix tree test suite: include kconfig.h with incomplete path Liam R. Howlett
2024-07-16  0:58   ` Wei Yang
2024-07-16  2:15 ` Wei Yang
2024-07-16  2:31   ` Matthew Wilcox
2024-07-16  7:56     ` Wei Yang
2024-07-16 15:54       ` Liam R. Howlett
2024-07-17  0:34         ` Wei Yang
2024-07-29  1:53           ` Wei Yang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240729015320.p6ef54kdcgnrgkyh@master \
    --to=richard.weiyang@gmail.com \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®