qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 1/5] fix some coding style problems


From: Cao jin
Subject: Re: [Qemu-devel] [PATCH v4 1/5] fix some coding style problems
Date: Sat, 9 Apr 2016 16:49:51 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0



On 04/08/2016 02:29 PM, Markus Armbruster wrote:
Cao jin <address@hidden> writes:

This patch comes along with patch "Add param Error ** for msi_init".

What do you want to say with this sentence?  I think it could be dropped
without loss.


According to what I learned here(http://lists.nongnu.org/archive/html/qemu-trivial/2015-10/msg00116.html), generally, I don`t send this kind of coding style patch separately:). So I add that interpretation per suggestion.
Will remove it in next version.

Add more newlines to make the code block well separated; add more
comments for msi_init; and fix a indentation.

          goto err_pcie_cap;
      }
-    pcie_cap_root_init(d);
+

Code motion, not covered by commit message.  Should this be in a later
patch?


Yes...I forget to mention it in commit message. It is just put relevant code together, make the code more logical. Because it is so trivial, and this patch is for all the trivial modification , so maybe I can cover it in the commit message:)

+/*
+ * Make PCI device @dev MSI-capable.
+ * Non-zero @offset puts capability MSI at that offset in PCI config
+ * space.
+ * @nr_vectors is the number of MSI vectors (1, 2, 4, 8, 16 or 32).
+ * If @msi64bit, make the device capable of sending a 64-bit message
+ * address.
+ * If @msi_per_vector_mask, make the device support per-vector masking.
+ * @errp is for returning errors.
+ * Return the offset of capability MSI in config space on success,
+ * set @errp and return -errno on error.
+ * -ENOTSUP means lacking msi support for a msi-capable platform.

Missing: -ENOSPC and -EINVAL.  Intentional?


Yep...a kind of. Because I think -ENOTSUP deserve more comments, and the other two, the meaning are as the name implies.
I will make it up

--
Yours Sincerely,

Cao jin





reply via email to

[Prev in Thread] Current Thread [Next in Thread]