[PATCH] powerpc/ibmveth: fix multiple errors with dma_mapping_error conversion - Kernel

This is a discussion on [PATCH] powerpc/ibmveth: fix multiple errors with dma_mapping_error conversion - Kernel ; The addition of an argument to dma_mapping_error() in commit 8d8bb39b9eba32dd70e87fd5ad5c5dd4ba118e06 "dma-mapping: add the device argument to dma_mapping_error()" left a bit of fallout: drivers/net/ibmveth.c:263: error: too few arguments to function 'dma_mapping_error' drivers/net/ibmveth.c:264: error: expected ')' before 'goto' drivers/net/ibmveth.c:284: error: expected expression ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: [PATCH] powerpc/ibmveth: fix multiple errors with dma_mapping_error conversion

  1. [PATCH] powerpc/ibmveth: fix multiple errors with dma_mapping_error conversion

    The addition of an argument to dma_mapping_error() in commit
    8d8bb39b9eba32dd70e87fd5ad5c5dd4ba118e06 "dma-mapping: add the device
    argument to dma_mapping_error()" left a bit of fallout:

    drivers/net/ibmveth.c:263: error: too few arguments to function 'dma_mapping_error'
    drivers/net/ibmveth.c:264: error: expected ')' before 'goto'
    drivers/net/ibmveth.c:284: error: expected expression before '}' token
    drivers/net/ibmveth.c:297: error: too few arguments to function 'dma_mapping_error'
    drivers/net/ibmveth.c:298: error: expected ')' before 'dma_unmap_single'
    drivers/net/ibmveth.c:306: error: expected expression before '}' token
    drivers/net/ibmveth.c:491: error: too few arguments to function 'dma_mapping_error'
    drivers/net/ibmveth.c:927: error: too few arguments to function 'dma_mapping_error'
    drivers/net/ibmveth.c:927: error: expected ')' before '{' token
    drivers/net/ibmveth.c:974: error: expected expression before '}' token
    drivers/net/ibmveth.c:914: error: label 'out' used but not defined m

    Signed-off-by: Stephen Rothwell
    ---
    drivers/net/ibmveth.c | 8 ++++----
    1 files changed, 4 insertions(+), 4 deletions(-)

    Compiler tested for ppc64_defconfig.

    diff --git a/drivers/net/ibmveth.c b/drivers/net/ibmveth.c
    index 91ec9fd..a03fe1f 100644
    --- a/drivers/net/ibmveth.c
    +++ b/drivers/net/ibmveth.c
    @@ -260,7 +260,7 @@ static void ibmveth_replenish_buffer_pool(struct ibmveth_adapter *adapter, struc
    dma_addr = dma_map_single(&adapter->vdev->dev, skb->data,
    pool->buff_size, DMA_FROM_DEVICE);

    - if (dma_mapping_error((&adapter->vdev->dev, dma_addr))
    + if (dma_mapping_error(&adapter->vdev->dev, dma_addr))
    goto failure;

    pool->free_map[free_index] = IBM_VETH_INVALID_MAP;
    @@ -294,7 +294,7 @@ failure:
    pool->consumer_index = pool->size - 1;
    else
    pool->consumer_index--;
    - if (!dma_mapping_error((&adapter->vdev->dev, dma_addr))
    + if (!dma_mapping_error(&adapter->vdev->dev, dma_addr))
    dma_unmap_single(&adapter->vdev->dev,
    pool->dma_addr[index], pool->buff_size,
    DMA_FROM_DEVICE);
    @@ -488,7 +488,7 @@ static void ibmveth_cleanup(struct ibmveth_adapter *adapter)
    &adapter->rx_buff_pool[i]);

    if (adapter->bounce_buffer != NULL) {
    - if (!dma_mapping_error(adapter->bounce_buffer_dma)) {
    + if (!dma_mapping_error(dev, adapter->bounce_buffer_dma)) {
    dma_unmap_single(&adapter->vdev->dev,
    adapter->bounce_buffer_dma,
    adapter->netdev->mtu + IBMVETH_BUFF_OH,
    @@ -924,7 +924,7 @@ static int ibmveth_start_xmit(struct sk_buff *skb, struct net_device *netdev)
    buf[1] = 0;
    }

    - if (dma_mapping_error((&adapter->vdev->dev, data_dma_addr)) {
    + if (dma_mapping_error(&adapter->vdev->dev, data_dma_addr)) {
    if (!firmware_has_feature(FW_FEATURE_CMO))
    ibmveth_error_printk("tx: unable to map xmit buffer\n");
    skb_copy_from_linear_data(skb, adapter->bounce_buffer,
    --
    1.5.6.3

    --
    Cheers,
    Stephen Rothwell sfr@canb.auug.org.au
    http://www.canb.auug.org.au/~sfr/
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  2. Re: [PATCH] powerpc/ibmveth: fix multiple errors with dma_mapping_error conversion

    On Mon, 28 Jul 2008 02:14:24 +1000 Stephen Rothwell wrote:

    > The addition of an argument to dma_mapping_error() in commit
    > 8d8bb39b9eba32dd70e87fd5ad5c5dd4ba118e06 "dma-mapping: add the device
    > argument to dma_mapping_error()" left a bit of fallout:


    Yeah, sorry, that patch was a horror - I fixed it perhaps ten times. I
    think people were madly adding new dma_mapping_error() calls while we
    were trying to maintain it as well.

    It should have been dome as a two-stage conversion.
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  3. Re: [PATCH] powerpc/ibmveth: fix multiple errors with dma_mapping_error conversion

    Hi Andrew,

    On Sun, 27 Jul 2008 12:24:14 -0700 Andrew Morton wrote:
    >
    > On Mon, 28 Jul 2008 02:14:24 +1000 Stephen Rothwell wrote:
    >
    > > The addition of an argument to dma_mapping_error() in commit
    > > 8d8bb39b9eba32dd70e87fd5ad5c5dd4ba118e06 "dma-mapping: add the device
    > > argument to dma_mapping_error()" left a bit of fallout:

    >
    > Yeah, sorry, that patch was a horror - I fixed it perhaps ten times. I
    > think people were madly adding new dma_mapping_error() calls while we
    > were trying to maintain it as well.
    >
    > It should have been dome as a two-stage conversion.


    Yes, indeed (my new favourite word :-))

    I hope that we all can discuss procedures for API changes at the Kernel
    Summit ...

    --
    Cheers,
    Stephen Rothwell sfr@canb.auug.org.au
    http://www.canb.auug.org.au/~sfr/

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.9 (GNU/Linux)

    iEYEARECAAYFAkiNE7UACgkQjjKRsyhoI8zTcgCePJJdfrTRzl wHIQkh2vwNv3Ax
    AxUAn0VftUIy32jvnG+ULTZqvOc6dmi8
    =9/z9
    -----END PGP SIGNATURE-----


  4. Re: [PATCH] powerpc/ibmveth: fix multiple errors with dma_mapping_error conversion

    On Mon, 28 Jul 2008, Stephen Rothwell wrote:

    > I hope that we all can discuss procedures for API changes at the Kernel
    > Summit ...


    "all" as in, whoever was invited (the only transparent aspect of was a
    silly count of # of commits for the initial shortlist), or was on the
    committee, or bought seats via sponsorship.



    - James (co- maintainer/author of several kernel subsystems over 8+ years
    and apparently not invited, because ?)


    --
    James Morris

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  5. Re: [PATCH] powerpc/ibmveth: fix multiple errors with dma_mapping_error conversion

    On Mon, 28 Jul 2008 11:07:40 +1000 (EST) James Morris wrote:

    > On Mon, 28 Jul 2008, Stephen Rothwell wrote:
    >
    > > I hope that we all can discuss procedures for API changes at the Kernel
    > > Summit ...

    >
    > "all" as in, whoever was invited (the only transparent aspect of was a
    > silly count of # of commits for the initial shortlist), or was on the
    > committee, or bought seats via sponsorship.
    >


    Yeah.

    We do all our work via email. If there's some particular issue that we
    feel cannot be resolved effectively via email then I'd really like to
    know what that issue is, and why.

    > - James (co- maintainer/author of several kernel subsystems over 8+ years
    > and apparently not invited, because ?)


    - Andrew, who asked everyone two years ago whether we can justify
    annual kernel summits, and who still awaits a convincing answer.


    But for this particular problem I don't think there's much to be
    discussed. It should have been implemented as
    s/dma_mapping_error/dma_mapping_error2/g with eventual removal of
    dma_mapping_error(). But I failed to appreciate how many
    dma_mapping_error()s there are and I failed to predict how many _new_
    dma_mapping_error()s would turn up across the -rc phase. So I suck,
    what's new?


    otoh, I don't reeeeeeealy worry too much about compile errors during
    the merge window. People get all hot under the collar and shout at
    each other, but they're trivial to find (the compiler tells you!) and
    almost always trivial to fix and they are almost always trivially
    worked around via config if you hit one during a bisect. Shrug, fix
    them and move on.

    It's the runtime errors which are far, far, far more of a problem for us.

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  6. Re: [PATCH] powerpc/ibmveth: fix multiple errors with dma_mapping_error conversion

    Stephen Rothwell wrote:
    > The addition of an argument to dma_mapping_error() in commit
    > 8d8bb39b9eba32dd70e87fd5ad5c5dd4ba118e06 "dma-mapping: add the device
    > argument to dma_mapping_error()" left a bit of fallout:
    >
    > drivers/net/ibmveth.c:263: error: too few arguments to function 'dma_mapping_error'
    > drivers/net/ibmveth.c:264: error: expected ')' before 'goto'
    > drivers/net/ibmveth.c:284: error: expected expression before '}' token
    > drivers/net/ibmveth.c:297: error: too few arguments to function 'dma_mapping_error'
    > drivers/net/ibmveth.c:298: error: expected ')' before 'dma_unmap_single'
    > drivers/net/ibmveth.c:306: error: expected expression before '}' token
    > drivers/net/ibmveth.c:491: error: too few arguments to function 'dma_mapping_error'
    > drivers/net/ibmveth.c:927: error: too few arguments to function 'dma_mapping_error'
    > drivers/net/ibmveth.c:927: error: expected ')' before '{' token
    > drivers/net/ibmveth.c:974: error: expected expression before '}' token
    > drivers/net/ibmveth.c:914: error: label 'out' used but not defined m
    >
    > Signed-off-by: Stephen Rothwell
    > ---
    > drivers/net/ibmveth.c | 8 ++++----
    > 1 files changed, 4 insertions(+), 4 deletions(-)
    >
    > Compiler tested for ppc64_defconfig.


    applied


    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  7. Re: [PATCH] powerpc/ibmveth: fix multiple errors with dma_mapping_error conversion

    On Wed, 2008-07-30 at 17:18 -0400, Jeff Garzik wrote:
    > Stephen Rothwell wrote:
    > > The addition of an argument to dma_mapping_error() in commit
    > > 8d8bb39b9eba32dd70e87fd5ad5c5dd4ba118e06 "dma-mapping: add the device
    > > argument to dma_mapping_error()" left a bit of fallout:
    > >
    > > drivers/net/ibmveth.c:263: error: too few arguments to function 'dma_mapping_error'
    > > drivers/net/ibmveth.c:264: error: expected ')' before 'goto'
    > > drivers/net/ibmveth.c:284: error: expected expression before '}' token
    > > drivers/net/ibmveth.c:297: error: too few arguments to function 'dma_mapping_error'
    > > drivers/net/ibmveth.c:298: error: expected ')' before 'dma_unmap_single'
    > > drivers/net/ibmveth.c:306: error: expected expression before '}' token
    > > drivers/net/ibmveth.c:491: error: too few arguments to function 'dma_mapping_error'
    > > drivers/net/ibmveth.c:927: error: too few arguments to function 'dma_mapping_error'
    > > drivers/net/ibmveth.c:927: error: expected ')' before '{' token
    > > drivers/net/ibmveth.c:974: error: expected expression before '}' token
    > > drivers/net/ibmveth.c:914: error: label 'out' used but not defined m
    > >
    > > Signed-off-by: Stephen Rothwell
    > > ---
    > > drivers/net/ibmveth.c | 8 ++++----
    > > 1 files changed, 4 insertions(+), 4 deletions(-)
    > >
    > > Compiler tested for ppc64_defconfig.

    >
    > applied
    >


    I think I merged that one up already... it was a trivial compile fix
    for a fallover of an API change in a powerpc specific driver so I
    didn't wait for an ack.

    Ben.


    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

+ Reply to Thread