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

Re: [PATCH v2 02/11] xen/arm: Add new device type for PCI


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>
  • Date: Mon, 27 Sep 2021 08:18:22 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=krYohFNs8smbKXzf1DrxvP6rw7g3WhfrIED2O9IS+j8=; b=IbUW0QR7LcaaV6gn+bx646EB2mSjUagqBkYJeC8gWs5XuFRLAF41oGNSXd9FLwmfVOGnIjvQtvEpDNvLjkvsl8MbgJ25QbLEZl7GBqoM7rcalskKJJhIxefLgNVtPtMRC+FNh1cwuTHtGT6GmdoBcZQ58hKV+RqJMrLDit9SyuZ6LhZgwUU5yn7V1fIbG6PY6DnSmvuq20t2v2acMOGS+dDLHpQDmnRk1zTiAD+QhvA9EtglADMmstqnZmeSXRq/pe5th+HvfZCZIQmp59DQA0aA0F8G5iP4UVvpQxGPEu24nMGLNLN9ReQsdRDKxon6oCWBE/PvwLND8x4ZTn5iaQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T9Z8C0HWR5W67PjFtMGl2UFRK9PxwAu6zzfGitZ2TAs4OuR0OzMs8cLoImBRGone6qWnHsa2lk02ku6MYzftblQFmwu1eobXqhL9hgGPvKihZ8NLJIUzNXJvjTpbb/nvDt/giem6SDZviYoCfCSfMACbb7S++ChdHNE/P3mo10MCzLHYYEV0weE57Tib/y1/ihTOkCXhKgvywwl1ZNuSsvXd9KGCGaf7XpVyBD6Okm+jy6u1I5CzsfYvuyk0oi+O1HscFta3JMqDNpcgqarK151T0NvchhpXsAC+krsWuQ3B2CtrIZQ+jE13W1W3fcQV4SFVvbQICJJvm/q5Bvp8Fw==
  • Authentication-results: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=epam.com;
  • Cc: "julien@xxxxxxx" <julien@xxxxxxx>, "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>, Oleksandr Tyshchenko <Oleksandr_Tyshchenko@xxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Artem Mygaiev <Artem_Mygaiev@xxxxxxxx>, "roger.pau@xxxxxxxxxx" <roger.pau@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Rahul Singh <rahul.singh@xxxxxxx>, Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 27 Sep 2021 08:18:34 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHXsHoxl5/FGbezwky3nlX6PVRH4qu3hVeAgAAKLIA=
  • Thread-topic: [PATCH v2 02/11] xen/arm: Add new device type for PCI

On 27.09.21 10:41, Jan Beulich wrote:
> On 23.09.2021 14:54, Oleksandr Andrushchenko wrote:
>> --- a/xen/arch/arm/pci/pci.c
>> +++ b/xen/arch/arm/pci/pci.c
>> @@ -27,6 +27,16 @@ int arch_pci_clean_pirqs(struct domain *d)
>>       return 0;
>>   }
>>   
>> +struct pci_dev *dev_to_pci(struct device *dev)
>> +{
>> +    struct arch_pci_dev *arch_dev;
>> +
>> +    ASSERT(dev->type == DEV_PCI);
>> +
>> +    arch_dev = container_of((dev), struct arch_pci_dev, dev);
> Nit: This not being a macro, the inner parentheses aren't needed.
>
>> +    return container_of(arch_dev, struct pci_dev, arch);
> Two successive container_of() on the same pointer look odd. Is
> there a reason a single one wouldn't do?
>
>      return container_of(dev, struct pci_dev, arch.dev);
Good catch, thank you! No reason at all, will fix
>
> Jan
>

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.