Skip to content

Misc: ERR message polish, add missing include - #452

Closed
evelikov wants to merge 4 commits into
kmod-project:masterfrom
evelikov:remove-dup-func
Closed

Misc: ERR message polish, add missing include#452
evelikov wants to merge 4 commits into
kmod-project:masterfrom
evelikov:remove-dup-func

Conversation

@evelikov

@evelikov evelikov commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Our logging macros already provide __func__ throughout. Drop the few
instances which manually add it yet again.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
The other errors use zlib (the library) instead of gzip. Convert the
final instance.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Swap "belch" for a more common name and use the function in all possible
error paths.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
I was toying around with a home-made version of include-what-you-use,
which showed that we're missing the include in a number of places.

At the moment it is indirectly resolved via libkmod.h, which pulls said
header for O_TRUNC and O_NONBLOCK. It's unlikely that we'll drop the
include from the public header, although that doesn't mean that aiming
for self-contained sources is a bad idea.

For context: I am looking to remove the libkmod static link to
init-module.so and part of that meant building libkmod-elf.c without
the rest of kmod.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
@codecov

codecov Bot commented Aug 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
libkmod/libkmod-builtin.c 0.00% 4 Missing ⚠️
libkmod/libkmod-file-xz.c 0.00% 4 Missing ⚠️
libkmod/libkmod-file-zlib.c 0.00% 1 Missing ⚠️
Files with missing lines Coverage Δ
libkmod/libkmod-config.c 68.57% <ø> (+0.30%) ⬆️
libkmod/libkmod-file.c 75.00% <ø> (-1.48%) ⬇️
libkmod/libkmod-index.c 56.02% <ø> (ø)
libkmod/libkmod-module.c 54.43% <ø> (+0.15%) ⬆️
libkmod/libkmod.c 49.51% <ø> (ø)
tools/depmod.c 57.18% <ø> (+0.42%) ⬆️
libkmod/libkmod-file-zlib.c 54.54% <0.00%> (-0.72%) ⬇️
libkmod/libkmod-builtin.c 59.75% <0.00%> (ø)
libkmod/libkmod-file-xz.c 53.84% <0.00%> (-0.33%) ⬇️

... and 9 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

lucasdemarchi pushed a commit that referenced this pull request Aug 6, 2026
Our logging macros already provide __func__ throughout. Drop the few
instances which manually add it yet again.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: #452
Signed-off-by: Lucas De Marchi <demarchi@kernel.org>
lucasdemarchi pushed a commit that referenced this pull request Aug 6, 2026
The other errors use zlib (the library) instead of gzip. Convert the
final instance.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: #452
Signed-off-by: Lucas De Marchi <demarchi@kernel.org>
lucasdemarchi pushed a commit that referenced this pull request Aug 6, 2026
Swap "belch" for a more common name and use the function in all possible
error paths.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: #452
Signed-off-by: Lucas De Marchi <demarchi@kernel.org>
lucasdemarchi pushed a commit that referenced this pull request Aug 6, 2026
I was toying around with a home-made version of include-what-you-use,
which showed that we're missing the include in a number of places.

At the moment it is indirectly resolved via libkmod.h, which pulls said
header for O_TRUNC and O_NONBLOCK. It's unlikely that we'll drop the
include from the public header, although that doesn't mean that aiming
for self-contained sources is a bad idea.

For context: I am looking to remove the libkmod static link to
init-module.so and part of that meant building libkmod-elf.c without
the rest of kmod.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: #452
Signed-off-by: Lucas De Marchi <demarchi@kernel.org>
@lucasdemarchi

Copy link
Copy Markdown
Contributor

Applied, thanks

@evelikov
evelikov deleted the remove-dup-func branch August 6, 2026 17:30
lucasdemarchi pushed a commit that referenced this pull request Aug 6, 2026
Our logging macros already provide __func__ throughout. Drop the few
instances which manually add it yet again.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: #452
Signed-off-by: Lucas De Marchi <demarchi@kernel.org>
lucasdemarchi pushed a commit that referenced this pull request Aug 6, 2026
The other errors use zlib (the library) instead of gzip. Convert the
final instance.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: #452
Signed-off-by: Lucas De Marchi <demarchi@kernel.org>
lucasdemarchi pushed a commit that referenced this pull request Aug 6, 2026
Swap "belch" for a more common name and use the function in all possible
error paths.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: #452
Signed-off-by: Lucas De Marchi <demarchi@kernel.org>
lucasdemarchi pushed a commit that referenced this pull request Aug 6, 2026
I was toying around with a home-made version of include-what-you-use,
which showed that we're missing the include in a number of places.

At the moment it is indirectly resolved via libkmod.h, which pulls said
header for O_TRUNC and O_NONBLOCK. It's unlikely that we'll drop the
include from the public header, although that doesn't mean that aiming
for self-contained sources is a bad idea.

For context: I am looking to remove the libkmod static link to
init-module.so and part of that meant building libkmod-elf.c without
the rest of kmod.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: #452
Signed-off-by: Lucas De Marchi <demarchi@kernel.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants