Tony Battersby wrote: > I think BUG_ON is > the best way to go for this instead of printk/return because bugs > will be noticed and fixed instead of possibly going unnoticed. ... > static void sg_rq_end_io(struct request *rq, int uptodate) > { ... > + int result, resid, done = 1; > + > + BUG_ON(srp->done != 0); AFAIU this is typically called in atomic context. If so, WARN_ON is preferred. ... > + BUG_ON(sfp == NULL); > + > + sdp = sfp->parentdp; This would bring up a NULL pointer dereference dump anyway. -- Stefan Richter -=====-==--= ---= =-=-= http://arcgraph.de/sr/ -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html