Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Apr 2012 14:23:47 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r234540 - head/sys/dev/dpt
Message-ID:  <201204211423.q3LENlPh091471@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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))
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204211423.q3LENlPh091471>