Skip to content

Commit 1c13188

Browse files
mauelshaMike Snitzer
authored andcommitted
dm: prefer '"%s...", __func__'
Signed-off-by: Heinz Mauelshagen <[email protected]> Signed-off-by: Mike Snitzer <[email protected]>
1 parent aa07f9d commit 1c13188

File tree

10 files changed

+39
-39
lines changed

10 files changed

+39
-39
lines changed

drivers/md/dm-cache-metadata.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,15 +203,15 @@ static int sb_check(struct dm_block_validator *v,
203203
__le32 csum_le;
204204

205205
if (dm_block_location(b) != le64_to_cpu(disk_super->blocknr)) {
206-
DMERR("sb_check failed: blocknr %llu: wanted %llu",
207-
le64_to_cpu(disk_super->blocknr),
206+
DMERR("%s failed: blocknr %llu: wanted %llu",
207+
__func__, le64_to_cpu(disk_super->blocknr),
208208
(unsigned long long)dm_block_location(b));
209209
return -ENOTBLK;
210210
}
211211

212212
if (le64_to_cpu(disk_super->magic) != CACHE_SUPERBLOCK_MAGIC) {
213-
DMERR("sb_check failed: magic %llu: wanted %llu",
214-
le64_to_cpu(disk_super->magic),
213+
DMERR("%s failed: magic %llu: wanted %llu",
214+
__func__, le64_to_cpu(disk_super->magic),
215215
(unsigned long long)CACHE_SUPERBLOCK_MAGIC);
216216
return -EILSEQ;
217217
}
@@ -220,8 +220,8 @@ static int sb_check(struct dm_block_validator *v,
220220
sb_block_size - sizeof(__le32),
221221
SUPERBLOCK_CSUM_XOR));
222222
if (csum_le != disk_super->csum) {
223-
DMERR("sb_check failed: csum %u: wanted %u",
224-
le32_to_cpu(csum_le), le32_to_cpu(disk_super->csum));
223+
DMERR("%s failed: csum %u: wanted %u",
224+
__func__, le32_to_cpu(csum_le), le32_to_cpu(disk_super->csum));
225225
return -EILSEQ;
226226
}
227227

drivers/md/dm-era-target.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -229,15 +229,15 @@ static int sb_check(struct dm_block_validator *v,
229229
__le32 csum_le;
230230

231231
if (dm_block_location(b) != le64_to_cpu(disk->blocknr)) {
232-
DMERR("sb_check failed: blocknr %llu: wanted %llu",
233-
le64_to_cpu(disk->blocknr),
232+
DMERR("%s failed: blocknr %llu: wanted %llu",
233+
__func__, le64_to_cpu(disk->blocknr),
234234
(unsigned long long)dm_block_location(b));
235235
return -ENOTBLK;
236236
}
237237

238238
if (le64_to_cpu(disk->magic) != SUPERBLOCK_MAGIC) {
239-
DMERR("sb_check failed: magic %llu: wanted %llu",
240-
le64_to_cpu(disk->magic),
239+
DMERR("%s failed: magic %llu: wanted %llu",
240+
__func__, le64_to_cpu(disk->magic),
241241
(unsigned long long) SUPERBLOCK_MAGIC);
242242
return -EILSEQ;
243243
}
@@ -246,8 +246,8 @@ static int sb_check(struct dm_block_validator *v,
246246
sb_block_size - sizeof(__le32),
247247
SUPERBLOCK_CSUM_XOR));
248248
if (csum_le != disk->csum) {
249-
DMERR("sb_check failed: csum %u: wanted %u",
250-
le32_to_cpu(csum_le), le32_to_cpu(disk->csum));
249+
DMERR("%s failed: csum %u: wanted %u",
250+
__func__, le32_to_cpu(csum_le), le32_to_cpu(disk->csum));
251251
return -EILSEQ;
252252
}
253253

drivers/md/dm-integrity.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3093,7 +3093,7 @@ static void replay_journal(struct dm_integrity_c *ic)
30933093

30943094
static void dm_integrity_enter_synchronous_mode(struct dm_integrity_c *ic)
30953095
{
3096-
DEBUG_print("dm_integrity_enter_synchronous_mode\n");
3096+
DEBUG_print("%s\n", __func__);
30973097

30983098
if (ic->mode == 'B') {
30993099
ic->bitmap_flush_interval = msecs_to_jiffies(10) + 1;
@@ -3109,7 +3109,7 @@ static int dm_integrity_reboot(struct notifier_block *n, unsigned long code, voi
31093109
{
31103110
struct dm_integrity_c *ic = container_of(n, struct dm_integrity_c, reboot_notifier);
31113111

3112-
DEBUG_print("dm_integrity_reboot\n");
3112+
DEBUG_print("%s\n", __func__);
31133113

31143114
dm_integrity_enter_synchronous_mode(ic);
31153115

drivers/md/dm-ioctl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1409,7 +1409,7 @@ static int populate_table(struct dm_table *table,
14091409
char *target_params;
14101410

14111411
if (!param->target_count) {
1412-
DMERR("populate_table: no targets specified");
1412+
DMERR("%s: no targets specified", __func__);
14131413
return -EINVAL;
14141414
}
14151415

drivers/md/dm-mpath.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -739,15 +739,15 @@ static void process_queued_bios(struct work_struct *work)
739739
/*
740740
* If we run out of usable paths, should we queue I/O or error it?
741741
*/
742-
static int queue_if_no_path(struct multipath *m, bool queue_if_no_path,
742+
static int queue_if_no_path(struct multipath *m, bool f_queue_if_no_path,
743743
bool save_old_value, const char *caller)
744744
{
745745
unsigned long flags;
746746
bool queue_if_no_path_bit, saved_queue_if_no_path_bit;
747747
const char *dm_dev_name = dm_table_device_name(m->ti->table);
748748

749-
DMDEBUG("%s: %s caller=%s queue_if_no_path=%d save_old_value=%d",
750-
dm_dev_name, __func__, caller, queue_if_no_path, save_old_value);
749+
DMDEBUG("%s: %s caller=%s f_queue_if_no_path=%d save_old_value=%d",
750+
dm_dev_name, __func__, caller, f_queue_if_no_path, save_old_value);
751751

752752
spin_lock_irqsave(&m->lock, flags);
753753

@@ -760,11 +760,11 @@ static int queue_if_no_path(struct multipath *m, bool queue_if_no_path,
760760
dm_dev_name);
761761
} else
762762
assign_bit(MPATHF_SAVED_QUEUE_IF_NO_PATH, &m->flags, queue_if_no_path_bit);
763-
} else if (!queue_if_no_path && saved_queue_if_no_path_bit) {
763+
} else if (!f_queue_if_no_path && saved_queue_if_no_path_bit) {
764764
/* due to "fail_if_no_path" message, need to honor it. */
765765
clear_bit(MPATHF_SAVED_QUEUE_IF_NO_PATH, &m->flags);
766766
}
767-
assign_bit(MPATHF_QUEUE_IF_NO_PATH, &m->flags, queue_if_no_path);
767+
assign_bit(MPATHF_QUEUE_IF_NO_PATH, &m->flags, f_queue_if_no_path);
768768

769769
DMDEBUG("%s: after %s changes; QIFNP = %d; SQIFNP = %d; DNFS = %d",
770770
dm_dev_name, __func__,
@@ -774,7 +774,7 @@ static int queue_if_no_path(struct multipath *m, bool queue_if_no_path,
774774

775775
spin_unlock_irqrestore(&m->lock, flags);
776776

777-
if (!queue_if_no_path) {
777+
if (!f_queue_if_no_path) {
778778
dm_table_run_md_queue_async(m->ti->table);
779779
process_queued_io_list(m);
780780
}
@@ -1468,7 +1468,7 @@ static int switch_pg_num(struct multipath *m, const char *pgstr)
14681468

14691469
if (!pgstr || (sscanf(pgstr, "%u%c", &pgnum, &dummy) != 1) || !pgnum ||
14701470
!m->nr_priority_groups || (pgnum > m->nr_priority_groups)) {
1471-
DMWARN("invalid PG number supplied to switch_pg_num");
1471+
DMWARN("invalid PG number supplied to %s", __func__);
14721472
return -EINVAL;
14731473
}
14741474

drivers/md/dm-thin-metadata.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -269,15 +269,15 @@ static int sb_check(struct dm_block_validator *v,
269269
__le32 csum_le;
270270

271271
if (dm_block_location(b) != le64_to_cpu(disk_super->blocknr)) {
272-
DMERR("sb_check failed: blocknr %llu: wanted %llu",
273-
le64_to_cpu(disk_super->blocknr),
272+
DMERR("%s failed: blocknr %llu: wanted %llu",
273+
__func__, le64_to_cpu(disk_super->blocknr),
274274
(unsigned long long)dm_block_location(b));
275275
return -ENOTBLK;
276276
}
277277

278278
if (le64_to_cpu(disk_super->magic) != THIN_SUPERBLOCK_MAGIC) {
279-
DMERR("sb_check failed: magic %llu: wanted %llu",
280-
le64_to_cpu(disk_super->magic),
279+
DMERR("%s failed: magic %llu: wanted %llu",
280+
__func__, le64_to_cpu(disk_super->magic),
281281
(unsigned long long)THIN_SUPERBLOCK_MAGIC);
282282
return -EILSEQ;
283283
}
@@ -286,8 +286,8 @@ static int sb_check(struct dm_block_validator *v,
286286
block_size - sizeof(__le32),
287287
SUPERBLOCK_CSUM_XOR));
288288
if (csum_le != disk_super->csum) {
289-
DMERR("sb_check failed: csum %u: wanted %u",
290-
le32_to_cpu(csum_le), le32_to_cpu(disk_super->csum));
289+
DMERR("%s failed: csum %u: wanted %u",
290+
__func__, le32_to_cpu(csum_le), le32_to_cpu(disk_super->csum));
291291
return -EILSEQ;
292292
}
293293

drivers/md/dm-verity-target.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ static int verity_hash_final(struct dm_verity *v, struct ahash_request *req,
165165
r = verity_hash_update(v, req, v->salt, v->salt_size, wait);
166166

167167
if (r < 0) {
168-
DMERR("verity_hash_final failed updating salt: %d", r);
168+
DMERR("%s failed updating salt: %d", __func__, r);
169169
goto out;
170170
}
171171
}
@@ -423,7 +423,7 @@ static int verity_for_io_block(struct dm_verity *v, struct dm_verity_io *io,
423423
r = crypto_wait_req(crypto_ahash_update(req), wait);
424424

425425
if (unlikely(r < 0)) {
426-
DMERR("verity_for_io_block crypto op failed: %d", r);
426+
DMERR("%s crypto op failed: %d", __func__, r);
427427
return r;
428428
}
429429

drivers/md/persistent-data/dm-array.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ static int array_block_check(struct dm_block_validator *v,
5858
__le32 csum_disk;
5959

6060
if (dm_block_location(b) != le64_to_cpu(bh_le->blocknr)) {
61-
DMERR_LIMIT("array_block_check failed: blocknr %llu != wanted %llu",
61+
DMERR_LIMIT("%s failed: blocknr %llu != wanted %llu", __func__,
6262
(unsigned long long) le64_to_cpu(bh_le->blocknr),
6363
(unsigned long long) dm_block_location(b));
6464
return -ENOTBLK;
@@ -68,7 +68,7 @@ static int array_block_check(struct dm_block_validator *v,
6868
size_of_block - sizeof(__le32),
6969
CSUM_XOR));
7070
if (csum_disk != bh_le->csum) {
71-
DMERR_LIMIT("array_block_check failed: csum %u != wanted %u",
71+
DMERR_LIMIT("%s failed: csum %u != wanted %u", __func__,
7272
(unsigned int) le32_to_cpu(csum_disk),
7373
(unsigned int) le32_to_cpu(bh_le->csum));
7474
return -EILSEQ;

drivers/md/persistent-data/dm-btree-spine.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ static int node_check(struct dm_block_validator *v,
4040
uint32_t flags, nr_entries, max_entries;
4141

4242
if (dm_block_location(b) != le64_to_cpu(h->blocknr)) {
43-
DMERR_LIMIT("node_check failed: blocknr %llu != wanted %llu",
43+
DMERR_LIMIT("%s failed: blocknr %llu != wanted %llu", __func__,
4444
le64_to_cpu(h->blocknr), dm_block_location(b));
4545
return -ENOTBLK;
4646
}
@@ -49,7 +49,7 @@ static int node_check(struct dm_block_validator *v,
4949
block_size - sizeof(__le32),
5050
BTREE_CSUM_XOR));
5151
if (csum_disk != h->csum) {
52-
DMERR_LIMIT("node_check failed: csum %u != wanted %u",
52+
DMERR_LIMIT("%s failed: csum %u != wanted %u", __func__,
5353
le32_to_cpu(csum_disk), le32_to_cpu(h->csum));
5454
return -EILSEQ;
5555
}
@@ -60,12 +60,12 @@ static int node_check(struct dm_block_validator *v,
6060

6161
if (sizeof(struct node_header) +
6262
(sizeof(__le64) + value_size) * max_entries > block_size) {
63-
DMERR_LIMIT("node_check failed: max_entries too large");
63+
DMERR_LIMIT("%s failed: max_entries too large", __func__);
6464
return -EILSEQ;
6565
}
6666

6767
if (nr_entries > max_entries) {
68-
DMERR_LIMIT("node_check failed: too many entries");
68+
DMERR_LIMIT("%s failed: too many entries", __func__);
6969
return -EILSEQ;
7070
}
7171

@@ -74,7 +74,7 @@ static int node_check(struct dm_block_validator *v,
7474
*/
7575
flags = le32_to_cpu(h->flags);
7676
if (!(flags & INTERNAL_NODE) && !(flags & LEAF_NODE)) {
77-
DMERR_LIMIT("node_check failed: node is neither INTERNAL or LEAF");
77+
DMERR_LIMIT("%s failed: node is neither INTERNAL or LEAF", __func__);
7878
return -EILSEQ;
7979
}
8080

drivers/md/persistent-data/dm-space-map-common.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ static int index_check(struct dm_block_validator *v,
4242
__le32 csum_disk;
4343

4444
if (dm_block_location(b) != le64_to_cpu(mi_le->blocknr)) {
45-
DMERR_LIMIT("index_check failed: blocknr %llu != wanted %llu",
45+
DMERR_LIMIT("%s failed: blocknr %llu != wanted %llu", __func__,
4646
le64_to_cpu(mi_le->blocknr), dm_block_location(b));
4747
return -ENOTBLK;
4848
}
@@ -51,7 +51,7 @@ static int index_check(struct dm_block_validator *v,
5151
block_size - sizeof(__le32),
5252
INDEX_CSUM_XOR));
5353
if (csum_disk != mi_le->csum) {
54-
DMERR_LIMIT("index_check failed: csum %u != wanted %u",
54+
DMERR_LIMIT("i%s failed: csum %u != wanted %u", __func__,
5555
le32_to_cpu(csum_disk), le32_to_cpu(mi_le->csum));
5656
return -EILSEQ;
5757
}

0 commit comments

Comments
 (0)