On Tue, May 17, 2005 at 01:34:57PM -0700, Mark Haverkamp wrote: > Re-send of the patch diffed against the latest scsi-misc-2.6 git tree. > > This patch adds some files into the /sys/class/scsi_host/hostN > directories for aacraid adapters. The file names are pretty much self- > explanitory: > > aac_driver_version: Driver version and date > aac_bios_version: Adapter's bios version > aac_kernel_version: Adapter's kernel version > aac_monitor_version: Adapter's monitor version > aac_model: Adapter's model name/number > aac_serial_number: Adapter's serial number Can you remove all those aac_ prefixes? > +static ssize_t aac_show_host_version(struct class_device *class_dev, > + char *buf) > +{ > + int len; > + > + len = snprintf(buf, PAGE_SIZE, "Adaptec Raid Controller: %s %s\n", > + AAC_DRIVER_VERSION, > + AAC_DRIVER_BUILD_DATE); > + return len; > +} the "Adaptec Raid Controller:" doesn't belong in here. The driver build data and version neither, use MODULE_VERSION instead. > + > +static ssize_t aac_show_model(struct class_device *class_dev, > + char *buf) > +{ > + struct aac_dev *dev = (struct aac_dev*)class_to_shost(class_dev)->hostdata; No need to cast. > + int len; > + > + len = snprintf(buf, PAGE_SIZE, "Vendor: %s Model: %s\n", > + aac_drivers[dev->cardtype].vname, > + aac_drivers[dev->cardtype].model); > + return len; please use two different attributes and remove the prefix. > +static ssize_t aac_show_kernel_version(struct class_device *class_dev, > + char *buf) > +{ > + struct aac_dev *dev = (struct aac_dev*)class_to_shost(class_dev)->hostdata; > + int len, tmp; > + > + tmp = le32_to_cpu(dev->adapter_info.kernelrev); > + len = snprintf(buf, PAGE_SIZE, "kernel: %d.%d-%d[%d]\n", > + tmp >> 24, (tmp >> 16) & 0xff, tmp & 0xff, > + le32_to_cpu(dev->adapter_info.kernelbuild)); > + return len; > +} Again please remove the prefix. Also what does kernel version mean in this context? > +static ssize_t aac_show_monitor_version(struct class_device *class_dev, > + char *buf) > +{ > + struct aac_dev *dev = (struct aac_dev*)class_to_shost(class_dev)->hostdata; > + int len, tmp; > + > + tmp = le32_to_cpu(dev->adapter_info.monitorrev); > + len = snprintf(buf, PAGE_SIZE, "monitor: %d.%d-%d[%d]\n", > + tmp >> 24, (tmp >> 16) & 0xff, tmp & 0xff, > + le32_to_cpu(dev->adapter_info.monitorbuild)); > + return len; Again no prefix please. > +} > + > +static ssize_t aac_show_bios_version(struct class_device *class_dev, > + char *buf) > +{ > + struct aac_dev *dev = (struct aac_dev*)class_to_shost(class_dev)->hostdata; > + int len, tmp; > + > + tmp = le32_to_cpu(dev->adapter_info.biosrev); > + len = snprintf(buf, PAGE_SIZE, "bios: %d.%d-%d[%d]\n", > + tmp >> 24, (tmp >> 16) & 0xff, tmp & 0xff, > + le32_to_cpu(dev->adapter_info.biosbuild)); > + return len; > +} dito > + > +static ssize_t aac_show_serial_number(struct class_device *class_dev, > + char *buf) > +{ > + struct aac_dev *dev = (struct aac_dev*)class_to_shost(class_dev)->hostdata; > + int len = 0; > + > + if (le32_to_cpu(dev->adapter_info.serial[0]) != 0xBAD0) > + len = snprintf(buf, PAGE_SIZE, "serial: %x\n", > + le32_to_cpu(dev->adapter_info.serial[0])); > + return len; > +} dito - : 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