[v2] scripts/kallsyms.c Make the comment up-to-date with current implementation

Message ID 20221115212546.7154-1-cyan@0x00a1e9.dev
State New
Headers
Series [v2] scripts/kallsyms.c Make the comment up-to-date with current implementation |

Commit Message

Yuma Ueda Nov. 15, 2022, 9:25 p.m. UTC
  The comment in scripts/kallsyms.c describing the usage of
scripts/kallsyms does not reflect the latest implementation.
Fix the comment to be up-to-date with the current implementation.

Changes from V1:
- Fix typo

Signed-off-by: Yuma Ueda <cyan@0x00a1e9.dev>
---
 scripts/kallsyms.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

Miguel Ojeda Nov. 16, 2022, 8:04 p.m. UTC | #1
On Tue, Nov 15, 2022 at 10:26 PM Yuma Ueda <cyan@0x00a1e9.dev> wrote:
>
> The comment in scripts/kallsyms.c describing the usage of
> scripts/kallsyms does not reflect the latest implementation.
> Fix the comment to be up-to-date with the current implementation.

It may be a good idea to say in the commit message that this is now
equivalent to what the `usage()` function prints (and possibly change
`scripts/kallsyms` to just `kallsyms` to make it exactly equal). In
fact, we could replace the comment with "See usage() function" to
avoid further desyncs... But that is a different patch :)

Also, I am not sure we want to use tabs on the comment -- the rest of
it uses spaces.

Cheers,
Miguel
  
Yuma Ueda Nov. 18, 2022, 1:27 p.m. UTC | #2
Thank you for your comment.

On Wed, Nov 16, 2022 at 09:04:22PM +0100, Miguel Ojeda wrote:
> On Tue, Nov 15, 2022 at 10:26 PM Yuma Ueda <cyan@0x00a1e9.dev> wrote:
> >
> > The comment in scripts/kallsyms.c describing the usage of
> > scripts/kallsyms does not reflect the latest implementation.
> > Fix the comment to be up-to-date with the current implementation.
> 
> It may be a good idea to say in the commit message that this is now
> equivalent to what the `usage()` function prints (and possibly change
> `scripts/kallsyms` to just `kallsyms` to make it exactly equal).

I'll change it that way for both.

> In fact, we could replace the comment with "See usage() function" to
> avoid further desyncs... But that is a different patch :)
> 

I don't know if the comment should just be changed to "See usage() function",
and as you said, that should be done in a different patch,
so for now I will send a patch that fixes the issues you mentioned.

> Also, I am not sure we want to use tabs on the comment -- the rest of
> it uses spaces.

OK, I'll change tabs into spaces.

> 
> Cheers,
> Miguel

I'll send a new version of the patch later.

Regards,

Yuma Ueda
  

Patch

diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index 03fa07ad45d9..05c99ca3847b 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -5,7 +5,8 @@ 
  * This software may be used and distributed according to the terms
  * of the GNU General Public License, incorporated herein by reference.
  *
- * Usage: nm -n vmlinux | scripts/kallsyms [--all-symbols] > symbols.S
+ * Usage: scripts/kallsyms [--all-symbols] [--absolute-percpu]
+ * 			[--base-relative] in.map > out.S
  *
  *      Table compression uses all the unused char codes on the symbols and
  *  maps these to the most used substrings (tokens). For instance, it might