kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Deng-Cheng Zhu <dengcheng.zhu@imgtec.com>
To: David Daney <ddaney.cavm@gmail.com>
Cc: <pbonzini@redhat.com>, <gleb@kernel.org>, <kvm@vger.kernel.org>,
	<sanjayl@kymasys.com>, <james.hogan@imgtec.com>,
	<ralf@linux-mips.org>, <linux-mips@linux-mips.org>
Subject: Re: [PATCH v4 5/7] MIPS: KVM: Rename files to remove the prefix "kvm_" and "kvm_mips_"
Date: Thu, 26 Jun 2014 15:44:49 -0700	[thread overview]
Message-ID: <53ACA261.7040007@imgtec.com> (raw)
In-Reply-To: <53AC96D7.8040208@gmail.com>

On 06/26/2014 02:55 PM, David Daney wrote:
> On 06/26/2014 12:55 PM, Deng-Cheng Zhu wrote:
>> On 06/26/2014 12:28 PM, David Daney wrote:
>>> On 06/26/2014 12:11 PM, Deng-Cheng Zhu wrote:
>>>> From: Deng-Cheng Zhu <dengcheng.zhu@imgtec.com>
>>>>
>>>> Since all the files are in arch/mips/kvm/, there's no need of the
>>>> prefixes
>>>> "kvm_" and "kvm_mips_".
>>>>
>>>
>>> I don't like this change.
>>>
>>> It will leads me to confuse arch/mips/kvm/interrupt.h with
>>> include/linux/interrupt.h
>>
>> We have <linux/interrupt.h> and "interrupt.h".
>>
>>>
>>> x86 calls these things irq.c and irq.h, perhaps that would be a little
>>> better.
>>
>> There's also include/linux/irq.h
>>
>
> Yes, I know.

I simply wanted to let you know that if arch/mips/kvm/interrupt.h and 
include/linux/interrupt.h are consufing, then arch/x86/kvm/irq.h and 
include/linux/irq.h the same -- not even a little better.

>
>>>
>>> There is precedence in x86 for some of the names though.
>>>
>>> But really why churn up the code in the first place?  the kvm_mips
>>> prefix does tell us exactly what we are dealing with.
>>
>> That's why people created the arch/mips/kvm directory, isn't it?
>
> No.  Segregating things into directories keeps code related to one 
> functional area together.
>
> File names are different.  They should carry as much meaning as possible.

Remember that directory path is also part of file info.

>
> For examples of this look at some of these directories:
>
> drivers/net/ethernet/intel/ixgb
> drivers/i2c/busses

One can find way more examples not having prefixes. Look at kernel/events/. 
In the beginning, Perf-events has things under kernel. Then people did 
things like:

kernel/perf_event.c -> kernel/events/core.c

If it's kernel/events/perf_events_core.c, I think it looks ugly.

Other examples are kernel/sched/, mm/, and many more. When talking about 
filemap.c, one may think it may be under fs/. But there's mm/filemap.c (not 
mm/mm_filemap.c which seems, again, ugly). What I want to say is that: 
Talking about a file should include its path.


Deng-Cheng


  reply	other threads:[~2014-06-27  2:58 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-26 19:11 [PATCH v4 0/7] MIPS: KVM: Bugfixes and cleanups Deng-Cheng Zhu
2014-06-26 19:11 ` [PATCH v4 1/7] MIPS: KVM: Reformat code and comments Deng-Cheng Zhu
2014-06-26 19:11 ` [PATCH v4 2/7] MIPS: KVM: Use KVM internal logger Deng-Cheng Zhu
2014-06-26 19:11 ` [PATCH v4 3/7] MIPS: KVM: Simplify functions by removing redundancy Deng-Cheng Zhu
2014-06-26 19:11 ` [PATCH v4 4/7] MIPS: KVM: Remove unneeded volatile Deng-Cheng Zhu
2014-06-26 19:11 ` [PATCH v4 5/7] MIPS: KVM: Rename files to remove the prefix "kvm_" and "kvm_mips_" Deng-Cheng Zhu
2014-06-26 19:28   ` David Daney
2014-06-26 19:55     ` Deng-Cheng Zhu
2014-06-26 21:55       ` David Daney
2014-06-26 22:44         ` Deng-Cheng Zhu [this message]
2014-06-26 23:53           ` Deng-Cheng Zhu
2014-06-27 14:27           ` Paolo Bonzini
2014-06-26 23:21         ` James Hogan
2014-06-27  0:32           ` David Daney
2014-06-26 19:11 ` [PATCH v4 6/7] MIPS: KVM: Skip memory cleaning in kvm_mips_commpage_init() Deng-Cheng Zhu
2014-06-26 19:11 ` [PATCH v4 7/7] MIPS: KVM: Remove dead code of TLB index error in kvm_mips_emul_tlbwr() Deng-Cheng Zhu
2014-06-27 14:22 ` [PATCH v4 0/7] MIPS: KVM: Bugfixes and cleanups James Hogan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53ACA261.7040007@imgtec.com \
    --to=dengcheng.zhu@imgtec.com \
    --cc=ddaney.cavm@gmail.com \
    --cc=gleb@kernel.org \
    --cc=james.hogan@imgtec.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=pbonzini@redhat.com \
    --cc=ralf@linux-mips.org \
    --cc=sanjayl@kymasys.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).