[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Re: [PATCH v6 08/12] pcie/aer: helper functions for pci
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] Re: [PATCH v6 08/12] pcie/aer: helper functions for pcie aer capability |
Date: |
Fri, 22 Oct 2010 13:28:00 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
"Michael S. Tsirkin" <address@hidden> writes:
> On Wed, Oct 20, 2010 at 05:18:57PM +0900, Isaku Yamahata wrote:
>> This patch implements helper functions for pcie aer capability
>> which will be used later.
>>
>> Signed-off-by: Isaku Yamahata <address@hidden>
>
> Some style comments and a couple of minor bugs.
[...]
>> +
>> +static int aer_log_add_err(PCIEAERLog *aer_log, const PCIEAERErr *err)
>> +{
>> + uint32_t i;
>> + if (aer_log_full(aer_log)) {
>> + return -1;
>> + }
>> + i = aer_log_add(aer_log);
>> + memcpy(&aer_log->log[i], err, sizeof(*err));
>
> sizeof is not a function, you don't need ()
Matter of taste. Yes, it's an operator, but it's as function-like as
operators get.
For what it's worth, grep says roughly 98% of our sizeof uses are
followed by '('. I doubt the parenthesis are required for grouping that
often.
[...]
[Qemu-devel] [PATCH v6 05/12] x3130: pcie upstream port, Isaku Yamahata, 2010/10/20
[Qemu-devel] [PATCH v6 09/12] pcie/aer: glue aer error injection into qemu monitor, Isaku Yamahata, 2010/10/20
[Qemu-devel] [PATCH v6 02/12] pci/bridge: fix pci_bridge_reset(), Isaku Yamahata, 2010/10/20
[Qemu-devel] [PATCH v6 07/12] pcie/hotplug: introduce pushing attention button command, Isaku Yamahata, 2010/10/20