Skip to content

Commit 0d2573a

Browse files
geertumasahir0y
authored andcommitted
modpost: Join broken long printed messages
Breaking long printed messages in multiple lines makes it very hard to look up where they originated from. Signed-off-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Nicolas Schier <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
1 parent eb70814 commit 0d2573a

File tree

2 files changed

+10
-16
lines changed

2 files changed

+10
-16
lines changed

scripts/mod/file2alias.c

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -140,25 +140,22 @@ static void device_id_check(const char *modname, const char *device_id,
140140
int i;
141141

142142
if (size % id_size || size < id_size) {
143-
fatal("%s: sizeof(struct %s_device_id)=%lu is not a modulo "
144-
"of the size of "
145-
"section __mod_%s__<identifier>_device_table=%lu.\n"
146-
"Fix definition of struct %s_device_id "
147-
"in mod_devicetable.h\n",
143+
fatal("%s: sizeof(struct %s_device_id)=%lu is not a modulo of the size of section __mod_%s__<identifier>_device_table=%lu.\n"
144+
"Fix definition of struct %s_device_id in mod_devicetable.h\n",
148145
modname, device_id, id_size, device_id, size, device_id);
149146
}
150147
/* Verify last one is a terminator */
151148
for (i = 0; i < id_size; i++ ) {
152149
if (*(uint8_t*)(symval+size-id_size+i)) {
153-
fprintf(stderr,"%s: struct %s_device_id is %lu bytes. "
154-
"The last of %lu is:\n",
150+
fprintf(stderr,
151+
"%s: struct %s_device_id is %lu bytes. The last of %lu is:\n",
155152
modname, device_id, id_size, size / id_size);
156153
for (i = 0; i < id_size; i++ )
157154
fprintf(stderr,"0x%02x ",
158155
*(uint8_t*)(symval+size-id_size+i) );
159156
fprintf(stderr,"\n");
160-
fatal("%s: struct %s_device_id is not terminated "
161-
"with a NULL entry!\n", modname, device_id);
157+
fatal("%s: struct %s_device_id is not terminated with a NULL entry!\n",
158+
modname, device_id);
162159
}
163160
}
164161
}
@@ -1154,8 +1151,7 @@ static int do_amba_entry(const char *filename,
11541151
DEF_FIELD(symval, amba_id, mask);
11551152

11561153
if ((id & mask) != id)
1157-
fatal("%s: Masked-off bit(s) of AMBA device ID are non-zero: "
1158-
"id=0x%08X, mask=0x%08X. Please fix this driver.\n",
1154+
fatal("%s: Masked-off bit(s) of AMBA device ID are non-zero: id=0x%08X, mask=0x%08X. Please fix this driver.\n",
11591155
filename, id, mask);
11601156

11611157
p += sprintf(alias, "amba:d");

scripts/mod/modpost.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -519,9 +519,8 @@ static int parse_elf(struct elf_info *info, const char *filename)
519519
int nobits = sechdrs[i].sh_type == SHT_NOBITS;
520520

521521
if (!nobits && sechdrs[i].sh_offset > info->size) {
522-
fatal("%s is truncated. sechdrs[i].sh_offset=%lu > "
523-
"sizeof(*hrd)=%zu\n", filename,
524-
(unsigned long)sechdrs[i].sh_offset,
522+
fatal("%s is truncated. sechdrs[i].sh_offset=%lu > sizeof(*hrd)=%zu\n",
523+
filename, (unsigned long)sechdrs[i].sh_offset,
525524
sizeof(*hdr));
526525
return 0;
527526
}
@@ -1355,8 +1354,7 @@ static void report_extable_warnings(const char* modname, struct elf_info* elf,
13551354
get_pretty_name(is_function(tosym),
13561355
&to_pretty_name, &to_pretty_name_p);
13571356

1358-
warn("%s(%s+0x%lx): Section mismatch in reference"
1359-
" from the %s %s%s to the %s %s:%s%s\n",
1357+
warn("%s(%s+0x%lx): Section mismatch in reference from the %s %s%s to the %s %s:%s%s\n",
13601358
modname, fromsec, (long)r->r_offset, from_pretty_name,
13611359
fromsym_name, from_pretty_name_p,
13621360
to_pretty_name, tosec, tosym_name, to_pretty_name_p);

0 commit comments

Comments
 (0)