From 3625c7420b194b5474d73bb78f4894137d50e768 Mon Sep 17 00:00:00 2001
From: Dan McDonald <danmcd@joyent.com>
Date: Thu, 23 Jan 2020 21:23:46 -0500
Subject: [PATCH] Eliminate what pbchk noise I can

---
 usr/src/cmd/fs.d/nfs/svc/nfs-server        |  2 +-
 usr/src/cmd/fs.d/nfs/svc/nlockmgr.xml      |  2 +-
 usr/src/cmd/fs.d/nfs/svc/server.xml        |  2 +-
 usr/src/uts/common/fs/nfs/nfs4_dispatch.c  | 16 ++++++++--------
 usr/src/uts/common/fs/nfs/nfs4_srv.c       |  4 ++--
 usr/src/uts/common/fs/nfs/nfs4_srv_deleg.c |  4 +++-
 usr/src/uts/common/fs/nfs/nfs4_state.c     | 13 ++++++++-----
 usr/src/uts/common/fs/nfs/nfs_client.c     |  6 +++---
 usr/src/uts/common/fs/nfs/nfs_export.c     |  9 ++++-----
 usr/src/uts/common/fs/nfs/nfs_server.c     |  2 +-
 usr/src/uts/common/fs/sharefs/sharetab.c   |  2 +-
 usr/src/uts/common/nfs/nfs4_drc.h          | 14 +++++++-------
 usr/src/uts/common/sys/zone.h              |  2 +-
 13 files changed, 41 insertions(+), 37 deletions(-)

diff --git a/usr/src/cmd/fs.d/nfs/svc/nfs-server b/usr/src/cmd/fs.d/nfs/svc/nfs-server
index 001f9449fa..bf8e73be98 100644
--- a/usr/src/cmd/fs.d/nfs/svc/nfs-server
+++ b/usr/src/cmd/fs.d/nfs/svc/nfs-server
@@ -53,7 +53,7 @@ configure_ipfilter()
 
         #
 	# Nothing to do if:
-        # - ipfilter isn't online 
+        # - ipfilter isn't online
 	# - global policy is 'custom'
 	# - service's policy is 'use_global'
         #
diff --git a/usr/src/cmd/fs.d/nfs/svc/nlockmgr.xml b/usr/src/cmd/fs.d/nfs/svc/nlockmgr.xml
index ac50bbc4ee..957ff00856 100644
--- a/usr/src/cmd/fs.d/nfs/svc/nlockmgr.xml
+++ b/usr/src/cmd/fs.d/nfs/svc/nlockmgr.xml
@@ -67,7 +67,7 @@
 	    grouping='require_all'
 	    restart_on='error'
 	    type='service'>
-	    	<service_fmri value='svc:/system/filesystem/minimal' />
+		<service_fmri value='svc:/system/filesystem/minimal' />
 	</dependency>
 
 	<exec_method
diff --git a/usr/src/cmd/fs.d/nfs/svc/server.xml b/usr/src/cmd/fs.d/nfs/svc/server.xml
index 2d9c627f1e..d4d2cbb063 100644
--- a/usr/src/cmd/fs.d/nfs/svc/server.xml
+++ b/usr/src/cmd/fs.d/nfs/svc/server.xml
@@ -105,7 +105,7 @@
 	    grouping='require_all'
 	    restart_on='error'
 	    type='service'>
-	    	<service_fmri value='svc:/system/filesystem/local' />
+		<service_fmri value='svc:/system/filesystem/local' />
 	</dependency>
 
 	<dependent
diff --git a/usr/src/uts/common/fs/nfs/nfs4_dispatch.c b/usr/src/uts/common/fs/nfs/nfs4_dispatch.c
index 824b6267e7..1fdfd0f601 100644
--- a/usr/src/uts/common/fs/nfs/nfs4_dispatch.c
+++ b/usr/src/uts/common/fs/nfs/nfs4_dispatch.c
@@ -355,25 +355,25 @@ rfs4_find_dr(struct svc_req *req, rfs4_drc_t *drc, rfs4_dupreq_t **dup)
  *
  * Passed into this function are:-
  *
- * 	disp	A pointer to our dispatch table entry
- * 	req	The request to process
- * 	xprt	The server transport handle
- * 	ap	A pointer to the arguments
+ *	disp	A pointer to our dispatch table entry
+ *	req	The request to process
+ *	xprt	The server transport handle
+ *	ap	A pointer to the arguments
  *
  *
  * When appropriate this function is responsible for inserting
  * the reply into the duplicate cache or replaying an existing
  * cached reply.
  *
- * dr_stat 	reflects the state of the duplicate request that
- * 		has been inserted into or retrieved from the cache
+ * dr_stat	reflects the state of the duplicate request that
+ *		has been inserted into or retrieved from the cache
  *
  * drp		is the duplicate request entry
  *
  */
 int
-rfs4_dispatch(struct rpcdisp *disp, struct svc_req *req,
-		SVCXPRT *xprt, char *ap)
+rfs4_dispatch(struct rpcdisp *disp, struct svc_req *req, SVCXPRT *xprt,
+    char *ap)
 {
 
 	COMPOUND4res	 res_buf;
diff --git a/usr/src/uts/common/fs/nfs/nfs4_srv.c b/usr/src/uts/common/fs/nfs/nfs4_srv.c
index 850fe1bbdf..757964eb84 100644
--- a/usr/src/uts/common/fs/nfs/nfs4_srv.c
+++ b/usr/src/uts/common/fs/nfs/nfs4_srv.c
@@ -120,8 +120,8 @@ static int rdma_setup_read_data4(READ4args *, READ4res *);
  *	sizeof nfsstat4 (4 bytes) +
  *	sizeof verifier4 (8 bytes) +
  *	sizeof entry4list bool (4 bytes) +
- *	sizeof entry4 	(36 bytes) +
- *	sizeof eof bool  (4 bytes)
+ *	sizeof entry4 (36 bytes) +
+ *	sizeof eof bool (4 bytes)
  *
  * RFS4_MINLEN_RDDIR_BUF: minimum length of buffer server will provide to
  *	VOP_READDIR.  Its value is the size of the maximum possible dirent
diff --git a/usr/src/uts/common/fs/nfs/nfs4_srv_deleg.c b/usr/src/uts/common/fs/nfs/nfs4_srv_deleg.c
index af44a447ce..ea50f18d77 100644
--- a/usr/src/uts/common/fs/nfs/nfs4_srv_deleg.c
+++ b/usr/src/uts/common/fs/nfs/nfs4_srv_deleg.c
@@ -1273,8 +1273,10 @@ rfs4_grant_delegation(delegreq_t dreq, rfs4_state_t *sp, int *recall)
 	nsrv4 = nfs4_get_srv();
 
 	/* Is the server even providing delegations? */
-	if (nsrv4->nfs4_deleg_policy == SRV_NEVER_DELEGATE || dreq == DELEG_NONE)
+	if (nsrv4->nfs4_deleg_policy == SRV_NEVER_DELEGATE ||
+	    dreq == DELEG_NONE) {
 		return (NULL);
+	}
 
 	/* Check to see if delegations have been temporarily disabled */
 	mutex_enter(&nsrv4->deleg_lock);
diff --git a/usr/src/uts/common/fs/nfs/nfs4_state.c b/usr/src/uts/common/fs/nfs/nfs4_state.c
index 1f3724e7eb..0c1efb26df 100644
--- a/usr/src/uts/common/fs/nfs/nfs4_state.c
+++ b/usr/src/uts/common/fs/nfs/nfs4_state.c
@@ -403,7 +403,7 @@ static rfs4_ss_pn_t *
 rfs4_ss_pnalloc(char *dir, char *leaf)
 {
 	rfs4_ss_pn_t *ss_pn;
-	int 	dir_len, leaf_len;
+	int dir_len, leaf_len;
 
 	/*
 	 * validate we have a resonable path
@@ -1256,17 +1256,20 @@ rfs4_state_zone_init(nfs4_srv_t *nsrv4)
 	if (curzone == global_zone && rfs4_dss_numnewpaths > 0) {
 		int i;
 		char **dss_allpaths = NULL;
-		dss_allpaths = kmem_alloc(sizeof (char *) * (rfs4_dss_numnewpaths + 1), KM_SLEEP);
+		dss_allpaths = kmem_alloc(sizeof (char *) *
+		    (rfs4_dss_numnewpaths + 1), KM_SLEEP);
 		/*
 		 * Add the default path into the list of paths for saving
 		 * state informantion.
 		 */
 		dss_allpaths[0] = dss_path;
-		for ( i = 0; i < rfs4_dss_numnewpaths; i++) {
+		for (i = 0; i < rfs4_dss_numnewpaths; i++) {
 			dss_allpaths[i + 1] = rfs4_dss_newpaths[i];
 		}
-		rfs4_servinst_create(nsrv4, start_grace, (rfs4_dss_numnewpaths + 1), dss_allpaths);
-		kmem_free(dss_allpaths, (sizeof (char *) * (rfs4_dss_numnewpaths + 1)));
+		rfs4_servinst_create(nsrv4, start_grace,
+		    (rfs4_dss_numnewpaths + 1), dss_allpaths);
+		kmem_free(dss_allpaths,
+		    (sizeof (char *) * (rfs4_dss_numnewpaths + 1)));
 	} else {
 		rfs4_servinst_create(nsrv4, start_grace, 1, &dss_path);
 	}
diff --git a/usr/src/uts/common/fs/nfs/nfs_client.c b/usr/src/uts/common/fs/nfs/nfs_client.c
index 719fc04db2..c88cff3739 100644
--- a/usr/src/uts/common/fs/nfs/nfs_client.c
+++ b/usr/src/uts/common/fs/nfs/nfs_client.c
@@ -24,7 +24,7 @@
  */
 
 /*
- *  	Copyright (c) 1983,1984,1985,1986,1987,1988,1989  AT&T.
+ *	Copyright (c) 1983,1984,1985,1986,1987,1988,1989  AT&T.
  *	All rights reserved.
  */
 
@@ -2804,7 +2804,7 @@ nfs_mi_zonelist_remove(mntinfo_t *mi)
  * NFS Client initialization routine.  This routine should only be called
  * once.  It performs the following tasks:
  *	- Initalize all global locks
- * 	- Call sub-initialization routines (localize access to variables)
+ *	- Call sub-initialization routines (localize access to variables)
  */
 int
 nfs_clntinit(void)
@@ -3357,7 +3357,7 @@ nfs_free_delmapcall(nfs_delmapcall_t *delmap_call)
  * Returns:
  *	0 if the caller wasn't found
  *	1 if the caller was found, removed and freed.  *errp is set to what
- * 	the result of the delmap was.
+ *	the result of the delmap was.
  */
 int
 nfs_find_and_delete_delmapcall(rnode_t *rp, int *errp)
diff --git a/usr/src/uts/common/fs/nfs/nfs_export.c b/usr/src/uts/common/fs/nfs/nfs_export.c
index f8744f0ceb..080dfe1adf 100644
--- a/usr/src/uts/common/fs/nfs/nfs_export.c
+++ b/usr/src/uts/common/fs/nfs/nfs_export.c
@@ -24,7 +24,7 @@
  */
 
 /*
- *  	Copyright 1983, 1984, 1985, 1986, 1987, 1988, 1989  AT&T.
+ *	Copyright 1983, 1984, 1985, 1986, 1987, 1988, 1989  AT&T.
  *		All rights reserved.
  */
 
@@ -1011,9 +1011,8 @@ nfs_export_zone_shutdown(nfs_globals_t *ng)
 		}
 	}
 	if (errors > 0) {
-		cmn_err(CE_NOTE,
-		    "NFS: failed un-exports in zone %d",
-		    (int) ng->nfs_zoneid);
+		cmn_err(CE_NOTE, "NFS: failed un-exports in zone %d",
+		    (int)ng->nfs_zoneid);
 	}
 
 	rw_exit(&ne->exported_lock);
@@ -1069,7 +1068,7 @@ nfs_export_zone_fini(nfs_globals_t *ng)
 	if (i > 0) {
 		cmn_err(CE_NOTE,
 		    "NFS: zone %d has %d export IDs left after shutdown",
-		    (int) ng->nfs_zoneid, i);
+		    (int)ng->nfs_zoneid, i);
 	}
 	rw_destroy(&ne->exported_lock);
 	kmem_free(ne, sizeof (*ne));
diff --git a/usr/src/uts/common/fs/nfs/nfs_server.c b/usr/src/uts/common/fs/nfs/nfs_server.c
index e4d2269cd2..5b7658d048 100644
--- a/usr/src/uts/common/fs/nfs/nfs_server.c
+++ b/usr/src/uts/common/fs/nfs/nfs_server.c
@@ -2575,7 +2575,7 @@ nfs_srvinit(void)
 	/* Truly global stuff in this module (not per zone) */
 	rw_init(&nfssrv_globals_rwl, NULL, RW_DEFAULT, NULL);
 	list_create(&nfssrv_globals_list, sizeof (nfs_globals_t),
-	    offsetof (nfs_globals_t, nfs_g_link));
+	    offsetof(nfs_globals_t, nfs_g_link));
 	tsd_create(&nfs_server_tsd_key, NULL);
 
 	/* The order here is important */
diff --git a/usr/src/uts/common/fs/sharefs/sharetab.c b/usr/src/uts/common/fs/sharefs/sharetab.c
index 9a95f206eb..d66c1aa85f 100644
--- a/usr/src/uts/common/fs/sharefs/sharetab.c
+++ b/usr/src/uts/common/fs/sharefs/sharetab.c
@@ -25,7 +25,7 @@
 
 /*
  * Copyright 2018 Nexenta Systems, Inc.
- * Copyright 2019 Joyent, Inc.
+ * Copyright 2020 Joyent, Inc.
  */
 
 #include <sys/types.h>
diff --git a/usr/src/uts/common/nfs/nfs4_drc.h b/usr/src/uts/common/nfs/nfs4_drc.h
index 554e0f77ca..f42867d197 100644
--- a/usr/src/uts/common/nfs/nfs4_drc.h
+++ b/usr/src/uts/common/nfs/nfs4_drc.h
@@ -39,26 +39,26 @@ extern "C" {
  * NFSv4 Duplicate Request cache.
  */
 typedef struct rfs4_drc {
-	kmutex_t 	lock;
+	kmutex_t	lock;
 	uint32_t	dr_hash;
-	uint32_t 	max_size;
-	uint32_t 	in_use;
+	uint32_t	max_size;
+	uint32_t	in_use;
 	list_t		dr_cache;
-	list_t  	*dr_buckets;
+	list_t		*dr_buckets;
 } rfs4_drc_t;
 
 /*
  * NFSv4 Duplicate request cache entry.
  */
 typedef struct rfs4_dupreq {
-	list_node_t 	dr_bkt_next;
+	list_node_t	dr_bkt_next;
 	list_node_t	dr_next;
 	list_t		*dr_bkt;
 	rfs4_drc_t	*drc;
 	int		dr_state;
 	uint32_t	dr_xid;
 	struct netbuf	dr_addr;
-	COMPOUND4res 	dr_res;
+	COMPOUND4res	dr_res;
 } rfs4_dupreq_t;
 
 /*
@@ -70,7 +70,7 @@ typedef struct rfs4_dupreq {
 #define	NFS4_DUP_PENDING	2
 #define	NFS4_DUP_FREE		3
 
-#define	NFS4_DUP_REPLAY 	4
+#define	NFS4_DUP_REPLAY		4
 #define	NFS4_DUP_INUSE		5
 
 extern uint32_t nfs4_drc_max;
diff --git a/usr/src/uts/common/sys/zone.h b/usr/src/uts/common/sys/zone.h
index defa263761..15b416429e 100644
--- a/usr/src/uts/common/sys/zone.h
+++ b/usr/src/uts/common/sys/zone.h
@@ -22,8 +22,8 @@
 /*
  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2014 Igor Kozhukhov <ikozhukhov@gmail.com>.
- * Copyright 2019 Joyent, Inc.
  * Copyright 2019 Nexenta Systems, Inc. All rights reserved.
+ * Copyright 2020 Joyent, Inc.
  */
 
 #ifndef _SYS_ZONE_H
-- 
2.23.0

