From owner-svn-src-all@FreeBSD.ORG Tue Jan 22 05:41:36 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 918D4323; Tue, 22 Jan 2013 05:41:36 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 75B65622; Tue, 22 Jan 2013 05:41:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0M5faE4025954; Tue, 22 Jan 2013 05:41:36 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0M5fZmL025945; Tue, 22 Jan 2013 05:41:35 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201301220541.r0M5fZmL025945@svn.freebsd.org> From: Xin LI Date: Tue, 22 Jan 2013 05:41:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245768 - in head/sys: conf dev/hpt27xx modules/hpt27xx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jan 2013 05:41:36 -0000 Author: delphij Date: Tue Jan 22 05:41:34 2013 New Revision: 245768 URL: http://svnweb.freebsd.org/changeset/base/245768 Log: - 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 MFC after: 3 days Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/dev/hpt27xx/hpt27xx_config.c head/sys/dev/hpt27xx/os_bsd.h head/sys/dev/hpt27xx/osm_bsd.c head/sys/modules/hpt27xx/Makefile Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Tue Jan 22 05:39:34 2013 (r245767) +++ head/sys/conf/files.amd64 Tue Jan 22 05:41:34 2013 (r245768) @@ -190,8 +190,7 @@ dev/fdc/fdc_acpi.c optional fdc dev/fdc/fdc_isa.c optional fdc isa dev/fdc/fdc_pccard.c optional fdc pccard dev/hpt27xx/os_bsd.c optional hpt27xx -dev/hpt27xx/osm_bsd.c optional hpt27xx \ - compile-with "${NORMAL_C} ${NO_WFORMAT_SECURITY}" +dev/hpt27xx/osm_bsd.c optional hpt27xx dev/hpt27xx/hpt27xx_config.c optional hpt27xx dev/hptmv/entry.c optional hptmv dev/hptmv/mv.c optional hptmv Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Tue Jan 22 05:39:34 2013 (r245767) +++ head/sys/conf/files.i386 Tue Jan 22 05:41:34 2013 (r245768) @@ -181,8 +181,7 @@ dev/glxiic/glxiic.c optional glxiic dev/glxsb/glxsb.c optional glxsb dev/glxsb/glxsb_hash.c optional glxsb dev/hpt27xx/os_bsd.c optional hpt27xx -dev/hpt27xx/osm_bsd.c optional hpt27xx \ - compile-with "${NORMAL_C} ${NO_WFORMAT_SECURITY}" +dev/hpt27xx/osm_bsd.c optional hpt27xx dev/hpt27xx/hpt27xx_config.c optional hpt27xx dev/hptmv/entry.c optional hptmv dev/hptmv/mv.c optional hptmv Modified: head/sys/dev/hpt27xx/hpt27xx_config.c ============================================================================== --- head/sys/dev/hpt27xx/hpt27xx_config.c Tue Jan 22 05:39:34 2013 (r245767) +++ head/sys/dev/hpt27xx/hpt27xx_config.c Tue Jan 22 05:41:34 2013 (r245768) @@ -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: head/sys/dev/hpt27xx/os_bsd.h ============================================================================== --- head/sys/dev/hpt27xx/os_bsd.h Tue Jan 22 05:39:34 2013 (r245767) +++ head/sys/dev/hpt27xx/os_bsd.h Tue Jan 22 05:41:34 2013 (r245768) @@ -135,9 +135,9 @@ INQUIRYDATA, *PINQUIRYDATA; #include /* 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: head/sys/dev/hpt27xx/osm_bsd.c ============================================================================== --- head/sys/dev/hpt27xx/osm_bsd.c Tue Jan 22 05:39:34 2013 (r245767) +++ head/sys/dev/hpt27xx/osm_bsd.c Tue Jan 22 05:41:34 2013 (r245768) @@ -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; sizesize; order++, size<<=1) ; + for (order=0, size=PAGE_SIZE; sizesize; 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(); Modified: head/sys/modules/hpt27xx/Makefile ============================================================================== --- head/sys/modules/hpt27xx/Makefile Tue Jan 22 05:39:34 2013 (r245767) +++ head/sys/modules/hpt27xx/Makefile Tue Jan 22 05:41:34 2013 (r245768) @@ -12,6 +12,3 @@ hpt27xx_lib.o: uudecode -p < ${HPT27XX}/$(MACHINE_ARCH)-elf.hpt27xx_lib.o.uu > ${.TARGET} .include - -CWARNFLAGS.osm_bsd.c= ${NO_WFORMAT_SECURITY} -CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}}