Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Xen: Devel

[PATCH 2/7] vgabios: Does not define cur_mode if not required

 

 

Xen devel RSS feed   Index | Next | Previous | View Threaded


frediano.ziglio at citrix

May 1, 2012, 6:52 AM

Post #1 of 2 (70 views)
Permalink
[PATCH 2/7] vgabios: Does not define cur_mode if not required

Signed-off-by: Frediano Ziglio <frediano.ziglio [at] citrix>
---
tools/firmware/vgabios/vbe.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/tools/firmware/vgabios/vbe.c b/tools/firmware/vgabios/vbe.c
index 3fc786d..3d42216 100644
--- a/tools/firmware/vgabios/vbe.c
+++ b/tools/firmware/vgabios/vbe.c
@@ -761,7 +761,9 @@ Bit16u *AX;Bit16u ES;Bit16u DI;
Bit16u status;
Bit16u result;
Bit16u vbe2_info;
+#ifdef DEBUG
Bit16u cur_mode=0;
+#endif
Bit16u cur_ptr=34;
ModeInfoListItem *cur_info=&mode_info_list;

@@ -849,9 +851,9 @@ Bit16u *AX;Bit16u ES;Bit16u DI;
(cur_info->info.XResolution * cur_info->info.XResolution * cur_info->info.BitsPerPixel <= vbe_info_block.TotalMemory << 19 )) {
#ifdef DEBUG
printf("VBE found mode %x => %x\n", cur_info->mode,cur_mode);
+ cur_mode++;
#endif
write_word(ES, DI + cur_ptr, cur_info->mode);
- cur_mode++;
cur_ptr+=2;
} else {
#ifdef DEBUG
--
1.7.5.4


_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


frediano.ziglio at citrix

May 4, 2012, 5:36 AM

Post #2 of 2 (65 views)
Permalink
[PATCH 2/7] vgabios: Does not define cur_mode if not required [In reply to]

Declare and use cur_mode only if debug is enabled

Signed-off-by: Frediano Ziglio <frediano.ziglio [at] citrix>
---
tools/firmware/vgabios/vbe.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/tools/firmware/vgabios/vbe.c b/tools/firmware/vgabios/vbe.c
index 3fc786d..3d42216 100644
--- a/tools/firmware/vgabios/vbe.c
+++ b/tools/firmware/vgabios/vbe.c
@@ -761,7 +761,9 @@ Bit16u *AX;Bit16u ES;Bit16u DI;
Bit16u status;
Bit16u result;
Bit16u vbe2_info;
+#ifdef DEBUG
Bit16u cur_mode=0;
+#endif
Bit16u cur_ptr=34;
ModeInfoListItem *cur_info=&mode_info_list;

@@ -849,9 +851,9 @@ Bit16u *AX;Bit16u ES;Bit16u DI;
(cur_info->info.XResolution * cur_info->info.XResolution * cur_info->info.BitsPerPixel <= vbe_info_block.TotalMemory << 19 )) {
#ifdef DEBUG
printf("VBE found mode %x => %x\n", cur_info->mode,cur_mode);
+ cur_mode++;
#endif
write_word(ES, DI + cur_ptr, cur_info->mode);
- cur_mode++;
cur_ptr+=2;
} else {
#ifdef DEBUG
--
1.7.5.4


_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel

Xen devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.