Skip to content

Commit 18d1dbf

Browse files
hharrisontorvalds
authored andcommitted
ecryptfs: replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Cc: Michael Halcrow <mhalcrow@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 05db67a commit 18d1dbf

File tree

6 files changed

+36
-36
lines changed

6 files changed

+36
-36
lines changed

fs/ecryptfs/crypto.c

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -119,21 +119,21 @@ static int ecryptfs_calculate_md5(char *dst,
119119
if (rc) {
120120
printk(KERN_ERR
121121
"%s: Error initializing crypto hash; rc = [%d]\n",
122-
__FUNCTION__, rc);
122+
__func__, rc);
123123
goto out;
124124
}
125125
rc = crypto_hash_update(&desc, &sg, len);
126126
if (rc) {
127127
printk(KERN_ERR
128128
"%s: Error updating crypto hash; rc = [%d]\n",
129-
__FUNCTION__, rc);
129+
__func__, rc);
130130
goto out;
131131
}
132132
rc = crypto_hash_final(&desc, dst);
133133
if (rc) {
134134
printk(KERN_ERR
135135
"%s: Error finalizing crypto hash; rc = [%d]\n",
136-
__FUNCTION__, rc);
136+
__func__, rc);
137137
goto out;
138138
}
139139
out:
@@ -437,7 +437,7 @@ static int ecryptfs_encrypt_extent(struct page *enc_extent_page,
437437
if (rc < 0) {
438438
printk(KERN_ERR "%s: Error attempting to encrypt page with "
439439
"page->index = [%ld], extent_offset = [%ld]; "
440-
"rc = [%d]\n", __FUNCTION__, page->index, extent_offset,
440+
"rc = [%d]\n", __func__, page->index, extent_offset,
441441
rc);
442442
goto out;
443443
}
@@ -487,7 +487,7 @@ int ecryptfs_encrypt_page(struct page *page)
487487
0, PAGE_CACHE_SIZE);
488488
if (rc)
489489
printk(KERN_ERR "%s: Error attempting to copy "
490-
"page at index [%ld]\n", __FUNCTION__,
490+
"page at index [%ld]\n", __func__,
491491
page->index);
492492
goto out;
493493
}
@@ -508,7 +508,7 @@ int ecryptfs_encrypt_page(struct page *page)
508508
extent_offset);
509509
if (rc) {
510510
printk(KERN_ERR "%s: Error encrypting extent; "
511-
"rc = [%d]\n", __FUNCTION__, rc);
511+
"rc = [%d]\n", __func__, rc);
512512
goto out;
513513
}
514514
ecryptfs_lower_offset_for_extent(
@@ -569,7 +569,7 @@ static int ecryptfs_decrypt_extent(struct page *page,
569569
if (rc < 0) {
570570
printk(KERN_ERR "%s: Error attempting to decrypt to page with "
571571
"page->index = [%ld], extent_offset = [%ld]; "
572-
"rc = [%d]\n", __FUNCTION__, page->index, extent_offset,
572+
"rc = [%d]\n", __func__, page->index, extent_offset,
573573
rc);
574574
goto out;
575575
}
@@ -622,7 +622,7 @@ int ecryptfs_decrypt_page(struct page *page)
622622
ecryptfs_inode);
623623
if (rc)
624624
printk(KERN_ERR "%s: Error attempting to copy "
625-
"page at index [%ld]\n", __FUNCTION__,
625+
"page at index [%ld]\n", __func__,
626626
page->index);
627627
goto out;
628628
}
@@ -656,7 +656,7 @@ int ecryptfs_decrypt_page(struct page *page)
656656
extent_offset);
657657
if (rc) {
658658
printk(KERN_ERR "%s: Error encrypting extent; "
659-
"rc = [%d]\n", __FUNCTION__, rc);
659+
"rc = [%d]\n", __func__, rc);
660660
goto out;
661661
}
662662
}
@@ -1215,7 +1215,7 @@ int ecryptfs_read_and_validate_header_region(char *data,
12151215
ecryptfs_inode);
12161216
if (rc) {
12171217
printk(KERN_ERR "%s: Error reading header region; rc = [%d]\n",
1218-
__FUNCTION__, rc);
1218+
__func__, rc);
12191219
goto out;
12201220
}
12211221
if (!contains_ecryptfs_marker(data + ECRYPTFS_FILE_SIZE_BYTES)) {
@@ -1319,7 +1319,7 @@ ecryptfs_write_metadata_to_contents(struct ecryptfs_crypt_stat *crypt_stat,
13191319
0, crypt_stat->num_header_bytes_at_front);
13201320
if (rc)
13211321
printk(KERN_ERR "%s: Error attempting to write header "
1322-
"information to lower file; rc = [%d]\n", __FUNCTION__,
1322+
"information to lower file; rc = [%d]\n", __func__,
13231323
rc);
13241324
return rc;
13251325
}
@@ -1364,22 +1364,22 @@ int ecryptfs_write_metadata(struct dentry *ecryptfs_dentry)
13641364
}
13651365
} else {
13661366
printk(KERN_WARNING "%s: Encrypted flag not set\n",
1367-
__FUNCTION__);
1367+
__func__);
13681368
rc = -EINVAL;
13691369
goto out;
13701370
}
13711371
/* Released in this function */
13721372
virt = kzalloc(crypt_stat->num_header_bytes_at_front, GFP_KERNEL);
13731373
if (!virt) {
1374-
printk(KERN_ERR "%s: Out of memory\n", __FUNCTION__);
1374+
printk(KERN_ERR "%s: Out of memory\n", __func__);
13751375
rc = -ENOMEM;
13761376
goto out;
13771377
}
13781378
rc = ecryptfs_write_headers_virt(virt, &size, crypt_stat,
13791379
ecryptfs_dentry);
13801380
if (unlikely(rc)) {
13811381
printk(KERN_ERR "%s: Error whilst writing headers; rc = [%d]\n",
1382-
__FUNCTION__, rc);
1382+
__func__, rc);
13831383
goto out_free;
13841384
}
13851385
if (crypt_stat->flags & ECRYPTFS_METADATA_IN_XATTR)
@@ -1390,7 +1390,7 @@ int ecryptfs_write_metadata(struct dentry *ecryptfs_dentry)
13901390
ecryptfs_dentry, virt);
13911391
if (rc) {
13921392
printk(KERN_ERR "%s: Error writing metadata out to lower file; "
1393-
"rc = [%d]\n", __FUNCTION__, rc);
1393+
"rc = [%d]\n", __func__, rc);
13941394
goto out_free;
13951395
}
13961396
out_free:
@@ -1584,7 +1584,7 @@ int ecryptfs_read_metadata(struct dentry *ecryptfs_dentry)
15841584
if (!page_virt) {
15851585
rc = -ENOMEM;
15861586
printk(KERN_ERR "%s: Unable to allocate page_virt\n",
1587-
__FUNCTION__);
1587+
__func__);
15881588
goto out;
15891589
}
15901590
rc = ecryptfs_read_lower(page_virt, 0, crypt_stat->extent_size,

fs/ecryptfs/ecryptfs_kernel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ ecryptfs_set_dentry_lower_mnt(struct dentry *dentry, struct vfsmount *lower_mnt)
500500
}
501501

502502
#define ecryptfs_printk(type, fmt, arg...) \
503-
__ecryptfs_printk(type "%s: " fmt, __FUNCTION__, ## arg);
503+
__ecryptfs_printk(type "%s: " fmt, __func__, ## arg);
504504
void __ecryptfs_printk(const char *fmt, ...);
505505

506506
extern const struct file_operations ecryptfs_main_fops;

fs/ecryptfs/inode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ ecryptfs_do_create(struct inode *directory_inode,
121121
ecryptfs_dentry, mode, nd);
122122
if (rc) {
123123
printk(KERN_ERR "%s: Failure to create dentry in lower fs; "
124-
"rc = [%d]\n", __FUNCTION__, rc);
124+
"rc = [%d]\n", __func__, rc);
125125
goto out_lock;
126126
}
127127
rc = ecryptfs_interpose(lower_dentry, ecryptfs_dentry,

fs/ecryptfs/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ int ecryptfs_interpose(struct dentry *lower_dentry, struct dentry *dentry,
219219
if (rc) {
220220
printk(KERN_ERR "%s: Error attempting to initialize the "
221221
"persistent file for the dentry with name [%s]; "
222-
"rc = [%d]\n", __FUNCTION__, dentry->d_name.name, rc);
222+
"rc = [%d]\n", __func__, dentry->d_name.name, rc);
223223
goto out;
224224
}
225225
out:

fs/ecryptfs/mmap.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ ecryptfs_copy_up_encrypted_with_header(struct page *page,
153153
flush_dcache_page(page);
154154
if (rc) {
155155
printk(KERN_ERR "%s: Error reading xattr "
156-
"region; rc = [%d]\n", __FUNCTION__, rc);
156+
"region; rc = [%d]\n", __func__, rc);
157157
goto out;
158158
}
159159
} else {
@@ -169,7 +169,7 @@ ecryptfs_copy_up_encrypted_with_header(struct page *page,
169169
if (rc) {
170170
printk(KERN_ERR "%s: Error attempting to read "
171171
"extent at offset [%lld] in the lower "
172-
"file; rc = [%d]\n", __FUNCTION__,
172+
"file; rc = [%d]\n", __func__,
173173
lower_offset, rc);
174174
goto out;
175175
}
@@ -212,7 +212,7 @@ static int ecryptfs_readpage(struct file *file, struct page *page)
212212
"the encrypted content from the lower "
213213
"file whilst inserting the metadata "
214214
"from the xattr into the header; rc = "
215-
"[%d]\n", __FUNCTION__, rc);
215+
"[%d]\n", __func__, rc);
216216
goto out;
217217
}
218218

@@ -293,7 +293,7 @@ static int ecryptfs_prepare_write(struct file *file, struct page *page,
293293
if (rc) {
294294
printk(KERN_ERR "%s: Error attemping to read "
295295
"lower page segment; rc = [%d]\n",
296-
__FUNCTION__, rc);
296+
__func__, rc);
297297
ClearPageUptodate(page);
298298
goto out;
299299
} else
@@ -308,7 +308,7 @@ static int ecryptfs_prepare_write(struct file *file, struct page *page,
308308
"from the lower file whilst "
309309
"inserting the metadata from "
310310
"the xattr into the header; rc "
311-
"= [%d]\n", __FUNCTION__, rc);
311+
"= [%d]\n", __func__, rc);
312312
ClearPageUptodate(page);
313313
goto out;
314314
}
@@ -320,7 +320,7 @@ static int ecryptfs_prepare_write(struct file *file, struct page *page,
320320
if (rc) {
321321
printk(KERN_ERR "%s: Error reading "
322322
"page; rc = [%d]\n",
323-
__FUNCTION__, rc);
323+
__func__, rc);
324324
ClearPageUptodate(page);
325325
goto out;
326326
}
@@ -331,7 +331,7 @@ static int ecryptfs_prepare_write(struct file *file, struct page *page,
331331
if (rc) {
332332
printk(KERN_ERR "%s: Error decrypting page "
333333
"at index [%ld]; rc = [%d]\n",
334-
__FUNCTION__, page->index, rc);
334+
__func__, page->index, rc);
335335
ClearPageUptodate(page);
336336
goto out;
337337
}
@@ -348,7 +348,7 @@ static int ecryptfs_prepare_write(struct file *file, struct page *page,
348348
if (rc) {
349349
printk(KERN_ERR "%s: Error on attempt to "
350350
"truncate to (higher) offset [%lld];"
351-
" rc = [%d]\n", __FUNCTION__,
351+
" rc = [%d]\n", __func__,
352352
prev_page_end_size, rc);
353353
goto out;
354354
}
@@ -389,7 +389,7 @@ static int ecryptfs_write_inode_size_to_header(struct inode *ecryptfs_inode)
389389
kfree(file_size_virt);
390390
if (rc)
391391
printk(KERN_ERR "%s: Error writing file size to header; "
392-
"rc = [%d]\n", __FUNCTION__, rc);
392+
"rc = [%d]\n", __func__, rc);
393393
out:
394394
return rc;
395395
}

fs/ecryptfs/read_write.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ int ecryptfs_write_lower(struct inode *ecryptfs_inode, char *data,
5555
set_fs(fs_save);
5656
if (octets_written < 0) {
5757
printk(KERN_ERR "%s: octets_written = [%td]; "
58-
"expected [%td]\n", __FUNCTION__, octets_written, size);
58+
"expected [%td]\n", __func__, octets_written, size);
5959
rc = -EINVAL;
6060
}
6161
mutex_unlock(&inode_info->lower_file_mutex);
@@ -153,7 +153,7 @@ int ecryptfs_write(struct file *ecryptfs_file, char *data, loff_t offset,
153153
rc = PTR_ERR(ecryptfs_page);
154154
printk(KERN_ERR "%s: Error getting page at "
155155
"index [%ld] from eCryptfs inode "
156-
"mapping; rc = [%d]\n", __FUNCTION__,
156+
"mapping; rc = [%d]\n", __func__,
157157
ecryptfs_page_idx, rc);
158158
goto out;
159159
}
@@ -165,7 +165,7 @@ int ecryptfs_write(struct file *ecryptfs_file, char *data, loff_t offset,
165165
if (rc) {
166166
printk(KERN_ERR "%s: Error decrypting "
167167
"page; rc = [%d]\n",
168-
__FUNCTION__, rc);
168+
__func__, rc);
169169
ClearPageUptodate(ecryptfs_page);
170170
page_cache_release(ecryptfs_page);
171171
goto out;
@@ -202,7 +202,7 @@ int ecryptfs_write(struct file *ecryptfs_file, char *data, loff_t offset,
202202
page_cache_release(ecryptfs_page);
203203
if (rc) {
204204
printk(KERN_ERR "%s: Error encrypting "
205-
"page; rc = [%d]\n", __FUNCTION__, rc);
205+
"page; rc = [%d]\n", __func__, rc);
206206
goto out;
207207
}
208208
pos += num_bytes;
@@ -254,7 +254,7 @@ int ecryptfs_read_lower(char *data, loff_t offset, size_t size,
254254
set_fs(fs_save);
255255
if (octets_read < 0) {
256256
printk(KERN_ERR "%s: octets_read = [%td]; "
257-
"expected [%td]\n", __FUNCTION__, octets_read, size);
257+
"expected [%td]\n", __func__, octets_read, size);
258258
rc = -EINVAL;
259259
}
260260
mutex_unlock(&inode_info->lower_file_mutex);
@@ -327,7 +327,7 @@ int ecryptfs_read(char *data, loff_t offset, size_t size,
327327
printk(KERN_ERR "%s: Attempt to read data past the end of the "
328328
"file; offset = [%lld]; size = [%td]; "
329329
"ecryptfs_file_size = [%lld]\n",
330-
__FUNCTION__, offset, size, ecryptfs_file_size);
330+
__func__, offset, size, ecryptfs_file_size);
331331
goto out;
332332
}
333333
pos = offset;
@@ -345,14 +345,14 @@ int ecryptfs_read(char *data, loff_t offset, size_t size,
345345
rc = PTR_ERR(ecryptfs_page);
346346
printk(KERN_ERR "%s: Error getting page at "
347347
"index [%ld] from eCryptfs inode "
348-
"mapping; rc = [%d]\n", __FUNCTION__,
348+
"mapping; rc = [%d]\n", __func__,
349349
ecryptfs_page_idx, rc);
350350
goto out;
351351
}
352352
rc = ecryptfs_decrypt_page(ecryptfs_page);
353353
if (rc) {
354354
printk(KERN_ERR "%s: Error decrypting "
355-
"page; rc = [%d]\n", __FUNCTION__, rc);
355+
"page; rc = [%d]\n", __func__, rc);
356356
ClearPageUptodate(ecryptfs_page);
357357
page_cache_release(ecryptfs_page);
358358
goto out;

0 commit comments

Comments
 (0)