PERFORCE change 122977 for review
Rui Paulo
rpaulo at FreeBSD.org
Thu Jul 5 22:39:59 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=122977
Change 122977 by rpaulo at rpaulo_epsilon on 2007/07/05 22:39:22
Be more style compliant regarding to continuation of arguments
for functions/macros.
Pointed out by: jhb
Affected files ...
.. //depot/projects/soc2007/rpaulo-macbook/dev/asmc/asmc.c#18 edit
Differences ...
==== //depot/projects/soc2007/rpaulo-macbook/dev/asmc/asmc.c#18 (text+ko) ====
@@ -23,7 +23,7 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- * $P4: //depot/projects/soc2007/rpaulo-macbook/dev/asmc/asmc.c#17 $
+ * $P4: //depot/projects/soc2007/rpaulo-macbook/dev/asmc/asmc.c#18 $
*
*/
@@ -99,8 +99,7 @@
static int asmc_mb_sysctl_sms_y(SYSCTL_HANDLER_ARGS);
static int asmc_mb_sysctl_sms_z(SYSCTL_HANDLER_ARGS);
-static struct asmc_model *
- asmc_match(device_t dev);
+static struct asmc_model *asmc_match(device_t dev);
#define ASMC_SMS_FUNCS asmc_mb_sysctl_sms_x, asmc_mb_sysctl_sms_y, \
asmc_mb_sysctl_sms_z
@@ -257,31 +256,24 @@
*/
sysctl_ctx_init(&sc->sc_sysctl_ctx);
sc->sc_root_tree = SYSCTL_ADD_NODE(&sc->sc_sysctl_ctx,
- SYSCTL_STATIC_CHILDREN(_hw),
- OID_AUTO,
- device_get_name(dev),
- CTLFLAG_RD, 0,
- device_get_desc(dev));
+ SYSCTL_STATIC_CHILDREN(_hw), OID_AUTO, device_get_name(dev),
+ CTLFLAG_RD, 0, device_get_desc(dev));
/*
* hw.asmc.fan.* tree.
*/
sc->sc_fan_tree[0] = SYSCTL_ADD_NODE(&sc->sc_sysctl_ctx,
- SYSCTL_CHILDREN(sc->sc_root_tree),
- OID_AUTO, "fan",
- CTLFLAG_RD, 0,
- "Fan Root Tree");
+ SYSCTL_CHILDREN(sc->sc_root_tree), OID_AUTO, "fan",
+ CTLFLAG_RD, 0, "Fan Root Tree");
for (i = 1; i <= sc->sc_nfan; i++) {
j = i - 1;
name[0] = '0' + j;
name[1] = 0;
- sc->sc_fan_tree[i] =
- SYSCTL_ADD_NODE(&sc->sc_sysctl_ctx,
- SYSCTL_CHILDREN(sc->sc_fan_tree[0]),
- OID_AUTO, name,
- CTLFLAG_RD, 0,
- "Fan Subtree");
+ sc->sc_fan_tree[i] = SYSCTL_ADD_NODE(&sc->sc_sysctl_ctx,
+ SYSCTL_CHILDREN(sc->sc_fan_tree[0]),
+ OID_AUTO, name, CTLFLAG_RD, 0,
+ "Fan Subtree");
SYSCTL_ADD_PROC(&sc->sc_sysctl_ctx,
SYSCTL_CHILDREN(sc->sc_fan_tree[i]),
@@ -323,10 +315,8 @@
*/
sc->sc_temp_tree = SYSCTL_ADD_NODE(&sc->sc_sysctl_ctx,
- SYSCTL_CHILDREN(sc->sc_root_tree),
- OID_AUTO, "temp",
- CTLFLAG_RD, 0,
- "Temperature sensors");
+ SYSCTL_CHILDREN(sc->sc_root_tree), OID_AUTO, "temp",
+ CTLFLAG_RD, 0, "Temperature sensors");
for (i = 0; model->smc_temps[i]; i++) {
SYSCTL_ADD_PROC(&sc->sc_sysctl_ctx,
@@ -344,10 +334,9 @@
* hw.asmc.sms tree.
*/
sc->sc_sms_tree = SYSCTL_ADD_NODE(&sc->sc_sysctl_ctx,
- SYSCTL_CHILDREN(sc->sc_root_tree),
- OID_AUTO, "sms",
- CTLFLAG_RD, 0,
- "Sudden Motion Sensor");
+ SYSCTL_CHILDREN(sc->sc_root_tree), OID_AUTO, "sms",
+ CTLFLAG_RD, 0, "Sudden Motion Sensor");
+
SYSCTL_ADD_PROC(&sc->sc_sysctl_ctx,
SYSCTL_CHILDREN(sc->sc_sms_tree),
OID_AUTO, "x", CTLTYPE_INT | CTLFLAG_RD,
@@ -376,8 +365,7 @@
*/
TASK_INIT(&sc->sc_sms_task, 0, asmc_sms_task, sc);
sc->sc_sms_tq = taskqueue_create_fast("asmc_taskq", M_WAITOK,
- taskqueue_thread_enqueue,
- &sc->sc_sms_tq);
+ taskqueue_thread_enqueue, &sc->sc_sms_tq);
taskqueue_start_threads(&sc->sc_sms_tq, 1, PI_REALTIME, "%s sms taskq",
device_get_nameunit(dev));
@@ -387,7 +375,7 @@
*/
sc->sc_rid = 0;
sc->sc_res = bus_alloc_resource(dev, SYS_RES_IRQ, &sc->sc_rid,
- ASMC_IRQ, ASMC_IRQ, 1, RF_ACTIVE);
+ ASMC_IRQ, ASMC_IRQ, 1, RF_ACTIVE);
if (sc->sc_res == NULL) {
device_printf(dev, "unable to allocate IRQ resource\n");
taskqueue_free(sc->sc_sms_tq);
@@ -400,12 +388,12 @@
if (ret) {
ret = bus_setup_intr(dev, sc->sc_res,
- INTR_TYPE_MISC | INTR_MPSAFE,
- NULL, asmc_sms_fastintr, dev,
- &sc->sc_cookie);
+ INTR_TYPE_MISC | INTR_MPSAFE,
+ NULL, asmc_sms_fastintr, dev,
+ &sc->sc_cookie);
if (ret == 0)
device_printf(dev, "unable to setup fast interrupt. "
- "Using normal mode.\n");
+ "Using normal mode.\n");
}
if (ret) {
@@ -504,7 +492,7 @@
sc->sc_nfan = asmc_fan_count(dev);
if (sc->sc_nfan > ASMC_MAXFANS) {
device_printf(dev, "more than %d fans were detected. Please "
- "report this.\n", ASMC_MAXFANS);
+ "report this.\n", ASMC_MAXFANS);
sc->sc_nfan = ASMC_MAXFANS;
}
More information about the p4-projects
mailing list