In the code path which creates request packets, clearly mark a switch
branch which must never be reached with a WARN.
In the code path which creates response packets, replace a BUG by a
friendlier to debug WARN.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
packet->header_length = 16;
packet->payload_length = 0;
break;
+
+ default:
+ WARN(1, KERN_ERR "wrong tcode %d", tcode);
}
common:
packet->speed = speed;
break;
default:
- BUG();
- return;
+ WARN(1, KERN_ERR "wrong tcode %d", tcode);
}
response->payload_bus = 0;