[PATCH 1/1 resend][PPC] replace logical by bitand in pci_process_ISA_OF_ranges(), arch/powerpc/kernel/isa-bridge.c - Kernel

This is a discussion on [PATCH 1/1 resend][PPC] replace logical by bitand in pci_process_ISA_OF_ranges(), arch/powerpc/kernel/isa-bridge.c - Kernel ; in arch/powerpc/kernel/isa-bridge.c: 41:#define ISA_SPACE_MASK 0x1 42:#define ISA_SPACE_IO 0x1 .... 83: if ((range->isa_addr.a_hi && ISA_SPACE_MASK) != ISA_SPACE_IO) { .... 89: if ((range->isa_addr.a_hi && ISA_SPACE_MASK) != ISA_SPACE_IO) I think these should be single &'s, I can't test it (no hardware) please consider ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: [PATCH 1/1 resend][PPC] replace logical by bitand in pci_process_ISA_OF_ranges(), arch/powerpc/kernel/isa-bridge.c

  1. [PATCH 1/1 resend][PPC] replace logical by bitand in pci_process_ISA_OF_ranges(), arch/powerpc/kernel/isa-bridge.c

    in arch/powerpc/kernel/isa-bridge.c:
    41:#define ISA_SPACE_MASK 0x1
    42:#define ISA_SPACE_IO 0x1
    ....

    83: if ((range->isa_addr.a_hi && ISA_SPACE_MASK) != ISA_SPACE_IO) {
    ....
    89: if ((range->isa_addr.a_hi && ISA_SPACE_MASK) != ISA_SPACE_IO)

    I think these should be single &'s, I can't test it (no hardware)
    please consider the patch below.
    --
    replace logical by bit and for ISA_SPACE_MASK

    Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
    ---
    diff --git a/arch/powerpc/kernel/isa-bridge.c b/arch/powerpc/kernel/isa-bridge.c
    index f0f49d1..406a9e6 100644
    --- a/arch/powerpc/kernel/isa-bridge.c
    +++ b/arch/powerpc/kernel/isa-bridge.c
    @@ -80,13 +80,13 @@ static void __devinit pci_process_ISA_OF_ranges(struct device_node *isa_node,
    * (size depending on dev->n_addr_cells)
    * cell 5: the size of the range
    */
    - if ((range->isa_addr.a_hi && ISA_SPACE_MASK) != ISA_SPACE_IO) {
    + if ((range->isa_addr.a_hi & ISA_SPACE_MASK) != ISA_SPACE_IO) {
    range++;
    rlen -= sizeof(struct isa_range);
    if (rlen < sizeof(struct isa_range))
    goto inval_range;
    }
    - if ((range->isa_addr.a_hi && ISA_SPACE_MASK) != ISA_SPACE_IO)
    + if ((range->isa_addr.a_hi & ISA_SPACE_MASK) != ISA_SPACE_IO)
    goto inval_range;

    isa_addr = range->isa_addr.a_lo;

    --
    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 1/1 resend][PPC] replace logical by bitand in pci_process_ISA_OF_ranges(), arch/powerpc/kernel/isa-bridge.c

    Roel Kluin wrote:
    > replace logical by bit and for ISA_SPACE_MASK


    I think Paul has picked this up now:

    http://ozlabs.org/pipermail/linuxppc...il/054103.html
    --
    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 1/1 resend][PPC] replace logical by bitand in pci_process_ISA_OF_ranges(), arch/powerpc/kernel/isa-bridge.c


    On Tue, 2008-04-08 at 00:26 +0200, Roel Kluin wrote:
    > in arch/powerpc/kernel/isa-bridge.c:
    > 41:#define ISA_SPACE_MASK 0x1
    > 42:#define ISA_SPACE_IO 0x1
    > ...
    >
    > 83: if ((range->isa_addr.a_hi && ISA_SPACE_MASK) != ISA_SPACE_IO) {
    > ...
    > 89: if ((range->isa_addr.a_hi && ISA_SPACE_MASK) != ISA_SPACE_IO)
    >
    > I think these should be single &'s, I can't test it (no hardware)
    > please consider the patch below.
    > --
    > replace logical by bit and for ISA_SPACE_MASK
    >
    > Signed-off-by: Roel Kluin <12o3l@tiscali.nl>


    Acked-by: Benjamin Herrenschmidt

    > ---
    > diff --git a/arch/powerpc/kernel/isa-bridge.c b/arch/powerpc/kernel/isa-bridge.c
    > index f0f49d1..406a9e6 100644
    > --- a/arch/powerpc/kernel/isa-bridge.c
    > +++ b/arch/powerpc/kernel/isa-bridge.c
    > @@ -80,13 +80,13 @@ static void __devinit pci_process_ISA_OF_ranges(struct device_node *isa_node,
    > * (size depending on dev->n_addr_cells)
    > * cell 5: the size of the range
    > */
    > - if ((range->isa_addr.a_hi && ISA_SPACE_MASK) != ISA_SPACE_IO) {
    > + if ((range->isa_addr.a_hi & ISA_SPACE_MASK) != ISA_SPACE_IO) {
    > range++;
    > rlen -= sizeof(struct isa_range);
    > if (rlen < sizeof(struct isa_range))
    > goto inval_range;
    > }
    > - if ((range->isa_addr.a_hi && ISA_SPACE_MASK) != ISA_SPACE_IO)
    > + if ((range->isa_addr.a_hi & ISA_SPACE_MASK) != ISA_SPACE_IO)
    > goto inval_range;
    >
    > isa_addr = range->isa_addr.a_lo;
    >
    > _______________________________________________
    > Linuxppc-dev mailing list
    > Linuxppc-dev@ozlabs.org
    > https://ozlabs.org/mailman/listinfo/linuxppc-dev


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