Re: [PATCH 4/4] libata: clean up the SFF code for coding style

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

 



Tejun Heo <tj@xxxxxxxxxx> wrote:
> Jeff Garzik wrote:
>> Alan Cox wrote:
>
>>>>>          if (ata_is_atapi(qc->tf.protocol) &&
>>>>> -            !(qc->dev->flags & ATA_DFLAG_CDB_INTR))
>>>>> +           !(qc->dev->flags & ATA_DFLAG_CDB_INTR))
>>>> Ditto.
>>>
>>> Its lining up the bracketing but hey I'm not fussed, just twiddling where
>>> checkpatch warned and the like.
>>>
>>>>> - err_out:
>>>>> +err_out:
>>>> Yes, I've wondered about these myself occasionally. Personally, I don't
>>>> insert a blank before those labels either and would be in favour of such
>>>> a change. But do we actually have a convention regarding this matter?
>>>
>>> CodingStyle chapter 7 which is of course overridable by Jeff ;)
>> 
>> libata style has always matched that:  labels go in column 1, without
>> any preceding whitespace.
>
> Heh... I am the one who is always putting in the extra space there,
> mainly because emacs dictates how I format my code. :-) I'll try to turn
> it off.

(defun my-c-mode-hook ()
  (if (and (buffer-file-name)
	   (string-match "/home/eo/source/kernel/" (buffer-file-name)))
      (c-set-style "linux")))
(add-hook 'c-mode-hook 'my-c-mode-hook)

works very nicely for me and it doesn't insert the extra blank in front
of labels either except for the situation where the code following the
label is at indentation level > 1.

Regards,

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

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux