From patchwork Thu Apr 24 07:23:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?C=C3=A9dric_Le_Goater?= X-Patchwork-Id: 342115 X-Patchwork-Delegate: benh@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 361271413FF for ; Thu, 24 Apr 2014 17:25:47 +1000 (EST) Received: from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 25B4A14011D for ; Thu, 24 Apr 2014 17:23:55 +1000 (EST) Received: from /spool/local by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 24 Apr 2014 08:23:51 +0100 Received: from d06dlp03.portsmouth.uk.ibm.com (9.149.20.15) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 24 Apr 2014 08:23:49 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 17CC21B08040 for ; Thu, 24 Apr 2014 08:23:54 +0100 (BST) Received: from d06av10.portsmouth.uk.ibm.com (d06av10.portsmouth.uk.ibm.com [9.149.37.251]) by b06cxnps3074.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s3O7NmeY196998 for ; Thu, 24 Apr 2014 07:23:48 GMT Received: from d06av10.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av10.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s3O7Nlkg031647 for ; Thu, 24 Apr 2014 01:23:48 -0600 Received: from smtp.lab.toulouse-stg.fr.ibm.com (srv01.lab.toulouse-stg.fr.ibm.com [9.101.4.1]) by d06av10.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s3O7NlYc031640; Thu, 24 Apr 2014 01:23:47 -0600 Received: from hermes.kaod.org (icon-9-167-209-220.megacenter.de.ibm.com [9.167.209.220]) by smtp.lab.toulouse-stg.fr.ibm.com (Postfix) with ESMTP id 618CC210FFE; Thu, 24 Apr 2014 09:23:47 +0200 (CEST) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: benh@kernel.crashing.org Subject: [PATCH v2 03/15] powerpc/boot: use prom_arg_t in oflib Date: Thu, 24 Apr 2014 09:23:27 +0200 Message-Id: <1398324219-8919-4-git-send-email-clg@fr.ibm.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1398324219-8919-1-git-send-email-clg@fr.ibm.com> References: <1398324219-8919-1-git-send-email-clg@fr.ibm.com> In-Reply-To: <1395651884.30488.10.camel@pasglop> References: <1395651884.30488.10.camel@pasglop> MIME-Version: 1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14042407-1948-0000-0000-000008907601 Cc: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , linuxppc-dev@lists.ozlabs.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" This patch updates the wrapper code to converge with the kernel code in prom_init. Signed-off-by: Cédric Le Goater --- arch/powerpc/boot/oflib.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/boot/oflib.c b/arch/powerpc/boot/oflib.c index c3288a3446b3..3b0c9458504f 100644 --- a/arch/powerpc/boot/oflib.c +++ b/arch/powerpc/boot/oflib.c @@ -16,6 +16,8 @@ #include "of.h" +typedef u32 prom_arg_t; + /* The following structure is used to communicate with open firmware. * All arguments in and out are in big endian format. */ struct prom_args { @@ -46,7 +48,7 @@ int of_call_prom(const char *service, int nargs, int nret, ...) va_start(list, nret); for (i = 0; i < nargs; i++) - args.args[i] = va_arg(list, unsigned int); + args.args[i] = va_arg(list, prom_arg_t); va_end(list); for (i = 0; i < nret; i++) @@ -59,7 +61,7 @@ int of_call_prom(const char *service, int nargs, int nret, ...) } static int of_call_prom_ret(const char *service, int nargs, int nret, - unsigned int *rets, ...) + prom_arg_t *rets, ...) { int i; struct prom_args args; @@ -71,7 +73,7 @@ static int of_call_prom_ret(const char *service, int nargs, int nret, va_start(list, rets); for (i = 0; i < nargs; i++) - args.args[i] = va_arg(list, unsigned int); + args.args[i] = va_arg(list, prom_arg_t); va_end(list); for (i = 0; i < nret; i++) @@ -148,7 +150,7 @@ static int check_of_version(void) void *of_claim(unsigned long virt, unsigned long size, unsigned long align) { int ret; - unsigned int result; + prom_arg_t result; if (need_map < 0) need_map = check_of_version();