diff --git a/buffers/zio-buf-kmalloc.c b/buffers/zio-buf-kmalloc.c
index fb50c7aef6c86b36e9b1b1f6fe68a17e88d877f2..2034cd5f4c54b61bd333e8d3663f0c57bc889f28 100644
--- a/buffers/zio-buf-kmalloc.c
+++ b/buffers/zio-buf-kmalloc.c
@@ -204,7 +204,7 @@ out_unlock:
 	spin_unlock(&bi->lock);
 	/* There is no data in buffer, and we may pull to have data soon */
 	ti = bi->cset->ti;
-	if ((bi->flags & ZIO_DIR) == ZIO_DIR_INPUT && ti->t_op->pull_block){
+	if ((bi->flags & ZIO_DIR) == ZIO_DIR_INPUT && ti->t_op->pull_block) {
 		/* chek if trigger is disabled */
 		if (unlikely((ti->flags & ZIO_STATUS) == ZIO_DISABLED))
 			return NULL;
@@ -290,5 +290,5 @@ static void __exit zbk_exit(void)
 }
 
 /* This is the default buffer, and is part of zio-core: no module init/exit */
-int __init  __attribute__((alias("zbk_init"))) zio_default_buffer_init(void);
+int __init __attribute__((alias("zbk_init"))) zio_default_buffer_init(void);
 void __exit __attribute__((alias("zbk_exit"))) zio_default_buffer_exit(void);
diff --git a/buffers/zio-buf-vmalloc.c b/buffers/zio-buf-vmalloc.c
index 5c766c0ab24a22817d1ce37be7887e48ef38e391..26b74514c2384286150fbbdbbfec5b25b8b14aac 100644
--- a/buffers/zio-buf-vmalloc.c
+++ b/buffers/zio-buf-vmalloc.c
@@ -51,7 +51,7 @@ struct zbk_item {
 #define to_item(block) container_of(block, struct zbk_item, block);
 
 static ZIO_ATTR_DEFINE_STD(ZIO_BUF, zbk_std_zattr) = {
-	ZIO_ATTR_REG(zbuf, ZIO_ATTR_ZBUF_MAXKB, S_IRUGO | S_IWUGO, 0x0, 128 /* kB */),
+	ZIO_ATTR_REG(zbuf, ZIO_ATTR_ZBUF_MAXKB, S_IRUGO | S_IWUGO, 0x0, 128),
 };
 
 static int zbk_conf_set(struct device *dev, struct zio_attribute *zattr,
@@ -251,7 +251,7 @@ out_unlock:
 	spin_unlock(&bi->lock);
 	/* There is no data in buffer, and we may pull to have data soon */
 	ti = bi->cset->ti;
-	if ((bi->flags & ZIO_DIR) == ZIO_DIR_INPUT && ti->t_op->pull_block){
+	if ((bi->flags & ZIO_DIR) == ZIO_DIR_INPUT && ti->t_op->pull_block) {
 		/* chek if trigger is disabled */
 		if (unlikely((ti->flags & ZIO_STATUS) == ZIO_DISABLED))
 			return NULL;
@@ -325,23 +325,23 @@ static int zbk_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
 	struct zio_bi *bi = priv->chan->bi;
 	struct zbk_instance *zbki = to_zbki(bi);
 	long off = vmf->pgoff * PAGE_SIZE;
-        struct page *p;
+	struct page *p;
 	void *addr;
 
 	if (priv->type == ZIO_CDEV_CTRL)
 		return VM_FAULT_SIGBUS;
 
 	printk("fault at %li (size %li)\n", off, zbki->size);
-        if (off > zbki->size)
+	if (off > zbki->size)
 		return VM_FAULT_SIGBUS;
 
-        addr = zbki->data + off;
-        printk("%s: uaddr %p, off %li: kaddr %p\n",
-               __FUNCTION__, vmf->virtual_address, off, addr);
-        p = vmalloc_to_page(addr);
-        get_page(p);
-        vmf->page = p;
-        return 0;
+	addr = zbki->data + off;
+	printk("%s: uaddr %p, off %li: kaddr %p\n",
+		__func__, vmf->virtual_address, off, addr);
+	p = vmalloc_to_page(addr);
+	get_page(p);
+	vmf->page = p;
+	return 0;
 }
 
 static struct vm_operations_struct zbk_vma_ops = {
diff --git a/drivers/zio-ad788x.c b/drivers/zio-ad788x.c
index 4f4bbe56b78b5f3c120403e752fd21ce4fa5f1b5..657a27ec9f1a15f018281d28b51932e360b5be2a 100644
--- a/drivers/zio-ad788x.c
+++ b/drivers/zio-ad788x.c
@@ -58,13 +58,15 @@ struct ad788x {
 static ZIO_ATTR_DEFINE_STD(ZIO_DEV, zattr_dev_ad7887) = {
 	ZIO_ATTR_REG(zdev, ZIO_ATTR_NBITS, S_IRUGO, 0, 12),
 	/* vref_src can be internal (0) or external (1)*/
-	ZIO_ATTR_REG(zdev, ZIO_ATTR_VREFTYPE, S_IRUGO | S_IWUGO, AD7887_VREF_ADDR, 1),
+	ZIO_ATTR_REG(zdev, ZIO_ATTR_VREFTYPE, S_IRUGO | S_IWUGO,
+		     AD7887_VREF_ADDR, 1),
 };
 /* Standard attributes for AD7888*/
 static ZIO_ATTR_DEFINE_STD(ZIO_DEV, zattr_dev_ad7888) = {
 	ZIO_ATTR_REG(zdev, ZIO_ATTR_NBITS, S_IRUGO, 0, 12),
 	/* vref_src can be internal (0) or external (1)*/
-	ZIO_ATTR_REG(zdev, ZIO_ATTR_VREFTYPE, S_IRUGO | S_IWUGO, AD7888_VREF_ADDR, 0),
+	ZIO_ATTR_REG(zdev, ZIO_ATTR_VREFTYPE, S_IRUGO | S_IWUGO,
+		     AD7888_VREF_ADDR, 0),
 };
 /* Extended attributes for AD7887 */
 static struct zio_attribute zattr_dev_ext_ad7887[] = {
@@ -305,7 +307,7 @@ static int __devinit ad788x_spi_probe(struct spi_device *spi)
 	dev_id = spi->chip_select | (spi->master->bus_num << 8);
 
 	/* Register a ZIO device */
-	err= zio_register_device(zdev, spi_id->name, dev_id);
+	err = zio_register_device(zdev, spi_id->name, dev_id);
 	if (err)
 		kfree(ad788x);
 	return err;
diff --git a/drivers/zio-gpio.c b/drivers/zio-gpio.c
index 6fd13168a9cd52fb0c52817e053ee4b8ae99e14a..a6f7368cbbcd5d18673b2f78a7e23f7d06007492 100644
--- a/drivers/zio-gpio.c
+++ b/drivers/zio-gpio.c
@@ -171,8 +171,8 @@ static int __init zgp_init(void)
 	zgp_dev->owner = THIS_MODULE;
 	err = zio_register_device(zgp_dev, "gpio", 0);
 	if (err) {
-		pr_err(KBUILD_MODNAME ": can't register zio driver "
-		       "(error %i)\n", err);
+		pr_err(KBUILD_MODNAME ": can't register zio driver (err %i)\n",
+		       err);
 		goto out_reg;
 	}
 
diff --git a/drivers/zio-zero.c b/drivers/zio-zero.c
index 1659af657d5fd927607d48f3c30de5f2c3e404fd..01456b6f1bff84c1f6b401e9558b17516e99b7db 100644
--- a/drivers/zio-zero.c
+++ b/drivers/zio-zero.c
@@ -19,13 +19,15 @@ ZIO_PARAM_TRIGGER(zzero_trigger);
 ZIO_PARAM_BUFFER(zzero_buffer);
 
 ZIO_ATTR_DEFINE_STD(ZIO_DEV, zzero_zattr_cset8) = {
-	ZIO_ATTR_REG(zdev, ZIO_ATTR_NBITS, S_IRUGO, 0, 8), /* 8 bit -> ssize = 1 */
+	/* 8 bit -> ssize = 1 */
+	ZIO_ATTR_REG(zdev, ZIO_ATTR_NBITS, S_IRUGO, 0, 8),
 };
 ZIO_ATTR_DEFINE_STD(ZIO_DEV, zzero_zattr_cset32) = {
-	ZIO_ATTR_REG(zdev, ZIO_ATTR_NBITS, S_IRUGO, 0, 32), /* 32 bit -> ssize = 4 */
+	/* 32 bit -> ssize = 4 */
+	ZIO_ATTR_REG(zdev, ZIO_ATTR_NBITS, S_IRUGO, 0, 32),
 };
 /* This attribute is the sequence point for input channel number 0 of cset 2 */
-enum zzero_ext{
+enum zzero_ext {
 	ZZERO_SEQ,
 };
 static struct zio_attribute zzero_cset1_ext[] = {
diff --git a/include/linux/zio-sysfs.h b/include/linux/zio-sysfs.h
index a2f6a77f762626c78675d79222b229d1dc809d5e..3f09ac885cce56334ce0fbf17914be4419d35244 100644
--- a/include/linux/zio-sysfs.h
+++ b/include/linux/zio-sysfs.h
@@ -41,7 +41,7 @@ struct zio_attribute {
 };
 #define ZIO_ATTR_INDEX_NONE -1
 enum zattr_flags {
-    ZIO_ATTR_TYPE	 = 0x10,
+	ZIO_ATTR_TYPE		= 0x10,
 	ZIO_ATTR_TYPE_STD	= 0x00,
 	ZIO_ATTR_TYPE_EXT	= 0x10,
 	ZIO_ATTR_CONTROL	= 0x20,
diff --git a/triggers/zio-trig-user.c b/triggers/zio-trig-user.c
index 235e0c661cc1a879ef14596fcc22e9e06d518536..9fbe200072471bf94e7a467d36969119e2b5e229 100644
--- a/triggers/zio-trig-user.c
+++ b/triggers/zio-trig-user.c
@@ -117,5 +117,5 @@ static void __exit ztu_exit(void)
 
 
 /* This is the default trigger, and is part of zio-core: no module init/exit */
-int __init  __attribute__((alias("ztu_init"))) zio_default_trigger_init(void);
+int __init __attribute__((alias("ztu_init"))) zio_default_trigger_init(void);
 void __exit __attribute__((alias("ztu_exit"))) zio_default_trigger_exit(void);
diff --git a/zio-sys.c b/zio-sys.c
index eeaa6f43a061861cfd508f06a4a5929ba989ce5c..2c8621850b1f1fc14f58436798b7f89374989825 100644
--- a/zio-sys.c
+++ b/zio-sys.c
@@ -261,7 +261,7 @@ void zio_trigger_abort(struct zio_cset *cset)
 	 */
 	spin_lock(&cset->lock);
 	if ((ti->flags & ZIO_TI_BUSY) && !(ti->flags & ZIO_TI_COMPLETING)) {
-		if(ti->t_op->abort)
+		if (ti->t_op->abort)
 			ti->t_op->abort(cset);
 		else
 			__zio_internal_abort_free(cset);
@@ -381,8 +381,8 @@ static int zobj_unique_name(struct zio_object_list *zobj_list, const char *name)
 		return -EINVAL;
 	}
 	if (strlen(name) > ZIO_OBJ_NAME_LEN)
-		pr_warning("ZIO: name too long, cut to %d characters\n",
-			   ZIO_OBJ_NAME_LEN);
+		pr_warn("ZIO: name too long, cut to %d characters\n",
+			ZIO_OBJ_NAME_LEN);
 
 	pr_debug("%s\n", __func__);
 	list_for_each_entry(cur, &zobj_list->list, list) {
@@ -695,7 +695,7 @@ static void __zattr_trig_init_ctrl(struct zio_ti *ti, struct zio_control *ctrl)
 }
 static int __zattr_chan_init_ctrl(struct zio_channel *chan, unsigned int start)
 {
-	struct zio_ctrl_attr*ctrl_attr_chan;
+	struct zio_ctrl_attr *ctrl_attr_chan;
 	struct zio_control *ctrl;
 	struct zio_device *zdev;
 	struct zio_cset *cset;
@@ -1140,7 +1140,7 @@ static const struct zio_device_id *zio_match_id(const struct zio_device_id *id,
 						const struct zio_obj_head *head)
 {
 	while (id->name[0]) {
-		pr_debug("%s comparing  %s == %s \n", __func__,
+		pr_debug("%s comparing  %s == %s\n", __func__,
 			 id->name, head->name);
 		if (!strcmp(head->name, id->name))
 			return id;
@@ -1165,7 +1165,7 @@ static int zio_match_device(struct device *dev, struct device_driver *drv)
 	if (!zdrv->id_table)
 		return 0;
 	id = zio_match_id(zdrv->id_table, to_zio_head(dev));
-	if(!id)
+	if (!id)
 		return 0;
 	pr_debug("%s:%d\n", __func__, __LINE__);
 	/* device and driver match */
@@ -1366,7 +1366,7 @@ static int zattr_set_create(struct zio_obj_head *head,
 		goto out;
 
 	/* Allocate needed groups. dev->groups is null ended */
-	groups = kzalloc(sizeof(struct attribute_group*) * (g_count + 1),
+	groups = kzalloc(sizeof(struct attribute_group *) * (g_count + 1),
 			 GFP_KERNEL);
 	if (!groups)
 		return -ENOMEM;
@@ -1434,7 +1434,7 @@ static void zattr_set_remove(struct zio_obj_head *head)
 	zattr_set = zio_get_from_obj(head, zattr_set);
 	if (!zattr_set)
 		return;
-	if (! head->dev.groups)
+	if (!head->dev.groups)
 		return;
 	for (i = 0; head->dev.groups[i]; ++i) {
 		kfree(head->dev.groups[i]->attrs);
@@ -2240,7 +2240,7 @@ int zio_register_buf(struct zio_buffer_type *zbuf, const char *name)
 	/* Verify if it is a valid name */
 	err = zobj_unique_name(&zstat->all_buffer_types, name);
 	if (err)
-		return err < 0 ? err: -EBUSY;
+		return err < 0 ? err : -EBUSY;
 	strncpy(zbuf->head.name, name, ZIO_OBJ_NAME_LEN);
 
 	err = zio_init_buffer_fops(zbuf);
@@ -2290,7 +2290,7 @@ int zio_register_trig(struct zio_trigger_type *trig, const char *name)
 	/* Verify if it is a valid name */
 	err = zobj_unique_name(&zstat->all_trigger_types, name);
 	if (err)
-		return err < 0 ? err: -EBUSY;
+		return err < 0 ? err : -EBUSY;
 	strncpy(trig->head.name, name, ZIO_OBJ_NAME_LEN);
 	trig->head.zobj_type = ZIO_TRG;
 	err = zobj_register(&zstat->all_trigger_types, &trig->head, trig->owner);