[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: Oleksandr Andrushchenko <andr2000@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 27 Sep 2021 09:41:57 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=6o1igZ1aVG15XpHjc0F0Q2prJ99ZMsbv9St3Ick7HT4=; b=ki9aPtqVyFfg0IEKp7zgQEEBtCJD4YryW2zWM7Fbavp8DRW7mQ4EAbXr2PA7M83AQRBWEVtzDDQNRCDMPnsQ7fFAQl/V7kqPxPDodzVLjE9s9F1MAl1Po9yl0LWrbNIm1HJYSQh3TqUTQ22kMq/ig7QY1pGl4cje9FJQMeHuWgDtdgHY5u94a4JcTS/ElytTY5q7fnAGp8B7xv9dFR/k8nhxJEN6he7tu4bSryAcXlYiJXzXYdWtB2eGK9NV3p27SnO9XMYyD3aRUojHA5KbEMZeix2QCPS74hj7gUPEDFJIDPw8H9yG9RI7+jFeCVgSrGwT2SRcXlBi3seFBuFqkw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cYEqgQ7OklhOwI64W7r5OR/2PAVFQPNbKso26H42cT0A3MtGunw5DdA2IwbvNHihsVGGzLBPH3lFhYrj6Cl/xRvLt+8jDzd2GA7Ya1uwOt87yiqXaHBi8/GMphY7AKNykWCEYRQM8bLrSttgZ73PKzzc77lOFV0PZ3WzpYsSr970fwsFC6GNF7KpHfxOD9bnNxX6TdUp4zp0t8iSQJ6/cFMfu0FYj1wmeyI4vHtsYECggwBKtga39LK3Jbw7tK+bEFypAu7ET7wYafQS2rtWiYQHx4kV/MbK0tDf0muCUokDG/nP9ZQoydS6fiXdiy7RxswaaPqXpCMHqCV+AdsDxQ==
  • Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
  • Cc: julien@xxxxxxx, sstabellini@xxxxxxxxxx, oleksandr_tyshchenko@xxxxxxxx, volodymyr_babchuk@xxxxxxxx, Artem_Mygaiev@xxxxxxxx, roger.pau@xxxxxxxxxx, bertrand.marquis@xxxxxxx, rahul.singh@xxxxxxx, Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 27 Sep 2021 07:42:08 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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);

Jan




 


Rackspace

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