svn commit: r245940 - stable/8/sys/dev/hpt27xx

Xin LI delphij at FreeBSD.org
Sat Jan 26 05:25:33 UTC 2013


Author: delphij
Date: Sat Jan 26 05:25:32 2013
New Revision: 245940
URL: http://svnweb.freebsd.org/changeset/base/245940

Log:
  MFC r245768:
  
   - Don't include date and time the driver is built, this is useful for
     generating binary diffs.
   - Constify a few strings used in the driver.
   - Style changes to make the driver compile with default clang settings.
  
  Approved by:	HighPoint Technologies

Modified:
  stable/8/sys/dev/hpt27xx/hpt27xx_config.c
  stable/8/sys/dev/hpt27xx/os_bsd.h
  stable/8/sys/dev/hpt27xx/osm_bsd.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/conf/   (props changed)
  stable/8/sys/dev/   (props changed)
  stable/8/sys/dev/hpt27xx/   (props changed)
  stable/8/sys/modules/   (props changed)

Modified: stable/8/sys/dev/hpt27xx/hpt27xx_config.c
==============================================================================
--- stable/8/sys/dev/hpt27xx/hpt27xx_config.c	Sat Jan 26 05:23:17 2013	(r245939)
+++ stable/8/sys/dev/hpt27xx/hpt27xx_config.c	Sat Jan 26 05:25:32 2013	(r245940)
@@ -58,9 +58,9 @@ int init_config(void)
 	return 0;
 }
 
-char driver_name[] = "hpt27xx";
-char driver_name_long[] = "RocketRAID 27xx controller driver";
-char driver_ver[] = "v1.0 (" __DATE__ " " __TIME__ ")";
+const char driver_name[] = "hpt27xx";
+const char driver_name_long[] = "RocketRAID 27xx controller driver";
+const char driver_ver[] = "v1.0";
 int  osm_max_targets = 0xff;
 
 

Modified: stable/8/sys/dev/hpt27xx/os_bsd.h
==============================================================================
--- stable/8/sys/dev/hpt27xx/os_bsd.h	Sat Jan 26 05:23:17 2013	(r245939)
+++ stable/8/sys/dev/hpt27xx/os_bsd.h	Sat Jan 26 05:25:32 2013	(r245940)
@@ -135,9 +135,9 @@ INQUIRYDATA, *PINQUIRYDATA;
 #include <dev/hpt27xx/ldm.h>
 
 /* driver parameters */
-extern char driver_name[];
-extern char driver_name_long[];
-extern char driver_ver[];
+extern const char driver_name[];
+extern const char driver_name_long[];
+extern const char driver_ver[];
 extern int  osm_max_targets;
 
 /*

Modified: stable/8/sys/dev/hpt27xx/osm_bsd.c
==============================================================================
--- stable/8/sys/dev/hpt27xx/osm_bsd.c	Sat Jan 26 05:23:17 2013	(r245939)
+++ stable/8/sys/dev/hpt27xx/osm_bsd.c	Sat Jan 26 05:25:32 2013	(r245940)
@@ -167,7 +167,8 @@ static int hpt_alloc_mem(PVBUS_EXT vbus_
 
 		HPT_ASSERT((f->size & (f->alignment-1))==0);
 
-		for (order=0, size=PAGE_SIZE; size<f->size; order++, size<<=1) ;
+		for (order=0, size=PAGE_SIZE; size<f->size; order++, size<<=1)
+			;
 
 		KdPrint(("%s: %d*%d=%d bytes, order %d",
 			f->tag, f->count, f->size, f->count*f->size, order));
@@ -1036,6 +1037,7 @@ static void hpt_final_init(void *dummy)
 	}
 
 	if (!i) {
+		if (bootverbose)
 			os_printk("no controller detected.");
 		return;
 	}
@@ -1177,7 +1179,7 @@ static void hpt_final_init(void *dummy)
 	}	
 
 	make_dev(&hpt_cdevsw, DRIVER_MINOR, UID_ROOT, GID_OPERATOR,
-	    S_IRUSR | S_IWUSR, driver_name);
+	    S_IRUSR | S_IWUSR, "%s", driver_name);
 }
 
 #if defined(KLD_MODULE) && (__FreeBSD_version >= 503000)
@@ -1224,6 +1226,7 @@ static void override_kernel_driver(void)
 
 static void hpt_init(void *dummy)
 {
+	if (bootverbose)
 		os_printk("%s %s", driver_name_long, driver_ver);
 
 	override_kernel_driver();


More information about the svn-src-all mailing list