From patchwork Wed Mar 6 21:51:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Rodolfo_Garc=C3=ADa_Pe=C3=B1as_=28kix=29?= X-Patchwork-Id: 2228321 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id A31E23FC8A for ; Wed, 6 Mar 2013 21:52:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753672Ab3CFVwN (ORCPT ); Wed, 6 Mar 2013 16:52:13 -0500 Received: from ks399202.kimsufi.com ([37.59.37.136]:36439 "EHLO ks399202.kimsufi.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751588Ab3CFVwN (ORCPT ); Wed, 6 Mar 2013 16:52:13 -0500 Received: from kentin.kix.es (4.Red-217-127-226.staticIP.rima-tde.net [217.127.226.4]) by ks399202.kimsufi.com (mail) with ESMTPSA id A40562F81C6B; Wed, 6 Mar 2013 22:58:21 +0100 (CET) From: =?UTF-8?q?Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20=28kix=29?= To: linux-pm@vger.kernel.org Cc: =?UTF-8?q? "Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20(kix)" ?= Subject: [PATCH 2/3] Typecasting problem in vbetoo.c Date: Wed, 6 Mar 2013 22:51:49 +0100 Message-Id: <1362606710-18089-3-git-send-email-kix@kix.es> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1362606710-18089-1-git-send-email-kix@kix.es> References: <1362606710-18089-1-git-send-email-kix@kix.es> MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: "Rodolfo García Peñas (kix)" This patch changes the typecasting for r.es and r.ebx, from "unsigned int" to "unsigned long". The new code doesn't show compiler warnings. Signed-off-by: Rodolfo García Peñas (kix) --- vbetool/vbetool.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vbetool/vbetool.c b/vbetool/vbetool.c index 55e019f..45fafdb 100644 --- a/vbetool/vbetool.c +++ b/vbetool/vbetool.c @@ -243,8 +243,8 @@ void restore_state_from(char *data) r.eax = 0x4f04; r.ecx = 0xf; /* all states */ r.edx = 2; /* restore state */ - r.es = (unsigned int) (data - LRMI_base_addr()) >> 4; - r.ebx = (unsigned int) (data - LRMI_base_addr()) & 0xf; + r.es = (unsigned long) (data - LRMI_base_addr()) >> 4; + r.ebx = (unsigned long) (data - LRMI_base_addr()) & 0xf; r.ds = 0x0040; if (!LRMI_int(0x10, &r)) { @@ -327,8 +327,8 @@ char *__save_state(int *psize) r.ecx = 0xf; /* all states */ r.edx = 1; /* save state */ - r.es = (unsigned int) (buffer - LRMI_base_addr()) >> 4; - r.ebx = (unsigned int) (buffer - LRMI_base_addr()) & 0xf; + r.es = (unsigned long) (buffer - LRMI_base_addr()) >> 4; + r.ebx = (unsigned long) (buffer - LRMI_base_addr()) & 0xf; r.ds = 0x0040; fprintf(stderr, "ES: 0x%04X EBX: 0x%04X\n", r.es, r.ebx);