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]
Date:	Wed, 9 May 2007 16:53:17 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Vitaly Bordug <vitb@...nel.crashing.org>
Cc:	Samuel Ortiz <samuel@...tiz.org>, linuxppc-dev@...abs.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [POWERPC] 8xx: PQ SoC IRDA support

On Wed, 09 May 2007 02:42:07 +0400
Vitaly Bordug <vitb@...nel.crashing.org> wrote:

> +		model = (char *)get_property(np, "model", NULL);
> +		if (model == NULL)
> +			return -ENODEV;
> +
> +		id = (u32 *) get_property(np, "device-id", NULL);

get_property() got renamed to of_get_property().

You have two coding-styles in the typecasting here.  The former (no space)
is more common and makes more sense, IMO.

However of_get_property() returns const void* so really you shouldn't be
doing any casting at all.  `model' should have type `const char *' and then
you can do

	model = get_property(np, "model", NULL);

which has nice type-safety and const-correctness.

-
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