netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Quentin Lambert <lambert.quentin@gmail.com>
To: chas williams - CONTRACTOR <chas@cmf.nrl.navy.mil>,
	David Laight <David.Laight@ACULAB.COM>
Cc: 'David Miller' <davem@davemloft.net>,
	"linux-atm-general@lists.sourceforge.net"
	<linux-atm-general@lists.sourceforge.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [net-next PATCH v3 1/1] atm: remove deprecated use of pci api
Date: Fri, 16 Jan 2015 15:10:25 +0100	[thread overview]
Message-ID: <54B91BD1.70909@gmail.com> (raw)
In-Reply-To: <20150116085721.56aa8075@thirdoffive.cmf.nrl.navy.mil>


On 16/01/2015 14:57, chas williams - CONTRACTOR wrote:
>
> Signed-off-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
> ---
>   drivers/atm/eni.c       |  33 +++++++------
>   drivers/atm/fore200e.c  |  22 +++++----
>   drivers/atm/he.c        | 125 +++++++++++++++++++++++++-----------------------
>   drivers/atm/he.h        |   4 +-
>   drivers/atm/idt77252.c  | 107 ++++++++++++++++++++++-------------------
>   drivers/atm/iphase.c    |  54 +++++++++++----------
>   drivers/atm/lanai.c     |  14 ++----
>   drivers/atm/nicstar.c   |  60 +++++++++++------------
>   drivers/atm/solos-pci.c |  26 +++++-----
>   drivers/atm/zatm.c      |  17 ++++---
>   10 files changed, 243 insertions(+), 219 deletions(-)
>
[]
> diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c
> index d5d9eaf..75dde90 100644
> --- a/drivers/atm/fore200e.c
> +++ b/drivers/atm/fore200e.c
> @@ -425,7 +425,7 @@ static void fore200e_pca_write(u32 val, volatile u32 __iomem *addr)
>   static u32
>   fore200e_pca_dma_map(struct fore200e* fore200e, void* virt_addr, int size, int direction)
>   {
> -    u32 dma_addr = pci_map_single((struct pci_dev*)fore200e->bus_dev, virt_addr, size, direction);
> +    u32 dma_addr = dma_map_single(&((struct pci_dev *) fore200e->bus_dev)->dev, virt_addr, size, direction);
>   
>       DPRINTK(3, "PCI DVMA mapping: virt_addr = 0x%p, size = %d, direction = %d,  --> dma_addr = 0x%08x\n",
>   	    virt_addr, size, direction, dma_addr);
>
[]

I am going try to make similar changes in some other part of the kernel and
I was wondering if you could explain how you decided it wasn't necessary to
check for "((struct pci_dev *) fore200e->bus_dev" nullity for instance.

Thanks,

Quentin

  reply	other threads:[~2015-01-16 14:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-12 16:10 [PATCH v2 1/1] atm: remove deprecated use of pci api Quentin Lambert
2015-01-14  2:59 ` David Miller
2015-01-14 13:58   ` chas williams - CONTRACTOR
2015-01-14 14:25     ` Quentin Lambert
2015-01-14 14:47   ` David Laight
2015-01-16 13:57     ` [net-next PATCH v3 " chas williams - CONTRACTOR
2015-01-16 14:10       ` Quentin Lambert [this message]
2015-01-16 14:52         ` chas williams - CONTRACTOR
2015-01-16 14:54           ` Quentin Lambert
2015-01-18  5:28       ` David Miller

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=54B91BD1.70909@gmail.com \
    --to=lambert.quentin@gmail.com \
    --cc=David.Laight@ACULAB.COM \
    --cc=chas@cmf.nrl.navy.mil \
    --cc=davem@davemloft.net \
    --cc=linux-atm-general@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).