Re: [PATCH 01/10] scsi: Use real functions for logging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux