@@ -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 }
139139out :
@@ -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 }
13961396out_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 ,
0 commit comments