On Tue, Nov 04, 2014 at 09:06:40AM +0100, Hannes Reinecke wrote:
> Implement a per-cpu buffer for formatting messages,
> and add real functions for scmd_printk and sdev_prefix_printk
> using that buffer and use dev_printk() to print out things.
> And make sdev_printk() a wrapper for sdev_prefix_printk().

The "real functions" mostly seem to be a side effect of the
implementation, how about a more descriptive subject line?

Also adding a sentence or two why this is done to the patch description
would be very helpful.

> +/*
> + * scsi_logging.c

Please don't mention the file name in top of file comments, it's bound
to get out of date.

> +#define SCSI_LOG_SPOOLSIZE 4096
> +#define SCSI_LOG_BUFSIZE 128
> +
> +struct scsi_log_buf {
> +     char buffer[SCSI_LOG_SPOOLSIZE];
> +     unsigned long map;
> +};
> +
> +static DEFINE_PER_CPU(struct scsi_log_buf, scsi_format_log);

Some sort of comment explaining why we need the per-cpu buffers also
would be very useful.  To me this seems like a little bit too much
duplication of the tracing code.

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to