From owner-svn-src-all@FreeBSD.ORG Fri Dec 19 20:51:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 34A1EA99; Fri, 19 Dec 2014 20:51:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20EF52B44; Fri, 19 Dec 2014 20:51:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBJKpu8D056259; Fri, 19 Dec 2014 20:51:56 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBJKptKW056258; Fri, 19 Dec 2014 20:51:55 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201412192051.sBJKptKW056258@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 19 Dec 2014 20:51:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275943 - head/sys/cam/ctl 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.18-1 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: Fri, 19 Dec 2014 20:51:56 -0000 Author: mav Date: Fri Dec 19 20:51:54 2014 New Revision: 275943 URL: https://svnweb.freebsd.org/changeset/base/275943 Log: Constify some static data. MFC after: 2 weeks Modified: head/sys/cam/ctl/ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Fri Dec 19 20:35:06 2014 (r275942) +++ head/sys/cam/ctl/ctl.c Fri Dec 19 20:51:54 2014 (r275943) @@ -111,7 +111,7 @@ struct ctl_softc *control_softc = NULL; * Note that these are default values only. The actual values will be * filled in when the user does a mode sense. */ -static struct copan_debugconf_subpage debugconf_page_default = { +const static struct copan_debugconf_subpage debugconf_page_default = { DBGCNF_PAGE_CODE | SMPH_SPF, /* page_code */ DBGCNF_SUBPAGE_CODE, /* subpage */ {(sizeof(struct copan_debugconf_subpage) - 4) >> 8, @@ -121,7 +121,7 @@ static struct copan_debugconf_subpage de CTL_TIME_IO_DEFAULT_SECS>>0}, /* ctl_time_io_secs */ }; -static struct copan_debugconf_subpage debugconf_page_changeable = { +const static struct copan_debugconf_subpage debugconf_page_changeable = { DBGCNF_PAGE_CODE | SMPH_SPF, /* page_code */ DBGCNF_SUBPAGE_CODE, /* subpage */ {(sizeof(struct copan_debugconf_subpage) - 4) >> 8, @@ -130,7 +130,7 @@ static struct copan_debugconf_subpage de {0xff,0xff}, /* ctl_time_io_secs */ }; -static struct scsi_da_rw_recovery_page rw_er_page_default = { +const static struct scsi_da_rw_recovery_page rw_er_page_default = { /*page_code*/SMS_RW_ERROR_RECOVERY_PAGE, /*page_length*/sizeof(struct scsi_da_rw_recovery_page) - 2, /*byte3*/SMS_RWER_AWRE|SMS_RWER_ARRE, @@ -144,7 +144,7 @@ static struct scsi_da_rw_recovery_page r /*recovery_time_limit*/{0, 0}, }; -static struct scsi_da_rw_recovery_page rw_er_page_changeable = { +const static struct scsi_da_rw_recovery_page rw_er_page_changeable = { /*page_code*/SMS_RW_ERROR_RECOVERY_PAGE, /*page_length*/sizeof(struct scsi_da_rw_recovery_page) - 2, /*byte3*/0, @@ -158,7 +158,7 @@ static struct scsi_da_rw_recovery_page r /*recovery_time_limit*/{0, 0}, }; -static struct scsi_format_page format_page_default = { +const static struct scsi_format_page format_page_default = { /*page_code*/SMS_FORMAT_DEVICE_PAGE, /*page_length*/sizeof(struct scsi_format_page) - 2, /*tracks_per_zone*/ {0, 0}, @@ -175,7 +175,7 @@ static struct scsi_format_page format_pa /*reserved*/ {0, 0, 0} }; -static struct scsi_format_page format_page_changeable = { +const static struct scsi_format_page format_page_changeable = { /*page_code*/SMS_FORMAT_DEVICE_PAGE, /*page_length*/sizeof(struct scsi_format_page) - 2, /*tracks_per_zone*/ {0, 0}, @@ -191,7 +191,7 @@ static struct scsi_format_page format_pa /*reserved*/ {0, 0, 0} }; -static struct scsi_rigid_disk_page rigid_disk_page_default = { +const static struct scsi_rigid_disk_page rigid_disk_page_default = { /*page_code*/SMS_RIGID_DISK_PAGE, /*page_length*/sizeof(struct scsi_rigid_disk_page) - 2, /*cylinders*/ {0, 0, 0}, @@ -208,7 +208,7 @@ static struct scsi_rigid_disk_page rigid /*reserved2*/ {0, 0} }; -static struct scsi_rigid_disk_page rigid_disk_page_changeable = { +const static struct scsi_rigid_disk_page rigid_disk_page_changeable = { /*page_code*/SMS_RIGID_DISK_PAGE, /*page_length*/sizeof(struct scsi_rigid_disk_page) - 2, /*cylinders*/ {0, 0, 0}, @@ -224,7 +224,7 @@ static struct scsi_rigid_disk_page rigid /*reserved2*/ {0, 0} }; -static struct scsi_caching_page caching_page_default = { +const static struct scsi_caching_page caching_page_default = { /*page_code*/SMS_CACHING_PAGE, /*page_length*/sizeof(struct scsi_caching_page) - 2, /*flags1*/ SCP_DISC | SCP_WCE, @@ -240,7 +240,7 @@ static struct scsi_caching_page caching_ /*non_cache_seg_size*/ {0, 0, 0} }; -static struct scsi_caching_page caching_page_changeable = { +const static struct scsi_caching_page caching_page_changeable = { /*page_code*/SMS_CACHING_PAGE, /*page_length*/sizeof(struct scsi_caching_page) - 2, /*flags1*/ SCP_WCE | SCP_RCD, @@ -256,7 +256,7 @@ static struct scsi_caching_page caching_ /*non_cache_seg_size*/ {0, 0, 0} }; -static struct scsi_control_page control_page_default = { +const static struct scsi_control_page control_page_default = { /*page_code*/SMS_CONTROL_MODE_PAGE, /*page_length*/sizeof(struct scsi_control_page) - 2, /*rlec*/0, @@ -268,7 +268,7 @@ static struct scsi_control_page control_ /*extended_selftest_completion_time*/{0, 0} }; -static struct scsi_control_page control_page_changeable = { +const static struct scsi_control_page control_page_changeable = { /*page_code*/SMS_CONTROL_MODE_PAGE, /*page_length*/sizeof(struct scsi_control_page) - 2, /*rlec*/SCP_DSENSE, @@ -280,7 +280,7 @@ static struct scsi_control_page control_ /*extended_selftest_completion_time*/{0, 0} }; -static struct scsi_info_exceptions_page ie_page_default = { +const static struct scsi_info_exceptions_page ie_page_default = { /*page_code*/SMS_INFO_EXCEPTIONS_PAGE, /*page_length*/sizeof(struct scsi_info_exceptions_page) - 2, /*info_flags*/SIEP_FLAGS_DEXCPT, @@ -289,7 +289,7 @@ static struct scsi_info_exceptions_page /*report_count*/{0, 0, 0, 0} }; -static struct scsi_info_exceptions_page ie_page_changeable = { +const static struct scsi_info_exceptions_page ie_page_changeable = { /*page_code*/SMS_INFO_EXCEPTIONS_PAGE, /*page_length*/sizeof(struct scsi_info_exceptions_page) - 2, /*info_flags*/0, @@ -300,7 +300,7 @@ static struct scsi_info_exceptions_page #define CTL_LBPM_LEN (sizeof(struct ctl_logical_block_provisioning_page) - 4) -static struct ctl_logical_block_provisioning_page lbp_page_default = {{ +const static struct ctl_logical_block_provisioning_page lbp_page_default = {{ /*page_code*/SMS_INFO_EXCEPTIONS_PAGE | SMPH_SPF, /*subpage_code*/0x02, /*page_length*/{CTL_LBPM_LEN >> 8, CTL_LBPM_LEN}, @@ -326,7 +326,7 @@ static struct ctl_logical_block_provisio } }; -static struct ctl_logical_block_provisioning_page lbp_page_changeable = {{ +const static struct ctl_logical_block_provisioning_page lbp_page_changeable = {{ /*page_code*/SMS_INFO_EXCEPTIONS_PAGE | SMPH_SPF, /*subpage_code*/0x02, /*page_length*/{CTL_LBPM_LEN >> 8, CTL_LBPM_LEN},