summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2019-07-03 09:50:37 -0400
committerTrond Myklebust <trond.myklebust@hammerspace.com>2019-07-13 11:47:49 -0400
commit1c316e39a03af7b3e397f45d65fe00653996c467 (patch)
tree4e61b4fe0fcffc05d77d9ce62868028b617b0848
parent9bcaa35c686d65091e833f6c97a20baa31d0e870 (diff)
NFS: Replace 16 seq_printf() calls by seq_puts()
Some strings should be put into a sequence. Thus use the corresponding function “seq_puts”. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
-rw-r--r--fs/nfs/super.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 6f1749e70202..3683d2b1cc8e 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -587,7 +587,7 @@ static void nfs_show_mountd_options(struct seq_file *m, struct nfs_server *nfss,
587 } 587 }
588 default: 588 default:
589 if (showdefaults) 589 if (showdefaults)
590 seq_printf(m, ",mountaddr=unspecified"); 590 seq_puts(m, ",mountaddr=unspecified");
591 } 591 }
592 592
593 if (nfss->mountd_version || showdefaults) 593 if (nfss->mountd_version || showdefaults)
@@ -697,29 +697,29 @@ static void nfs_show_mount_options(struct seq_file *m, struct nfs_server *nfss,
697 nfs_show_nfsv4_options(m, nfss, showdefaults); 697 nfs_show_nfsv4_options(m, nfss, showdefaults);
698 698
699 if (nfss->options & NFS_OPTION_FSCACHE) 699 if (nfss->options & NFS_OPTION_FSCACHE)
700 seq_printf(m, ",fsc"); 700 seq_puts(m, ",fsc");
701 701
702 if (nfss->options & NFS_OPTION_MIGRATION) 702 if (nfss->options & NFS_OPTION_MIGRATION)
703 seq_printf(m, ",migration"); 703 seq_puts(m, ",migration");
704 704
705 if (nfss->flags & NFS_MOUNT_LOOKUP_CACHE_NONEG) { 705 if (nfss->flags & NFS_MOUNT_LOOKUP_CACHE_NONEG) {
706 if (nfss->flags & NFS_MOUNT_LOOKUP_CACHE_NONE) 706 if (nfss->flags & NFS_MOUNT_LOOKUP_CACHE_NONE)
707 seq_printf(m, ",lookupcache=none"); 707 seq_puts(m, ",lookupcache=none");
708 else 708 else
709 seq_printf(m, ",lookupcache=pos"); 709 seq_puts(m, ",lookupcache=pos");
710 } 710 }
711 711
712 local_flock = nfss->flags & NFS_MOUNT_LOCAL_FLOCK; 712 local_flock = nfss->flags & NFS_MOUNT_LOCAL_FLOCK;
713 local_fcntl = nfss->flags & NFS_MOUNT_LOCAL_FCNTL; 713 local_fcntl = nfss->flags & NFS_MOUNT_LOCAL_FCNTL;
714 714
715 if (!local_flock && !local_fcntl) 715 if (!local_flock && !local_fcntl)
716 seq_printf(m, ",local_lock=none"); 716 seq_puts(m, ",local_lock=none");
717 else if (local_flock && local_fcntl) 717 else if (local_flock && local_fcntl)
718 seq_printf(m, ",local_lock=all"); 718 seq_puts(m, ",local_lock=all");
719 else if (local_flock) 719 else if (local_flock)
720 seq_printf(m, ",local_lock=flock"); 720 seq_puts(m, ",local_lock=flock");
721 else 721 else
722 seq_printf(m, ",local_lock=posix"); 722 seq_puts(m, ",local_lock=posix");
723} 723}
724 724
725/* 725/*
@@ -756,7 +756,7 @@ static void show_lease(struct seq_file *m, struct nfs_server *server)
756static void show_sessions(struct seq_file *m, struct nfs_server *server) 756static void show_sessions(struct seq_file *m, struct nfs_server *server)
757{ 757{
758 if (nfs4_has_session(server->nfs_client)) 758 if (nfs4_has_session(server->nfs_client))
759 seq_printf(m, ",sessions"); 759 seq_puts(m, ",sessions");
760} 760}
761#else 761#else
762static void show_sessions(struct seq_file *m, struct nfs_server *server) {} 762static void show_sessions(struct seq_file *m, struct nfs_server *server) {}
@@ -833,7 +833,7 @@ int nfs_show_stats(struct seq_file *m, struct dentry *root)
833 /* 833 /*
834 * Display all mount option settings 834 * Display all mount option settings
835 */ 835 */
836 seq_printf(m, "\n\topts:\t"); 836 seq_puts(m, "\n\topts:\t");
837 seq_puts(m, sb_rdonly(root->d_sb) ? "ro" : "rw"); 837 seq_puts(m, sb_rdonly(root->d_sb) ? "ro" : "rw");
838 seq_puts(m, root->d_sb->s_flags & SB_SYNCHRONOUS ? ",sync" : ""); 838 seq_puts(m, root->d_sb->s_flags & SB_SYNCHRONOUS ? ",sync" : "");
839 seq_puts(m, root->d_sb->s_flags & SB_NOATIME ? ",noatime" : ""); 839 seq_puts(m, root->d_sb->s_flags & SB_NOATIME ? ",noatime" : "");
@@ -844,7 +844,7 @@ int nfs_show_stats(struct seq_file *m, struct dentry *root)
844 844
845 show_implementation_id(m, nfss); 845 show_implementation_id(m, nfss);
846 846
847 seq_printf(m, "\n\tcaps:\t"); 847 seq_puts(m, "\n\tcaps:\t");
848 seq_printf(m, "caps=0x%x", nfss->caps); 848 seq_printf(m, "caps=0x%x", nfss->caps);
849 seq_printf(m, ",wtmult=%u", nfss->wtmult); 849 seq_printf(m, ",wtmult=%u", nfss->wtmult);
850 seq_printf(m, ",dtsize=%u", nfss->dtsize); 850 seq_printf(m, ",dtsize=%u", nfss->dtsize);
@@ -853,7 +853,7 @@ int nfs_show_stats(struct seq_file *m, struct dentry *root)
853 853
854#if IS_ENABLED(CONFIG_NFS_V4) 854#if IS_ENABLED(CONFIG_NFS_V4)
855 if (nfss->nfs_client->rpc_ops->version == 4) { 855 if (nfss->nfs_client->rpc_ops->version == 4) {
856 seq_printf(m, "\n\tnfsv4:\t"); 856 seq_puts(m, "\n\tnfsv4:\t");
857 seq_printf(m, "bm0=0x%x", nfss->attr_bitmask[0]); 857 seq_printf(m, "bm0=0x%x", nfss->attr_bitmask[0]);
858 seq_printf(m, ",bm1=0x%x", nfss->attr_bitmask[1]); 858 seq_printf(m, ",bm1=0x%x", nfss->attr_bitmask[1]);
859 seq_printf(m, ",bm2=0x%x", nfss->attr_bitmask[2]); 859 seq_printf(m, ",bm2=0x%x", nfss->attr_bitmask[2]);
@@ -892,15 +892,15 @@ int nfs_show_stats(struct seq_file *m, struct dentry *root)
892 preempt_enable(); 892 preempt_enable();
893 } 893 }
894 894
895 seq_printf(m, "\n\tevents:\t"); 895 seq_puts(m, "\n\tevents:\t");
896 for (i = 0; i < __NFSIOS_COUNTSMAX; i++) 896 for (i = 0; i < __NFSIOS_COUNTSMAX; i++)
897 seq_printf(m, "%lu ", totals.events[i]); 897 seq_printf(m, "%lu ", totals.events[i]);
898 seq_printf(m, "\n\tbytes:\t"); 898 seq_puts(m, "\n\tbytes:\t");
899 for (i = 0; i < __NFSIOS_BYTESMAX; i++) 899 for (i = 0; i < __NFSIOS_BYTESMAX; i++)
900 seq_printf(m, "%Lu ", totals.bytes[i]); 900 seq_printf(m, "%Lu ", totals.bytes[i]);
901#ifdef CONFIG_NFS_FSCACHE 901#ifdef CONFIG_NFS_FSCACHE
902 if (nfss->options & NFS_OPTION_FSCACHE) { 902 if (nfss->options & NFS_OPTION_FSCACHE) {
903 seq_printf(m, "\n\tfsc:\t"); 903 seq_puts(m, "\n\tfsc:\t");
904 for (i = 0; i < __NFSIOS_FSCACHEMAX; i++) 904 for (i = 0; i < __NFSIOS_FSCACHEMAX; i++)
905 seq_printf(m, "%Lu ", totals.fscache[i]); 905 seq_printf(m, "%Lu ", totals.fscache[i]);
906 } 906 }