Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760537AbXEIXyB (ORCPT ); Wed, 9 May 2007 19:54:01 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757728AbXEIXxy (ORCPT ); Wed, 9 May 2007 19:53:54 -0400 Received: from smtp1.linux-foundation.org ([65.172.181.25]:54026 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757570AbXEIXxx (ORCPT ); Wed, 9 May 2007 19:53:53 -0400 Date: Wed, 9 May 2007 16:53:17 -0700 From: Andrew Morton To: Vitaly Bordug Cc: Samuel Ortiz , linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] [POWERPC] 8xx: PQ SoC IRDA support Message-Id: <20070509165317.fcf7dbf5.akpm@linux-foundation.org> In-Reply-To: <20070508224206.4039.87074.stgit@localhost.localdomain> References: <20070508224206.4039.87074.stgit@localhost.localdomain> X-Mailer: Sylpheed version 2.2.7 (GTK+ 2.8.6; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 911 Lines: 27 On Wed, 09 May 2007 02:42:07 +0400 Vitaly Bordug 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/