All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cao jin <caoj.fnst@cn.fujitsu.com>
To: <marcel@redhat.com>, <qemu-devel@nongnu.org>
Cc: qemu-trivial@nongnu.org, mst@redhat.com
Subject: Re: [Qemu-trivial] [PATCH] PCI Trivial: remove superfluous code
Date: Wed, 25 Nov 2015 09:10:29 +0800	[thread overview]
Message-ID: <56550A85.1090103@cn.fujitsu.com> (raw)
In-Reply-To: <5654ACD7.9090303@gmail.com>



On 11/25/2015 02:30 AM, Marcel Apfelbaum wrote:
> On 11/23/2015 03:19 PM, Cao jin wrote:
>> remove superfluous code in do_pci_register_device(). See its caller:
>> pci_qdev_realize()
>>
>> Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
>> ---
>>   hw/pci/pci.c | 1 -
>>   1 file changed, 1 deletion(-)
>>
>> diff --git a/hw/pci/pci.c b/hw/pci/pci.c
>> index 168b9cc..4d16da0 100644
>> --- a/hw/pci/pci.c
>> +++ b/hw/pci/pci.c
>> @@ -878,7 +878,6 @@ static PCIDevice *do_pci_register_device(PCIDevice
>> *pci_dev, PCIBus *bus,
>>          return NULL;
>>       }
>>
>> -    pci_dev->devfn = devfn;
>
> Hi, can you please explain why this line is not needed?
> As far as I see if do_pci_register_device is called with devfn -1 (auto
> assign),
> the devfn will be computed by this function and then passed to pci_dev.
>

uh..sorry, my mistake. You remind me... I miss the "auto assign" 
condition. Please forget this patch...

> Am I missing anything?
>
> Thanks,
> Marcel
>
>
>>       dma_as = pci_device_iommu_address_space(pci_dev);
>>
>>       memory_region_init_alias(&pci_dev->bus_master_enable_region,
>>
>
>

-- 
Yours Sincerely,

Cao Jin

-- 
This message has been scanned for viruses and
dangerous content by Fujitsu, and is believed to be clean.



WARNING: multiple messages have this Message-ID (diff)
From: Cao jin <caoj.fnst@cn.fujitsu.com>
To: marcel@redhat.com, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, mst@redhat.com
Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH] PCI Trivial: remove superfluous code
Date: Wed, 25 Nov 2015 09:10:29 +0800	[thread overview]
Message-ID: <56550A85.1090103@cn.fujitsu.com> (raw)
In-Reply-To: <5654ACD7.9090303@gmail.com>



On 11/25/2015 02:30 AM, Marcel Apfelbaum wrote:
> On 11/23/2015 03:19 PM, Cao jin wrote:
>> remove superfluous code in do_pci_register_device(). See its caller:
>> pci_qdev_realize()
>>
>> Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
>> ---
>>   hw/pci/pci.c | 1 -
>>   1 file changed, 1 deletion(-)
>>
>> diff --git a/hw/pci/pci.c b/hw/pci/pci.c
>> index 168b9cc..4d16da0 100644
>> --- a/hw/pci/pci.c
>> +++ b/hw/pci/pci.c
>> @@ -878,7 +878,6 @@ static PCIDevice *do_pci_register_device(PCIDevice
>> *pci_dev, PCIBus *bus,
>>          return NULL;
>>       }
>>
>> -    pci_dev->devfn = devfn;
>
> Hi, can you please explain why this line is not needed?
> As far as I see if do_pci_register_device is called with devfn -1 (auto
> assign),
> the devfn will be computed by this function and then passed to pci_dev.
>

uh..sorry, my mistake. You remind me... I miss the "auto assign" 
condition. Please forget this patch...

> Am I missing anything?
>
> Thanks,
> Marcel
>
>
>>       dma_as = pci_device_iommu_address_space(pci_dev);
>>
>>       memory_region_init_alias(&pci_dev->bus_master_enable_region,
>>
>
>

-- 
Yours Sincerely,

Cao Jin

-- 
This message has been scanned for viruses and
dangerous content by Fujitsu, and is believed to be clean.

  reply	other threads:[~2015-11-25  1:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-23 13:19 [Qemu-trivial] [PATCH] PCI Trivial: remove superfluous code Cao jin
2015-11-23 13:19 ` [Qemu-devel] " Cao jin
2015-11-24 18:30 ` [Qemu-trivial] " Marcel Apfelbaum
2015-11-24 18:30   ` [Qemu-devel] " Marcel Apfelbaum
2015-11-25  1:10   ` Cao jin [this message]
2015-11-25  1:10     ` Cao jin

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=56550A85.1090103@cn.fujitsu.com \
    --to=caoj.fnst@cn.fujitsu.com \
    --cc=marcel@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.