Skip to contentSkip to conversation

drm/nouveau: printk something when nStatus == 0

PATCH New Marcin Slusarz 1 participant 1 message Dec 27, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/nouveau: printk something when nStatus == 0

when nStatus == 0, nouveau_graph_dump_trap_info printks something like this:
"PGRAPH_ERROR - nSource: PROTECTION_ERROR DMA_W_PROTECTION, nStatus:\n" without any information about status - printk additional "0"

---
 drivers/gpu/drm/nouveau/nouveau_irq.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/gpu/drm/nouveau/nouveau_irq.c +4 -0
index 370c72c..57ee73a 100644
@@ -284,6 +284,10 @@ nouveau_print_bitfield_names_(uint32_t value,
 	 * Also the caller is responsible for adding the newline.
 	 */
 	int i;
+	if (!value) {
+		printk(" 0");
+		return;
+	}
 	for (i = 0; i < namelist_len; ++i) {
 		uint32_t mask = namelist[i].mask;
 		if (value & mask) {
Signature · 1 line
1.6.6.rc3