lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20120322145122.7d2f75e9.akpm@linux-foundation.org>
Date:	Thu, 22 Mar 2012 14:51:22 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Axel Lin <axel.lin@...il.com>
Cc:	linux-kernel@...r.kernel.org, Richard Purdie <rpurdie@...ys.net>,
	"Milo(Woogyom) Kim" <milo.kim@...com>
Subject: Re: [PATCH] backlight: Use id->driver_data to differentiate lp855x
 chips

On Wed, 21 Mar 2012 18:11:27 +0800
Axel Lin <axel.lin@...il.com> wrote:

> Current code has corresponding driver_data settings for different chip types.
> Use the driver_data to differentiate lp855x chips.
> 
> Also make lp855x_is_valid_rom_area() return bool instead of int.
> 
> -static int lp855x_is_valid_rom_area(struct lp855x *lp, u8 addr)
> +static bool lp855x_is_valid_rom_area(struct lp855x *lp, u8 addr)
>  {
>
> ...
>
> -	return (addr >= start && addr <= end) ? 1 : 0;
> +	return (addr >= start && addr <= end) ? true : false;
>  }

This:

--- a/drivers/video/backlight/lp855x_bl.c~backlight-use-id-driver_data-to-differentiate-lp855x-chips-fix
+++ a/drivers/video/backlight/lp855x_bl.c
@@ -82,7 +82,7 @@ static bool lp855x_is_valid_rom_area(str
 		return false;
 	}
 
-	return (addr >= start && addr <= end) ? true : false;
+	return (addr >= start && addr <= end);
 }
 
 static int lp855x_init_registers(struct lp855x *lp)
_

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ