From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44138) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZoHq8-00042M-B4 for qemu-devel@nongnu.org; Mon, 19 Oct 2015 17:19:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZoHq3-0002Bx-H3 for qemu-devel@nongnu.org; Mon, 19 Oct 2015 17:19:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40282) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZoHq3-0002Bb-CX for qemu-devel@nongnu.org; Mon, 19 Oct 2015 17:19:27 -0400 Date: Tue, 20 Oct 2015 00:19:22 +0300 From: "Michael S. Tsirkin" Message-ID: <20151020001411-mutt-send-email-mst@redhat.com> References: <1445216059-88521-1-git-send-email-guangrong.xiao@linux.intel.com> <1445216059-88521-28-git-send-email-guangrong.xiao@linux.intel.com> <20151018201620-mutt-send-email-mst@redhat.com> <56246BE0.2040901@linux.intel.com> <20151019100724-mutt-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH v4 27/33] nvdimm acpi: save arg3 for NVDIMM device _DSM method List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Dan Williams Cc: Xiao Guangrong , ehabkost@redhat.com, KVM list , Gleb Natapov , mtosatti@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, imammedo@redhat.com, Paolo Bonzini , rth@twiddle.net On Mon, Oct 19, 2015 at 10:29:50AM -0700, Dan Williams wrote: > On Mon, Oct 19, 2015 at 12:09 AM, Michael S. Tsirkin wrote: > > On Mon, Oct 19, 2015 at 12:04:48PM +0800, Xiao Guangrong wrote: > > I mean don't use ASL to comment C. It's not more readable. > > Describe why the code is the way it is. Use variables by preference, > > C does not have weird limitations like ASL so you don't need to call > > your variables "arg3". What does it hold? > > > > What it holds is function number specific. It's similar to > SYSCALL_DEFINEx where the ASL code is there to marshal arguments from > the OS through ACPI to a BIOS routine. See the definition of the > example _DSM functions here and the usages of "Arg3": > http://pmem.io/documents/NVDIMM_DSM_Interface_Example.pdf So it seems to say "3.1.1.1.1 Input (Arg3)". Is that right? So Aml *input = aml_arg(3); /* Input (Arg3) */ or even Aml *input_arg3 = aml_arg(3); /* Input (Arg3) */ My point is we are not writing ASL. There is no reason to use cryptic names.