svn commit: r234540 - head/sys/dev/dpt

Dimitry Andric dim at FreeBSD.org
Sat Apr 21 14:23:47 UTC 2012


Author: dim
Date: Sat Apr 21 14:23:46 2012
New Revision: 234540
URL: http://svn.freebsd.org/changeset/base/234540

Log:
  Fix the following clang warning in dpt(4):
  
    sys/dev/dpt/dpt_scsi.c:612:18: error: implicit truncation from 'int' to bitfield changes value from -2 to 2 [-Werror,-Wconstant-conversion]
      dpt->cache_type = DPT_CACHE_WRITEBACK;
  	      ^ ~~~~~~~~~~~~~~~~~~~
  
  by defining DPT_CACHE_WRITEBACK as 2, since dpt_softc::cache_type is an
  unsigned bitfield.  No binary change.
  
  MFC after:	1 week

Modified:
  head/sys/dev/dpt/dpt.h

Modified: head/sys/dev/dpt/dpt.h
==============================================================================
--- head/sys/dev/dpt/dpt.h	Sat Apr 21 11:53:24 2012	(r234539)
+++ head/sys/dev/dpt/dpt.h	Sat Apr 21 14:23:46 2012	(r234540)
@@ -142,7 +142,7 @@ typedef void *physaddr;
  */
 #define DPT_NO_CACHE		       	0
 #define DPT_CACHE_WRITETHROUGH		1
-#define DPT_CACHE_WRITEBACK			-2
+#define DPT_CACHE_WRITEBACK		2
 
 #define min(a,b) ((a<b)?(a):(b))
 


More information about the svn-src-head mailing list