/* dump tempsense regs. in decimal, to ease shell-scripts.  */
static ssize_t show_tempsense(struct device *dev, struct device_attribute *attr, char *buf)
/* dump tempsense regs. in decimal, to ease shell-scripts.  */
static ssize_t show_tempsense(struct device *dev, struct device_attribute *attr, char *buf)
{
	struct ipath_devdata *dd = dev_get_drvdata(dev);
	int ret;
	int idx;
	u8 regvals[8];
	ret = -ENXIO;
	for (idx = 0; idx < 8; ++idx) {
		if (idx == 6)
			continue;
		ret = ipath_tempsense_read(dd, idx);
		if (ret < 0)
			break;
		regvals[idx] = ret;
	}
	if (idx == 8)
		ret = scnprintf(buf, PAGE_SIZE, "%d %d %02X %02X %d %d\n",
			*(signed char *)(regvals),
			*(signed char *)(regvals + 1),
			regvals[2], regvals[3],
			*(signed char *)(regvals + 5),
			*(signed char *)(regvals + 7));
	return ret;
}