linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm/omap: simplify conditional
@ 2010-10-05 18:31 Nicolas Kaiser
  2010-10-07 13:53 ` Tomi Valkeinen
  0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Kaiser @ 2010-10-05 18:31 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: Tomi Valkeinen, linux-omap, linux-fbdev, linux-kernel

Simplify conditional: (a || (!a && !b)) => (a || !b)

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
---
 arch/arm/plat-omap/fb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-omap/fb.c b/arch/arm/plat-omap/fb.c
index 0054b95..5c09095 100644
--- a/arch/arm/plat-omap/fb.c
+++ b/arch/arm/plat-omap/fb.c
@@ -126,7 +126,7 @@ static int set_fbmem_region_type(struct omapfb_mem_region *rg, int mem_type,
 	 * type = 0 && paddr = 0, a default don't care case maps to
 	 * the SDRAM type.
 	 */
-	if (rg->type || (!rg->type && !rg->paddr))
+	if (rg->type || !rg->paddr)
 		return 0;
 	if (ranges_overlap(rg->paddr, rg->size, mem_start, mem_size)) {
 		rg->type = mem_type;
-- 
1.7.2.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] arm/omap: simplify conditional
  2010-10-05 18:31 [PATCH] arm/omap: simplify conditional Nicolas Kaiser
@ 2010-10-07 13:53 ` Tomi Valkeinen
  0 siblings, 0 replies; 2+ messages in thread
From: Tomi Valkeinen @ 2010-10-07 13:53 UTC (permalink / raw)
  To: ext Nicolas Kaiser
  Cc: Tony Lindgren, linux-omap@vger.kernel.org,
	linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org

On Tue, 2010-10-05 at 20:31 +0200, ext Nicolas Kaiser wrote:
> Simplify conditional: (a || (!a && !b)) => (a || !b)
> 
> Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
> ---

Thanks, applied.

 Tomi



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-10-07 13:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-05 18:31 [PATCH] arm/omap: simplify conditional Nicolas Kaiser
2010-10-07 13:53 ` Tomi Valkeinen

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