Date: Fri, 12 Sep 2014 12:04:51 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271461 - in head/sys/dev: mvs siis Message-ID: <201409121204.s8CC4pfR097043@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Fri Sep 12 12:04:51 2014 New Revision: 271461 URL: http://svnweb.freebsd.org/changeset/base/271461 Log: Initialize variables before resource_int_value(). Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com> Modified: head/sys/dev/mvs/mvs.c head/sys/dev/mvs/mvs_pci.c head/sys/dev/mvs/mvs_soc.c head/sys/dev/siis/siis.c Modified: head/sys/dev/mvs/mvs.c ============================================================================== --- head/sys/dev/mvs/mvs.c Fri Sep 12 10:08:11 2014 (r271460) +++ head/sys/dev/mvs/mvs.c Fri Sep 12 12:04:51 2014 (r271461) @@ -122,6 +122,7 @@ mvs_ch_attach(device_t dev) ch->unit = (intptr_t)device_get_ivars(dev); ch->quirks = ctlr->quirks; mtx_init(&ch->mtx, "MVS channel lock", NULL, MTX_DEF); + ch->pm_level = 0; resource_int_value(device_get_name(dev), device_get_unit(dev), "pm_level", &ch->pm_level); if (ch->pm_level > 3) Modified: head/sys/dev/mvs/mvs_pci.c ============================================================================== --- head/sys/dev/mvs/mvs_pci.c Fri Sep 12 10:08:11 2014 (r271460) +++ head/sys/dev/mvs/mvs_pci.c Fri Sep 12 12:04:51 2014 (r271461) @@ -111,6 +111,7 @@ mvs_attach(device_t dev) i++; ctlr->channels = mvs_ids[i].ports; ctlr->quirks = mvs_ids[i].quirks; + ctlr->ccc = 0; resource_int_value(device_get_name(dev), device_get_unit(dev), "ccc", &ctlr->ccc); ctlr->cccc = 8; Modified: head/sys/dev/mvs/mvs_soc.c ============================================================================== --- head/sys/dev/mvs/mvs_soc.c Fri Sep 12 10:08:11 2014 (r271460) +++ head/sys/dev/mvs/mvs_soc.c Fri Sep 12 12:04:51 2014 (r271461) @@ -114,6 +114,7 @@ mvs_attach(device_t dev) i++; ctlr->channels = mvs_ids[i].ports; ctlr->quirks = mvs_ids[i].quirks; + ctlr->ccc = 0; resource_int_value(device_get_name(dev), device_get_unit(dev), "ccc", &ctlr->ccc); ctlr->cccc = 8; Modified: head/sys/dev/siis/siis.c ============================================================================== --- head/sys/dev/siis/siis.c Fri Sep 12 10:08:11 2014 (r271460) +++ head/sys/dev/siis/siis.c Fri Sep 12 12:04:51 2014 (r271461) @@ -465,6 +465,7 @@ siis_ch_attach(device_t dev) ch->dev = dev; ch->unit = (intptr_t)device_get_ivars(dev); ch->quirks = ctlr->quirks; + ch->pm_level = 0; resource_int_value(device_get_name(dev), device_get_unit(dev), "pm_level", &ch->pm_level); resource_int_value(device_get_name(dev),
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409121204.s8CC4pfR097043>