From: Kalle Valo <kvalo@kernel.org>
To: Ping-Ke Shih <pkshih@realtek.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 1/2] wifi: rtl8xxxu: remove some unused includes
Date: Mon, 29 Apr 2024 15:23:04 +0300 [thread overview]
Message-ID: <87frv4fjdj.fsf@kernel.org> (raw)
In-Reply-To: <2a9fdafb5b5843c58cb080f8933b1e0a@realtek.com> (Ping-Ke Shih's message of "Mon, 29 Apr 2024 02:54:55 +0000")
Ping-Ke Shih <pkshih@realtek.com> writes:
> Ping-Ke Shih wrote:
>> Kalle Valo <kvalo@kernel.org> wrote:
>> > I noticed by random that rtl8xxxu includes linux/wireless.h even though it
>> > doesn't need it. While investigating a bit more I found even more unused
>> > include files:
>> >
>> > #include <linux/init.h>
>> > #include <linux/sched.h>
>> > #include <linux/ethtool.h>
>> >
>> > It looks like that the includes are just copied to every file without checking
>> > if the file really needs the include. So more includes could be removed but
>> > that would need more careful analysis per each file.
>>
>> I can do that. My ways will be to create an empty (new) C file to examine
>> every driver's header file can be included individually, and then try-and-error
>> to remove includes from existing C files.
>
> I made a patch [1] followed above ways based on these two patches.
Excellent, thanks Ping.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
next prev parent reply other threads:[~2024-04-29 12:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-26 14:19 [PATCH 1/2] wifi: rtl8xxxu: remove some unused includes Kalle Valo
2024-04-26 14:19 ` [PATCH 2/2] wifi: rtl8xxxu: remove rtl8xxxu_ prefix from filenames Kalle Valo
2024-04-29 2:08 ` Ping-Ke Shih
2024-04-29 2:08 ` [PATCH 1/2] wifi: rtl8xxxu: remove some unused includes Ping-Ke Shih
2024-04-29 2:54 ` Ping-Ke Shih
2024-04-29 12:23 ` Kalle Valo [this message]
2024-05-02 3:07 ` Ping-Ke Shih
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=87frv4fjdj.fsf@kernel.org \
--to=kvalo@kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=pkshih@realtek.com \
/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