aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorEliot Blennerhassett <eblennerhassett@audioscience.com>2011-02-09 23:26:02 -0500
committerTakashi Iwai <tiwai@suse.de>2011-02-10 12:49:25 -0500
commit1528fbb5dcb5089652147bc6b76aa1f15e50c078 (patch)
tree16123d5a3fbe9c3b424ed4876c7eeeffa8b7cd5a /sound
parent14652e67ff6bb694a509059d670ed56b769e2c7b (diff)
ALSA: asihpi - Checkpatch line lengths etc.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/asihpi/hpi6000.c3
-rw-r--r--sound/pci/asihpi/hpicmn.c31
-rw-r--r--sound/pci/asihpi/hpidebug.c2
-rw-r--r--sound/pci/asihpi/hpidebug.h8
4 files changed, 24 insertions, 20 deletions
diff --git a/sound/pci/asihpi/hpi6000.c b/sound/pci/asihpi/hpi6000.c
index c486af182227..43465832a910 100644
--- a/sound/pci/asihpi/hpi6000.c
+++ b/sound/pci/asihpi/hpi6000.c
@@ -43,7 +43,8 @@
43#define HPI_HIF_ERROR_MASK 0x4000 43#define HPI_HIF_ERROR_MASK 0x4000
44 44
45/* HPI6000 specific error codes */ 45/* HPI6000 specific error codes */
46#define HPI6000_ERROR_BASE 900 /* not actually used anywhere */ 46#define HPI6000_ERROR_BASE 900 /* not actually used anywhere */
47
47/* operational/messaging errors */ 48/* operational/messaging errors */
48#define HPI6000_ERROR_MSG_RESP_IDLE_TIMEOUT 901 49#define HPI6000_ERROR_MSG_RESP_IDLE_TIMEOUT 901
49 50
diff --git a/sound/pci/asihpi/hpicmn.c b/sound/pci/asihpi/hpicmn.c
index 85c297279792..8346aeabee5d 100644
--- a/sound/pci/asihpi/hpicmn.c
+++ b/sound/pci/asihpi/hpicmn.c
@@ -46,17 +46,19 @@ static struct hpi_adapters_list adapters;
46u16 hpi_validate_response(struct hpi_message *phm, struct hpi_response *phr) 46u16 hpi_validate_response(struct hpi_message *phm, struct hpi_response *phr)
47{ 47{
48 if (phr->type != HPI_TYPE_RESPONSE) { 48 if (phr->type != HPI_TYPE_RESPONSE) {
49 HPI_DEBUG_LOG(ERROR, "header type %d invalid", phr->type); 49 HPI_DEBUG_LOG(ERROR, "header type %d invalid\n", phr->type);
50 return HPI_ERROR_INVALID_RESPONSE; 50 return HPI_ERROR_INVALID_RESPONSE;
51 } 51 }
52 52
53 if (phr->object != phm->object) { 53 if (phr->object != phm->object) {
54 HPI_DEBUG_LOG(ERROR, "header object %d invalid", phr->object); 54 HPI_DEBUG_LOG(ERROR, "header object %d invalid\n",
55 phr->object);
55 return HPI_ERROR_INVALID_RESPONSE; 56 return HPI_ERROR_INVALID_RESPONSE;
56 } 57 }
57 58
58 if (phr->function != phm->function) { 59 if (phr->function != phm->function) {
59 HPI_DEBUG_LOG(ERROR, "header type %d invalid", phr->function); 60 HPI_DEBUG_LOG(ERROR, "header type %d invalid\n",
61 phr->function);
60 return HPI_ERROR_INVALID_RESPONSE; 62 return HPI_ERROR_INVALID_RESPONSE;
61 } 63 }
62 64
@@ -114,7 +116,7 @@ struct hpi_adapter_obj *hpi_find_adapter(u16 adapter_index)
114 struct hpi_adapter_obj *pao = NULL; 116 struct hpi_adapter_obj *pao = NULL;
115 117
116 if (adapter_index >= HPI_MAX_ADAPTERS) { 118 if (adapter_index >= HPI_MAX_ADAPTERS) {
117 HPI_DEBUG_LOG(VERBOSE, "find_adapter invalid index %d ", 119 HPI_DEBUG_LOG(VERBOSE, "find_adapter invalid index %d\n",
118 adapter_index); 120 adapter_index);
119 return NULL; 121 return NULL;
120 } 122 }
@@ -203,9 +205,10 @@ static unsigned int control_cache_alloc_check(struct hpi_control_cache *pC)
203 pC->adap_idx); 205 pC->adap_idx);
204 return 0; 206 return 0;
205 } 207 }
206 /* ? This is a severe error, the cache is probably 208 /* The cache is invalid.
207 corrupted. Minimum valid entry size is 209 * Minimum valid entry size is
208 sizeof(struct hpi_control_cache_info) */ 210 * sizeof(struct hpi_control_cache_info)
211 */
209 HPI_DEBUG_LOG(ERROR, 212 HPI_DEBUG_LOG(ERROR,
210 "adap %d zero size cache entry %d\n", 213 "adap %d zero size cache entry %d\n",
211 pC->adap_idx, i); 214 pC->adap_idx, i);
@@ -226,9 +229,10 @@ static unsigned int control_cache_alloc_check(struct hpi_control_cache *pC)
226 info->control_index, info->control_type, 229 info->control_index, info->control_type,
227 info->size_in32bit_words); 230 info->size_in32bit_words);
228 231
229 /* quit loop early if whole cache has been scanned. */ 232 /* quit loop early if whole cache has been scanned.
230 /* pC->dwControlCount is the maximum possible entries, */ 233 * dwControlCount is the maximum possible entries
231 /* but some may not be in the cache at all */ 234 * but some may be absent from the cache
235 */
232 if (byte_count >= pC->cache_size_in_bytes) 236 if (byte_count >= pC->cache_size_in_bytes)
233 break; 237 break;
234 /* have seen last control index */ 238 /* have seen last control index */
@@ -238,15 +242,15 @@ static unsigned int control_cache_alloc_check(struct hpi_control_cache *pC)
238 242
239 if (byte_count != pC->cache_size_in_bytes) 243 if (byte_count != pC->cache_size_in_bytes)
240 HPI_DEBUG_LOG(WARNING, 244 HPI_DEBUG_LOG(WARNING,
241 "adap %d bytecount %d != cache size %d", 245 "adap %d bytecount %d != cache size %d\n",
242 pC->adap_idx, byte_count, 246 pC->adap_idx, byte_count,
243 pC->cache_size_in_bytes); 247 pC->cache_size_in_bytes);
244 else 248 else
245 HPI_DEBUG_LOG(DEBUG, 249 HPI_DEBUG_LOG(DEBUG,
246 "adap %d cache good, bytecount == cache size = %d", 250 "adap %d cache good, bytecount == cache size = %d\n",
247 pC->adap_idx, byte_count); 251 pC->adap_idx, byte_count);
248 252
249 pC->init = cached; 253 pC->init = (u16)cached;
250 } 254 }
251 return pC->init; 255 return pC->init;
252} 256}
@@ -430,7 +434,6 @@ short hpi_check_control_cache(struct hpi_control_cache *p_cache,
430 case HPI_CONTROL_SILENCEDETECTOR: 434 case HPI_CONTROL_SILENCEDETECTOR:
431 if (phm->u.c.attribute == HPI_SILENCEDETECTOR_STATE) { 435 if (phm->u.c.attribute == HPI_SILENCEDETECTOR_STATE) {
432 phr->u.c.param1 = pC->u.silence.state; 436 phr->u.c.param1 = pC->u.silence.state;
433 /*? phr->u.c.dwParam2 = pC->u.silence.dwCount; */
434 } else 437 } else
435 found = 0; 438 found = 0;
436 break; 439 break;
diff --git a/sound/pci/asihpi/hpidebug.c b/sound/pci/asihpi/hpidebug.c
index 4b81c8039312..b52baf62791e 100644
--- a/sound/pci/asihpi/hpidebug.c
+++ b/sound/pci/asihpi/hpidebug.c
@@ -48,7 +48,7 @@ int hpi_debug_level_get(void)
48void hpi_debug_message(struct hpi_message *phm, char *sz_fileline) 48void hpi_debug_message(struct hpi_message *phm, char *sz_fileline)
49{ 49{
50 if (phm) { 50 if (phm) {
51 printk("HPI_MSG%d,%d,%d,%d,%d\n", phm->version, 51 printk(KERN_DEBUG "HPI_MSG%d,%d,%d,%d,%d\n", phm->version,
52 phm->adapter_index, phm->obj_index, phm->function, 52 phm->adapter_index, phm->obj_index, phm->function,
53 phm->u.c.attribute); 53 phm->u.c.attribute);
54 } 54 }
diff --git a/sound/pci/asihpi/hpidebug.h b/sound/pci/asihpi/hpidebug.h
index 632d7d0840c6..940f54c3c538 100644
--- a/sound/pci/asihpi/hpidebug.h
+++ b/sound/pci/asihpi/hpidebug.h
@@ -80,17 +80,17 @@ void hpi_debug_data(u16 *pdata, u32 len);
80#define HPI_DEBUG_MESSAGE(level, phm) \ 80#define HPI_DEBUG_MESSAGE(level, phm) \
81 do { \ 81 do { \
82 if (hpi_debug_level >= HPI_DEBUG_LEVEL_##level) { \ 82 if (hpi_debug_level >= HPI_DEBUG_LEVEL_##level) { \
83 hpi_debug_message(phm,HPI_DEBUG_FLAG_##level \ 83 hpi_debug_message(phm, HPI_DEBUG_FLAG_##level \
84 FILE_LINE __stringify(level)); \ 84 FILE_LINE __stringify(level)); \
85 } \ 85 } \
86 } while (0) 86 } while (0)
87 87
88#define HPI_DEBUG_RESPONSE(phr) \ 88#define HPI_DEBUG_RESPONSE(phr) \
89 do { \ 89 do { \
90 if (((hpi_debug_level >= HPI_DEBUG_LEVEL_DEBUG) && (phr->error)) ||\ 90 if (((hpi_debug_level >= HPI_DEBUG_LEVEL_DEBUG) && \
91 (phr->error)) ||\
91 (hpi_debug_level >= HPI_DEBUG_LEVEL_VERBOSE)) \ 92 (hpi_debug_level >= HPI_DEBUG_LEVEL_VERBOSE)) \
92 printk(KERN_DEBUG\ 93 printk(KERN_DEBUG "HPI_RES%d,%d,%d\n", \
93 "HPI_RES%d,%d,%d\n", \
94 phr->version, phr->error, phr->specific_error); \ 94 phr->version, phr->error, phr->specific_error); \
95 } while (0) 95 } while (0)
96 96