svn commit: r326494 - in head: stand/zfs sys/cddl/boot/zfs

Warner Losh imp at FreeBSD.org
Sun Dec 3 04:55:38 UTC 2017


Author: imp
Date: Sun Dec  3 04:55:33 2017
New Revision: 326494
URL: https://svnweb.freebsd.org/changeset/base/326494

Log:
  Mark two things as unused (since they are only sometimes used) and
  toss in a DECONST to remove a const in some tricky code that would
  require too extensive a change to unwind otherwise.
  
  Sponsored by: Netflix

Modified:
  head/stand/zfs/zfsimpl.c
  head/sys/cddl/boot/zfs/zfssubr.c

Modified: head/stand/zfs/zfsimpl.c
==============================================================================
--- head/stand/zfs/zfsimpl.c	Sun Dec  3 04:55:28 2017	(r326493)
+++ head/stand/zfs/zfsimpl.c	Sun Dec  3 04:55:33 2017	(r326494)
@@ -43,7 +43,7 @@ struct zfsmount {
 	objset_phys_t	objset;
 	uint64_t	rootobj;
 };
-static struct zfsmount zfsmount;
+static struct zfsmount zfsmount __unused;
 
 /*
  * List of all vdevs, chained through v_alllink.

Modified: head/sys/cddl/boot/zfs/zfssubr.c
==============================================================================
--- head/sys/cddl/boot/zfs/zfssubr.c	Sun Dec  3 04:55:28 2017	(r326493)
+++ head/sys/cddl/boot/zfs/zfssubr.c	Sun Dec  3 04:55:33 2017	(r326494)
@@ -250,7 +250,7 @@ zio_checksum_template_init(enum zio_checksum checksum,
  * all of the checksum context templates and deallocates any that were
  * initialized using the algorithm-specific template init function.
  */
-static void
+static void __unused
 zio_checksum_templates_free(spa_t *spa)
 {
 	for (enum zio_checksum checksum = 0;
@@ -284,7 +284,7 @@ zio_checksum_verify(const spa_t *spa, const blkptr_t *
 		return (EINVAL);
 
 	if (spa != NULL) {
-		zio_checksum_template_init(checksum, (spa_t *) spa);
+		zio_checksum_template_init(checksum, __DECONST(spa_t *,spa));
 		ctx = spa->spa_cksum_tmpls[checksum];
 	}
 


More information about the svn-src-head mailing list