From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48575) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsRXw-0000F2-OK for qemu-devel@nongnu.org; Sat, 31 Oct 2015 04:29:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZsRXt-00022Z-HQ for qemu-devel@nongnu.org; Sat, 31 Oct 2015 04:29:56 -0400 Received: from mga02.intel.com ([134.134.136.20]:41591) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsRXt-00022J-Bj for qemu-devel@nongnu.org; Sat, 31 Oct 2015 04:29:53 -0400 References: <1446184587-142784-1-git-send-email-guangrong.xiao@linux.intel.com> <1446184587-142784-15-git-send-email-guangrong.xiao@linux.intel.com> <5633A388.9020404@redhat.com> From: Xiao Guangrong Message-ID: <56347A64.6090306@linux.intel.com> Date: Sat, 31 Oct 2015 16:23:00 +0800 MIME-Version: 1.0 In-Reply-To: <5633A388.9020404@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v6 14/33] pc-dimm: drop the prefix of pc-dimm List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , pbonzini@redhat.com, imammedo@redhat.com Cc: ehabkost@redhat.com, kvm@vger.kernel.org, mst@redhat.com, gleb@kernel.org, mtosatti@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, dan.j.williams@intel.com, rth@twiddle.net On 10/31/2015 01:06 AM, Eric Blake wrote: > On 10/29/2015 11:56 PM, Xiao Guangrong wrote: >> This patch is generated by this script: >> >> find ./ -name "*.[ch]" -o -name "*.json" -o -name "trace-events" -type f \ >> | xargs sed -i "s/PC_DIMM/DIMM/g" >> >> find ./ -name "*.[ch]" -o -name "*.json" -o -name "trace-events" -type f \ >> | xargs sed -i "s/PCDIMM/DIMM/g" >> >> find ./ -name "*.[ch]" -o -name "*.json" -o -name "trace-events" -type f \ >> | xargs sed -i "s/pc_dimm/dimm/g" > > The '-type f' binds only to the '-name trace-events' clause, and not the > 'name "*.[ch]"' or '-name "*.json"', but since we don't have any > directories by those names, it didn't matter. You probably could have > eliminated the -type f with no consequences, rather than adding "(" and > ")". In fact, you could have used git rather than find to do it: > > git grep -il 'pc_\?dimm' | xargs ... > > which finds only one additional instance of pc_dimm in > stubs/Makefile.objs - so maybe you should: > > git mv stubs/qmp_{pc_,}dimm_device_list.c > > either in this patch or as a followup. > > Could compress these three sed lines into one, if desired: > find ... | xargs sed -i 's/pc_\?\(dimm\)/\1/ig' > > But doesn't really matter. I'm fine if you leave your commit message > as-is, and will let you decide what to do about the stub file name. > Really good lesson for me! >> >> find ./ -name "trace-events" -type f | xargs sed -i "s/pc-dimm/dimm/g" >> >> It prepares the work which abstracts dimm device type for both pc-dimm and >> nvdimm >> >> Signed-off-by: Xiao Guangrong >> --- > > Reviewed-by: Eric Blake > >> qapi-schema.json | 8 +-- > > Touches public interface files, but does not affect ABI, so it is safe. > Thanks for your sharing and review, Eric!