Module Name: src
Committed By: dyoung
Date: Thu Apr 2 01:06:49 UTC 2009
Modified Files:
src/sys/dev/pci: azalia.c
Log Message:
Cosmetic changes, only, to clarify and to save a couple of lines: return
a constant, 0, instead of returning ret when it is always 0. Wait to
initialize ret until we really need to.
To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/dev/pci/azalia.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pci/azalia.c
diff -u src/sys/dev/pci/azalia.c:1.67 src/sys/dev/pci/azalia.c:1.68
--- src/sys/dev/pci/azalia.c:1.67 Wed Feb 25 15:46:34 2009
+++ src/sys/dev/pci/azalia.c Thu Apr 2 01:06:49 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: azalia.c,v 1.67 2009/02/25 15:46:34 jmcneill Exp $ */
+/* $NetBSD: azalia.c,v 1.68 2009/04/02 01:06:49 dyoung Exp $ */
/*-
* Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: azalia.c,v 1.67 2009/02/25 15:46:34 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: azalia.c,v 1.68 2009/04/02 01:06:49 dyoung Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -459,17 +459,15 @@
uint8_t rirbsts;
az = v;
- ret = 0;
if (!device_has_power(az->dev))
return 0;
- intsts = AZ_READ_4(az, INTSTS);
- if (intsts == 0)
- return ret;
+ if ((intsts = AZ_READ_4(az, INTSTS)) == 0)
+ return 0;
- ret += azalia_stream_intr(&az->pstream, intsts);
- ret += azalia_stream_intr(&az->rstream, intsts);
+ ret = azalia_stream_intr(&az->pstream, intsts) +
+ azalia_stream_intr(&az->rstream, intsts);
rirbsts = AZ_READ_1(az, RIRBSTS);
if (rirbsts & (HDA_RIRBSTS_RIRBOIS | HDA_RIRBSTS_RINTFL)) {