aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2014-08-27 09:49:44 -0400
committerSteve French <steve.french@primarydata.com>2014-12-07 23:48:07 -0500
commit0b456f04bcdf5b1151136adaada158bfc26f1be7 (patch)
treec9ba14522dc965b4649c64fed7dec7cf77dcdb1e /fs/cifs/connect.c
parent55d83e0dbb3ed91e05b11ef32afb30acfbf8ba45 (diff)
cifs: convert printk(LEVEL...) to pr_<level>
The useful macros embed message level in the name. Thus, it cleans up the code a bit. In cases when it was plain printk() the conversion was done to info level. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Steve French <steve.french@primarydata.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r--fs/cifs/connect.c51
1 files changed, 18 insertions, 33 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 24fa08d261fb..2a772da16b83 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -1466,9 +1466,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
1466 vol->seal = 1; 1466 vol->seal = 1;
1467 break; 1467 break;
1468 case Opt_noac: 1468 case Opt_noac:
1469 printk(KERN_WARNING "CIFS: Mount option noac not " 1469 pr_warn("CIFS: Mount option noac not supported. Instead set /proc/fs/cifs/LookupCacheEnabled to 0\n");
1470 "supported. Instead set "
1471 "/proc/fs/cifs/LookupCacheEnabled to 0\n");
1472 break; 1470 break;
1473 case Opt_fsc: 1471 case Opt_fsc:
1474#ifndef CONFIG_CIFS_FSCACHE 1472#ifndef CONFIG_CIFS_FSCACHE
@@ -1598,7 +1596,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
1598 1596
1599 if (strnlen(string, CIFS_MAX_USERNAME_LEN) > 1597 if (strnlen(string, CIFS_MAX_USERNAME_LEN) >
1600 CIFS_MAX_USERNAME_LEN) { 1598 CIFS_MAX_USERNAME_LEN) {
1601 printk(KERN_WARNING "CIFS: username too long\n"); 1599 pr_warn("CIFS: username too long\n");
1602 goto cifs_parse_mount_err; 1600 goto cifs_parse_mount_err;
1603 } 1601 }
1604 vol->username = kstrdup(string, GFP_KERNEL); 1602 vol->username = kstrdup(string, GFP_KERNEL);
@@ -1662,8 +1660,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
1662 temp_len = strlen(value); 1660 temp_len = strlen(value);
1663 vol->password = kzalloc(temp_len+1, GFP_KERNEL); 1661 vol->password = kzalloc(temp_len+1, GFP_KERNEL);
1664 if (vol->password == NULL) { 1662 if (vol->password == NULL) {
1665 printk(KERN_WARNING "CIFS: no memory " 1663 pr_warn("CIFS: no memory for password\n");
1666 "for password\n");
1667 goto cifs_parse_mount_err; 1664 goto cifs_parse_mount_err;
1668 } 1665 }
1669 1666
@@ -1687,8 +1684,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
1687 1684
1688 if (!cifs_convert_address(dstaddr, string, 1685 if (!cifs_convert_address(dstaddr, string,
1689 strlen(string))) { 1686 strlen(string))) {
1690 printk(KERN_ERR "CIFS: bad ip= option (%s).\n", 1687 pr_err("CIFS: bad ip= option (%s).\n", string);
1691 string);
1692 goto cifs_parse_mount_err; 1688 goto cifs_parse_mount_err;
1693 } 1689 }
1694 got_ip = true; 1690 got_ip = true;
@@ -1700,15 +1696,13 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
1700 1696
1701 if (strnlen(string, CIFS_MAX_DOMAINNAME_LEN) 1697 if (strnlen(string, CIFS_MAX_DOMAINNAME_LEN)
1702 == CIFS_MAX_DOMAINNAME_LEN) { 1698 == CIFS_MAX_DOMAINNAME_LEN) {
1703 printk(KERN_WARNING "CIFS: domain name too" 1699 pr_warn("CIFS: domain name too long\n");
1704 " long\n");
1705 goto cifs_parse_mount_err; 1700 goto cifs_parse_mount_err;
1706 } 1701 }
1707 1702
1708 vol->domainname = kstrdup(string, GFP_KERNEL); 1703 vol->domainname = kstrdup(string, GFP_KERNEL);
1709 if (!vol->domainname) { 1704 if (!vol->domainname) {
1710 printk(KERN_WARNING "CIFS: no memory " 1705 pr_warn("CIFS: no memory for domainname\n");
1711 "for domainname\n");
1712 goto cifs_parse_mount_err; 1706 goto cifs_parse_mount_err;
1713 } 1707 }
1714 cifs_dbg(FYI, "Domain name set\n"); 1708 cifs_dbg(FYI, "Domain name set\n");
@@ -1721,8 +1715,8 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
1721 if (!cifs_convert_address( 1715 if (!cifs_convert_address(
1722 (struct sockaddr *)&vol->srcaddr, 1716 (struct sockaddr *)&vol->srcaddr,
1723 string, strlen(string))) { 1717 string, strlen(string))) {
1724 printk(KERN_WARNING "CIFS: Could not parse" 1718 pr_warn("CIFS: Could not parse srcaddr: %s\n",
1725 " srcaddr: %s\n", string); 1719 string);
1726 goto cifs_parse_mount_err; 1720 goto cifs_parse_mount_err;
1727 } 1721 }
1728 break; 1722 break;
@@ -1732,8 +1726,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
1732 goto out_nomem; 1726 goto out_nomem;
1733 1727
1734 if (strnlen(string, 1024) >= 65) { 1728 if (strnlen(string, 1024) >= 65) {
1735 printk(KERN_WARNING "CIFS: iocharset name " 1729 pr_warn("CIFS: iocharset name too long.\n");
1736 "too long.\n");
1737 goto cifs_parse_mount_err; 1730 goto cifs_parse_mount_err;
1738 } 1731 }
1739 1732
@@ -1741,8 +1734,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
1741 vol->iocharset = kstrdup(string, 1734 vol->iocharset = kstrdup(string,
1742 GFP_KERNEL); 1735 GFP_KERNEL);
1743 if (!vol->iocharset) { 1736 if (!vol->iocharset) {
1744 printk(KERN_WARNING "CIFS: no memory" 1737 pr_warn("CIFS: no memory for charset\n");
1745 "for charset\n");
1746 goto cifs_parse_mount_err; 1738 goto cifs_parse_mount_err;
1747 } 1739 }
1748 } 1740 }
@@ -1773,9 +1765,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
1773 * set at top of the function 1765 * set at top of the function
1774 */ 1766 */
1775 if (i == RFC1001_NAME_LEN && string[i] != 0) 1767 if (i == RFC1001_NAME_LEN && string[i] != 0)
1776 printk(KERN_WARNING "CIFS: netbiosname" 1768 pr_warn("CIFS: netbiosname longer than 15 truncated.\n");
1777 " longer than 15 truncated.\n");
1778
1779 break; 1769 break;
1780 case Opt_servern: 1770 case Opt_servern:
1781 /* servernetbiosname specified override *SMBSERVER */ 1771 /* servernetbiosname specified override *SMBSERVER */
@@ -1801,8 +1791,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
1801 /* The string has 16th byte zero still from 1791 /* The string has 16th byte zero still from
1802 set at top of the function */ 1792 set at top of the function */
1803 if (i == RFC1001_NAME_LEN && string[i] != 0) 1793 if (i == RFC1001_NAME_LEN && string[i] != 0)
1804 printk(KERN_WARNING "CIFS: server net" 1794 pr_warn("CIFS: server netbiosname longer than 15 truncated.\n");
1805 "biosname longer than 15 truncated.\n");
1806 break; 1795 break;
1807 case Opt_ver: 1796 case Opt_ver:
1808 string = match_strdup(args); 1797 string = match_strdup(args);
@@ -1814,8 +1803,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
1814 break; 1803 break;
1815 } 1804 }
1816 /* For all other value, error */ 1805 /* For all other value, error */
1817 printk(KERN_WARNING "CIFS: Invalid version" 1806 pr_warn("CIFS: Invalid version specified\n");
1818 " specified\n");
1819 goto cifs_parse_mount_err; 1807 goto cifs_parse_mount_err;
1820 case Opt_vers: 1808 case Opt_vers:
1821 string = match_strdup(args); 1809 string = match_strdup(args);
@@ -1856,7 +1844,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
1856 } 1844 }
1857 1845
1858 if (!sloppy && invalid) { 1846 if (!sloppy && invalid) {
1859 printk(KERN_ERR "CIFS: Unknown mount option \"%s\"\n", invalid); 1847 pr_err("CIFS: Unknown mount option \"%s\"\n", invalid);
1860 goto cifs_parse_mount_err; 1848 goto cifs_parse_mount_err;
1861 } 1849 }
1862 1850
@@ -1882,8 +1870,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
1882 /* No ip= option specified? Try to get it from UNC */ 1870 /* No ip= option specified? Try to get it from UNC */
1883 if (!cifs_convert_address(dstaddr, &vol->UNC[2], 1871 if (!cifs_convert_address(dstaddr, &vol->UNC[2],
1884 strlen(&vol->UNC[2]))) { 1872 strlen(&vol->UNC[2]))) {
1885 printk(KERN_ERR "Unable to determine destination " 1873 pr_err("Unable to determine destination address.\n");
1886 "address.\n");
1887 goto cifs_parse_mount_err; 1874 goto cifs_parse_mount_err;
1888 } 1875 }
1889 } 1876 }
@@ -1894,20 +1881,18 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
1894 if (uid_specified) 1881 if (uid_specified)
1895 vol->override_uid = override_uid; 1882 vol->override_uid = override_uid;
1896 else if (override_uid == 1) 1883 else if (override_uid == 1)
1897 printk(KERN_NOTICE "CIFS: ignoring forceuid mount option " 1884 pr_notice("CIFS: ignoring forceuid mount option specified with no uid= option.\n");
1898 "specified with no uid= option.\n");
1899 1885
1900 if (gid_specified) 1886 if (gid_specified)
1901 vol->override_gid = override_gid; 1887 vol->override_gid = override_gid;
1902 else if (override_gid == 1) 1888 else if (override_gid == 1)
1903 printk(KERN_NOTICE "CIFS: ignoring forcegid mount option " 1889 pr_notice("CIFS: ignoring forcegid mount option specified with no gid= option.\n");
1904 "specified with no gid= option.\n");
1905 1890
1906 kfree(mountdata_copy); 1891 kfree(mountdata_copy);
1907 return 0; 1892 return 0;
1908 1893
1909out_nomem: 1894out_nomem:
1910 printk(KERN_WARNING "Could not allocate temporary buffer\n"); 1895 pr_warn("Could not allocate temporary buffer\n");
1911cifs_parse_mount_err: 1896cifs_parse_mount_err:
1912 kfree(string); 1897 kfree(string);
1913 kfree(mountdata_copy); 1898 kfree(mountdata_copy);