linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Charkov <alchark@gmail.com>
To: Ben Hutchings <ben@decadent.org.uk>
Cc: netdev@vger.kernel.org, Tony Prisk <linux@prisktech.co.nz>,
	devicetree@vger.kernel.org, Roger Luethi <rl@hellgate.ch>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] net: via-rhine: switch to generic DMA functions
Date: Mon, 27 Jan 2014 19:26:45 +0400	[thread overview]
Message-ID: <CABjd4Yyq_Mia=2DkC83Wpi6o1o3m5+yoMcDL4WdZmuLvRtu6qg@mail.gmail.com> (raw)
In-Reply-To: <1390834190.2735.143.camel@deadeye.wl.decadent.org.uk>

2014/1/27 Ben Hutchings <ben@decadent.org.uk>:
> On Mon, 2014-01-27 at 15:51 +0400, Alexey Charkov wrote:
>> Remove legacy PCI DMA wrappers and instead use generic DMA functions
>> directly in preparation for OF bus binding
>>
>> Signed-off-by: Alexey Charkov <alchark@gmail.com>
>> Signed-off-by: Roger Luethi <rl@hellgate.ch>
>> ---
>>  drivers/net/ethernet/via/via-rhine.c | 56 +++++++++++++++++++-----------------
>>  1 file changed, 29 insertions(+), 27 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/via/via-rhine.c b/drivers/net/ethernet/via/via-rhine.c
>> index ef312bc..fee8732 100644
>> --- a/drivers/net/ethernet/via/via-rhine.c
>> +++ b/drivers/net/ethernet/via/via-rhine.c
>> @@ -919,10 +919,10 @@ static int rhine_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
>>               goto err_out;
>>
>>       /* this should always be supported */
>> -     rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
>> +     rc = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32));
>>       if (rc) {
>>               dev_err(&pdev->dev,
>> -                     "32-bit PCI DMA addresses not supported by the card!?\n");
>> +                     "32-bit DMA addresses not supported by the card!?\n");
>>               goto err_out;
>>       }
>>
>> @@ -1094,20 +1094,22 @@ static int alloc_ring(struct net_device* dev)
>>       void *ring;
>>       dma_addr_t ring_dma;
>>
>> -     ring = pci_alloc_consistent(rp->pdev,
>> +     ring = dma_alloc_coherent(&rp->pdev->dev,
>>                                   RX_RING_SIZE * sizeof(struct rx_desc) +
>>                                   TX_RING_SIZE * sizeof(struct tx_desc),
>> -                                 &ring_dma);
>> +                                 &ring_dma,
>> +                                     GFP_ATOMIC);
> [...]
>
> Indentation is messed up here (and in several other function calls
> you're changing).  You should align the function arguments so each line
> begins in the column after the opening parenthesis.

Ben, thanks for pointing out. I actually just tried to follow the
style of surrounding code, but happy to adjust if that's the preferred
option. From what I can see, these lines should still fit in below 80
cols even with increased indents...

Should we then also adjust other function calls within the driver with
similar indentation (if any), that are currently not touched by this
patch series?

Thanks,
Alexey

  reply	other threads:[~2014-01-27 15:26 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1385227995-3956-1-git-send-email-alchark@gmail.com>
2013-11-30 19:07 ` [PATCH 0/3] net: via-rhine: add support for on-chip Rhine controllers Alexey Charkov
2014-01-27 11:51 ` [PATCH 0/3] Resubmit: " Alexey Charkov
2014-01-27 11:51   ` [PATCH 1/3] net: via-rhine: switch to generic DMA functions Alexey Charkov
2014-01-27 14:49     ` Ben Hutchings
2014-01-27 15:26       ` Alexey Charkov [this message]
2014-01-27 15:28         ` Ben Hutchings
2014-01-27 11:51   ` [PATCH 2/3] net: via-rhine: reduce usage of the PCI-specific struct Alexey Charkov
2014-01-27 11:51   ` [PATCH 3/3] net: via-rhine: add OF bus binding Alexey Charkov
2014-01-27 14:57     ` Ben Hutchings
2014-01-27 15:34       ` Alexey Charkov
2014-01-27 23:40         ` Ben Hutchings
2014-01-28 18:31           ` Alexey Charkov
2014-01-31 14:24             ` Ben Hutchings
2014-01-27 15:56     ` Rob Herring
2014-01-28 18:27       ` Alexey Charkov
2014-01-29  3:44         ` Tony Prisk
2014-01-29  5:20           ` Alexey Charkov
2014-01-29 14:59             ` Rob Herring
2014-01-29 13:46         ` Rob Herring
2014-04-22 15:28   ` [PATCH v2 0/3] net: via-rhine: add support for on-chip Rhine controllers Alexey Charkov
2014-04-22 15:28     ` [PATCH 1/3] net: via-rhine: switch to generic DMA functions Alexey Charkov
2014-04-22 15:28     ` [PATCH 2/3] net: via-rhine: reduce usage of the PCI-specific struct Alexey Charkov
2014-04-22 15:28     ` [PATCH 3/3] net: via-rhine: add OF bus binding Alexey Charkov
2014-04-22 15:46       ` Rob Herring
2014-04-23 19:26     ` [PATCH v2 0/3] net: via-rhine: add support for on-chip Rhine controllers 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='CABjd4Yyq_Mia=2DkC83Wpi6o1o3m5+yoMcDL4WdZmuLvRtu6qg@mail.gmail.com' \
    --to=alchark@gmail.com \
    --cc=ben@decadent.org.uk \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@prisktech.co.nz \
    --cc=netdev@vger.kernel.org \
    --cc=rl@hellgate.ch \
    /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).