Re: [PATCH] Bluetooth: Fix coding style

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

 



Hi Dave,

> > Whose rules are they?
> 
> Find me an example in another major core subsystem, let's use
> mm/memory.c as an example as that file gets hit by a lot of people,
> that uses the multi-line conditional TAB-only crap you guys seem to
> keep using.
> 
> They don't.  All the examples you'll find are of the form:
> 
> 	if (a &&
> 	    b)
> 
> not:
> 
> 	if (a &&
> 			b)

except of course in zap_vma_ptes(), remap_pmd_range(), remap_pud_range()
and do_wp_page().

So we also have this one:

		if ((vma->vm_flags & (VM_WRITE|VM_SHARED)) ==
				     (VM_WRITE|VM_SHARED))
			goto reuse;

And this:

	} else if (unlikely((vma->vm_flags & (VM_WRITE|VM_SHARED)) ==
					(VM_WRITE|VM_SHARED))) {

What kind of style requirement is that one?

			tmp = vma->vm_ops->page_mkwrite(vma, &vmf);
			if (unlikely(tmp &
					(VM_FAULT_ERROR | VM_FAULT_NOPAGE))) {
				ret = tmp;
				goto unwritable_page;
			}

Have you actually looked at mm/memory.c and confirmed that it is a good
example of multi-line indentation?

When it comes to function declaration and function calls, the style in
mm/memory.c is mixed. We can start counting, but for both other
multi-line cases it seems that tab-only indentation is predominant.

Regards

Marcel


--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux