<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/scripts/kconfig/lexer.l, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-09-01T11:34:48+00:00</updated>
<entry>
<title>kbuild: split x*alloc() functions in kconfig to scripts/include/xalloc.h</title>
<updated>2024-09-01T11:34:48+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2024-08-12T12:48:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a9d83d74783b00f9189c14180f77bbed133b092c'/>
<id>urn:sha1:a9d83d74783b00f9189c14180f77bbed133b092c</id>
<content type='text'>
These functions will be useful for other host programs.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>kconfig: remove 'optional' property support</title>
<updated>2024-05-02T10:48:26+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2024-04-22T16:41:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6a1215888e23aa9fbc514086402f04708c84f454'/>
<id>urn:sha1:6a1215888e23aa9fbc514086402f04708c84f454</id>
<content type='text'>
The 'choice' statement is primarily used to exclusively select one
option, but the 'optional' property allows all entries to be disabled.

In the following example, both A and B can be disabled simultaneously:

    choice
            prompt "choose A, B, or nothing"
            optional

    config A
            bool "A"

    config B
            bool "B"

    endchoice

You can achieve the equivalent outcome by other means.

A common solution is to add another option to guard the choice block.
In the following example, you can set ENABLE_A_B_CHOICE=n to disable
the entire choice block:

    choice
            prompt "choose A or B"
            depends on ENABLE_A_B_CHOICE

    config A
            bool "A"

    config B
            bool "B"

    endchoice

Another approach is to insert one more entry:

    choice
            prompt "choose A, B, or disable both"

    config A
            bool "A"

    config B
            bool "B"

    config DISABLE_A_AND_B
            bool "choose this to disable both A and B"

    endchoice

Some real examples are DEBUG_INFO_NONE, INITRAMFS_COMPRESSION_NONE,
LTO_NONE, etc.

The 'optional' property is even more unnecessary for a tristate choice.

Without the 'optional' property, you can disable A and B; you can set
'm' in the choice prompt, and disable A and B individually:

    choice
            prompt "choose one built-in or make them modular"

    config A
            tristate "A"

    config B
            tristate "B"

    endchoice

In conclusion, the 'optional' property was unneeded.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Reviewed-by: Nicolas Schier &lt;n.schier@avm.de&gt;
</content>
</entry>
<entry>
<title>kconfig: change file_lookup() to return the file name</title>
<updated>2024-02-19T09:20:41+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2024-02-02T15:58:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5b058034e3aa600802ab609e8264dc2ca1300ebe'/>
<id>urn:sha1:5b058034e3aa600802ab609e8264dc2ca1300ebe</id>
<content type='text'>
Currently, file_lookup() returns a pointer to (struct file), but the
callers use only file-&gt;name.

Make it return the -&gt;name member directly.

This adjustment encapsulates struct file and file_list as internal
implementation.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>kconfig: move the file and lineno in struct file to struct buffer</title>
<updated>2024-02-19T09:20:40+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2024-02-02T15:58:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8facc5f31954d5fddc2759de474eb6fae1135ced'/>
<id>urn:sha1:8facc5f31954d5fddc2759de474eb6fae1135ced</id>
<content type='text'>
struct file has two link nodes, 'next' and 'parent'.

The former is used to link files in the 'file_list' linked list,
which manages the list of Kconfig files seen so far.

The latter is used to link files in the 'current_file' linked list,
which manages the inclusion ("source") tree.

The latter should be tracked together with the lexer state.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>kconfig: replace remaining current_file-&gt;name with cur_filename</title>
<updated>2024-02-19T09:20:40+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2024-02-02T15:58:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4ff7ceae83bea6afcd0325b88e3f3d9f168cc432'/>
<id>urn:sha1:4ff7ceae83bea6afcd0325b88e3f3d9f168cc432</id>
<content type='text'>
Replace the remaining current_file-&gt;name in the lexer context.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>kconfig: do not delay the cur_filename update</title>
<updated>2024-02-19T09:20:40+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2024-02-02T15:58:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d3e4a68fe20f3c05de77f5e300e3d76a9f68d942'/>
<id>urn:sha1:d3e4a68fe20f3c05de77f5e300e3d76a9f68d942</id>
<content type='text'>
Currently, cur_filename is updated at the first token of each statement.
However, this seems unnecessary based on my understanding; the parser
can use the same variable as the lexer tracks.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>kconfig: replace file-&gt;name with name in zconf_nextfile()</title>
<updated>2024-02-19T09:20:40+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2024-02-02T15:58:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fe273c6fc318da07bdbb42d26d8e6e150aa947af'/>
<id>urn:sha1:fe273c6fc318da07bdbb42d26d8e6e150aa947af</id>
<content type='text'>
The 'file-&gt;name' and 'name' are the same in this function.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>kconfig: remove zconf_curname() and zconf_lineno()</title>
<updated>2024-02-19T09:20:40+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2024-02-02T15:58:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1d7c4f10baacbc658918f7ddec31e1d1962df6fc'/>
<id>urn:sha1:1d7c4f10baacbc658918f7ddec31e1d1962df6fc</id>
<content type='text'>
Now zconf_curname() and zconf_lineno() are so simple that they just
return cur_filename, cur_lineno, respectively.

Remove these functions, and then use cur_filename and cur_lineno
directly.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>kconfig: replace current_pos with separate cur_{filename,lineno}</title>
<updated>2024-02-19T09:20:40+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2024-02-02T15:58:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=52907c07c49b7b820924773d596c5eec5eaf7469'/>
<id>urn:sha1:52907c07c49b7b820924773d596c5eec5eaf7469</id>
<content type='text'>
Replace current_pos with separate variables representing the file name
and the line number, respectively.

No functional change is intended.

By the way, you might wonder why the "&lt;none&gt;" fallback exists in
zconf_curname(). menu_add_symbol() saves the current file and the line
number. It is intended to be called only during the yyparse() time.
However, menu_finalize() calls it, where there is no file being parsed.
This is a long-standing hack that should be fixed later. I left a FIXME
comment.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>kconfig: split preprocessor prototypes into preprocess.h</title>
<updated>2024-02-19T09:20:40+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2024-02-02T15:58:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d3d16228a520ce49884d3bb90b67c12726c63020'/>
<id>urn:sha1:d3d16228a520ce49884d3bb90b67c12726c63020</id>
<content type='text'>
These are needed only for the parse stage. Move the prototypes into
a separate header to make sure they are not used after that.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
</feed>
