From patchwork Sat Jul 6 13:49:12 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: 2824499 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E9AFEC0AB3 for ; Sat, 6 Jul 2013 13:56:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1CAAE20168 for ; Sat, 6 Jul 2013 13:56:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4093B2012B for ; Sat, 6 Jul 2013 13:56:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750966Ab3GFN4l (ORCPT ); Sat, 6 Jul 2013 09:56:41 -0400 Received: from mail.kix.es ([46.105.17.89]:54731 "EHLO what.com.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751051Ab3GFN4j (ORCPT ); Sat, 6 Jul 2013 09:56:39 -0400 Received: from osaka.kix.es (4.Red-217-127-226.staticIP.rima-tde.net [217.127.226.4]) by what.com.es (Postfix) with ESMTPA id 667EA6A09BE; Sat, 6 Jul 2013 15:49:31 +0200 (CEST) From: =?UTF-8?q?Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20=28kix=29?= To: linux-pm@vger.kernel.org Cc: rjw@sisk.pl, =?UTF-8?q? "Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20(kix)" ?= Subject: [PATCH 3/7] Typecasting problem in vbetoo.c Date: Sat, 6 Jul 2013 15:49:12 +0200 Message-Id: <1373118556-27472-4-git-send-email-kix@kix.es> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1373118556-27472-1-git-send-email-kix@kix.es> References: <1373118556-27472-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 X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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);