On 11/30/2011 11:03 PM, Nicholas A. Bellinger wrote:
diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c index 07372de..cc32ec8 100644 --- a/drivers/scsi/qla2xxx/qla_dbg.c +++ b/drivers/scsi/qla2xxx/qla_dbg.c @@ -1676,11 +1676,11 @@ ql_dbg(uint32_t level, scsi_qla_host_t *vha, int32_t id, char *msg, ...) { uint32_t len; struct pci_dev *pdev = NULL; - memset(pbuf, 0, QL_DBG_BUF_LEN); - va_start(ap, msg); if ((level& ql2xextended_error_logging) == level) { + memset(pbuf, 0, QL_DBG_BUF_LEN); +
512bytes on the stack is brave. Anyway, why do you memset the whole buffer? As far the string processing is concerned, setting the first byte to zero is enough. Sebastian -- 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