All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Roel Kluin <12o3l@tiscali.nl>
Cc: linuxppc-dev@ozlabs.org, lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1 resend][PPC] replace logical by bitand in pci_process_ISA_OF_ranges(), arch/powerpc/kernel/isa-bridge.c
Date: Tue, 08 Apr 2008 09:50:10 +1000	[thread overview]
Message-ID: <1207612210.10388.492.camel@pasglop> (raw)
In-Reply-To: <47FA9FA6.8090201@tiscali.nl>


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 <benh@kernel.crashing.org>

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

WARNING: multiple messages have this Message-ID (diff)
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Roel Kluin <12o3l@tiscali.nl>
Cc: jwboyer@linux.vnet.ibm.com, linuxppc-dev@ozlabs.org,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1 resend][PPC] replace logical by bitand in pci_process_ISA_OF_ranges(), arch/powerpc/kernel/isa-bridge.c
Date: Tue, 08 Apr 2008 09:50:10 +1000	[thread overview]
Message-ID: <1207612210.10388.492.camel@pasglop> (raw)
In-Reply-To: <47FA9FA6.8090201@tiscali.nl>


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 <benh@kernel.crashing.org>

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


  parent reply	other threads:[~2008-04-07 23:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-07 22:26 [PATCH 1/1 resend][PPC] replace logical by bitand in pci_process_ISA_OF_ranges(), arch/powerpc/kernel/isa-bridge.c Roel Kluin
2008-04-07 22:59 ` Nathan Lynch
2008-04-07 22:59   ` Nathan Lynch
2008-04-07 23:50 ` Benjamin Herrenschmidt [this message]
2008-04-07 23:50   ` Benjamin Herrenschmidt

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=1207612210.10388.492.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=12o3l@tiscali.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.