* [PATCH] kallsyms: add required space for unified style
@ 2022-10-06 9:20 Deming Wang
2022-10-06 21:07 ` Miguel Ojeda
0 siblings, 1 reply; 2+ messages in thread
From: Deming Wang @ 2022-10-06 9:20 UTC (permalink / raw
To: keescook, boqun.feng, gregkh, ojeda, masahiroy; +Cc: linux-kernel, Deming Wang
add required space before and after operators.
Signed-off-by: Deming Wang <wangdeming@inspur.com>
---
scripts/kallsyms.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index 03fa07ad45d9..1df9944030e2 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -213,7 +213,7 @@ static void check_symbol_range(const char *sym, unsigned long long addr,
static struct sym_entry *read_symbol(FILE *in)
{
- char name[KSYM_NAME_LEN_BUFFER+1], type;
+ char name[KSYM_NAME_LEN_BUFFER + 1], type;
unsigned long long addr;
unsigned int len;
struct sym_entry *sym;
@@ -388,7 +388,7 @@ static int expand_symbol(const unsigned char *data, int len, char *result)
c = *data;
/* if the table holds a single char that is the same as the one
* we are looking for, then end the search */
- if (best_table[c][0]==c && best_table_len[c]==1) {
+ if (best_table[c][0] == c && best_table_len[c] == 1) {
*result++ = c;
total++;
} else {
@@ -641,7 +641,7 @@ static int find_best_token(void)
{
int i, best, bestprofit;
- bestprofit=-10000;
+ bestprofit = -10000;
best = 0;
for (i = 0; i < 0x10000; i++) {
--
2.27.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] kallsyms: add required space for unified style
2022-10-06 9:20 [PATCH] kallsyms: add required space for unified style Deming Wang
@ 2022-10-06 21:07 ` Miguel Ojeda
0 siblings, 0 replies; 2+ messages in thread
From: Miguel Ojeda @ 2022-10-06 21:07 UTC (permalink / raw
To: Deming Wang; +Cc: keescook, boqun.feng, gregkh, ojeda, masahiroy, linux-kernel
On Thu, Oct 6, 2022 at 11:22 AM Deming Wang <wangdeming@inspur.com> wrote:
>
> add required space before and after operators.
There are some other instances, like `i+1`, `*result=0;`, `total=0`...
that could be fixed too.
One way to find them is `clang-format -i` + `git add --patch` :)
That will also show you other different formatting issues, like a
couple `if (...) ...;` in a single line, `if(` without space, etc.
Cheers,
Miguel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-06 21:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-06 9:20 [PATCH] kallsyms: add required space for unified style Deming Wang
2022-10-06 21:07 ` Miguel Ojeda
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).