Re: [PATCH] ppc64: Thermal control for SMU based machines

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

 



Benjamin Herrenschmidt <[email protected]> wrote:
>
> +#define BUILD_SHOW_FUNC_FIX(name, data)				\
> +static ssize_t show_##name(struct device *dev,                  \
> +			   struct device_attribute *attr,       \
> +			   char *buf)	                        \
> +{								\
> +	ssize_t r;						\
> +        s32 val = 0;                                            \
> +        data->ops->get_value(data, &val);                       \
> +	r = sprintf(buf, "%d.%03d", FIX32TOPRINT(val)); 	\
> +	return r;						\
> +}                                                               \
> +static DEVICE_ATTR(name,S_IRUGO,show_##name, NULL);
> +
> +
> +#define BUILD_SHOW_FUNC_INT(name, data)				\
> +static ssize_t show_##name(struct device *dev,                  \
> +			   struct device_attribute *attr,       \
> +			   char *buf)	                        \
> +{								\
> +        s32 val = 0;                                            \
> +        data->ops->get_value(data, &val);                       \
> +	return sprintf(buf, "%d", val);  			\
> +}                                                               \

Someone needs a tab key ;)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux