Skip to contentSkip to conversation

unused assignment in kvm_setup_pio()

PATCH Applied Laurent Vivier 2 participants 4 messages Jul 30, 2007 – Aug 1, 2007 3 messages not in the archive KVM

lore
Share & tools
lore
#0 lore raw

I think line 1809 of kvm_main.c (from git) is useless, isn't it ???

1809 now = min(count, PAGE_SIZE / size);
1810
1811 if (!down)
1812 in_page = PAGE_SIZE - offset_in_page(address);
1813 else
1814 in_page = offset_in_page(address) + size;
1815 now = min(count, (unsigned long)in_page / size);
1816 if (!now) {

LAurent

Signature · 2 lines
------------- Laurent.Vivier-6ktuUTfB/[email protected]  --------------
          "Software is hard" - Donald Knuth

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/

_______________________________________________
kvm-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel

A message that is not in the archive (sent off-list or not yet received): 46ADED39.3040506-6ktuUTfB/[email protected]

#2 lore raw
Quoted 12 lines · Laurent Vivier

I think line 1809 of kvm_main.c (from git) is useless, isn't it ???

1809 now = min(count, PAGE_SIZE / size);
1810
1811 if (!down)
1812 in_page = PAGE_SIZE - offset_in_page(address);
1813 else
1814 in_page = offset_in_page(address) + size;
1815 now = min(count, (unsigned long)in_page / size);
1816 if (!now) {

Yes. I hate that code.

Signature · 8 lines
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

A message that is not in the archive (sent off-list or not yet received): 46ADEE4F.2030306-atKUWr5tajBWk0Htik3J/[email protected]

#4 lore raw

PATCH 1/1 remove duplicate assignment in kvm_setup_pio()

Line 1809 of kvm_main.c is useless, value is overwritten in line 1815:

1809 now = min(count, PAGE_SIZE / size);
1810
1811 if (!down)
1812 in_page = PAGE_SIZE - offset_in_page(address);
1813 else
1814 in_page = offset_in_page(address) + size;
1815 now = min(count, (unsigned long)in_page / size);
1816 if (!now) {

Signature · 2 lines
------------- Laurent.Vivier-6ktuUTfB/[email protected]  --------------
          "Software is hard" - Donald Knuth
drivers/kvm/kvm_main.c +0 -2
Index: kvm/drivers/kvm/kvm_main.c
===================================================================
@@ -1805,8 +1805,6 @@
 		return 1;
 	}
 
-	now = min(count, PAGE_SIZE / size);
-
 	if (!down)
 		in_page = PAGE_SIZE - offset_in_page(address);
 	else

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/

_______________________________________________
kvm-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel

A message that is not in the archive (sent off-list or not yet received): 46B07F1B.30202-6ktuUTfB/[email protected]

Applied
#6 lore raw

Re: [PATCH] remove duplicate assignment in kvm_setup_pio()

Quoted 2 lines · Laurent Vivier

Line 1809 of kvm_main.c is useless, value is overwritten in line 1815:

Applied, thanks.

Signature · 8 lines
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/