Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.2:ARM
xen
23588-xenpaging_remove_return_values_from_funct...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 23588-xenpaging_remove_return_values_from_functions_that_can_not_fail.patch of Package xen
changeset: 23588:e48535e70145 user: Olaf Hering <olaf@aepfle.de> date: Fri Jun 10 10:47:18 2011 +0200 files: tools/xenpaging/xenpaging.c description: xenpaging: remove return values from functions that can not fail get_request() and put_response() can not fail, remove return value and update calling functions. Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com> --- tools/xenpaging/xenpaging.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) Index: xen-4.1.2-testing/tools/xenpaging/xenpaging.c =================================================================== --- xen-4.1.2-testing.orig/tools/xenpaging/xenpaging.c +++ xen-4.1.2-testing/tools/xenpaging/xenpaging.c @@ -342,7 +342,7 @@ static int xenpaging_teardown(xenpaging_ return -1; } -static int get_request(mem_event_t *mem_event, mem_event_request_t *req) +static void get_request(mem_event_t *mem_event, mem_event_request_t *req) { mem_event_back_ring_t *back_ring; RING_IDX req_cons; @@ -357,11 +357,9 @@ static int get_request(mem_event_t *mem_ /* Update ring */ back_ring->req_cons = req_cons; back_ring->sring->req_event = req_cons + 1; - - return 0; } -static int put_response(mem_event_t *mem_event, mem_event_response_t *rsp) +static void put_response(mem_event_t *mem_event, mem_event_response_t *rsp) { mem_event_back_ring_t *back_ring; RING_IDX rsp_prod; @@ -376,8 +374,6 @@ static int put_response(mem_event_t *mem /* Update ring */ back_ring->rsp_prod_pvt = rsp_prod; RING_PUSH_RESPONSES(back_ring); - - return 0; } static int xenpaging_evict_page(xenpaging_t *paging, @@ -437,9 +433,7 @@ static int xenpaging_resume_page(xenpagi int ret; /* Put the page info on the ring */ - ret = put_response(&paging->mem_event, rsp); - if ( ret != 0 ) - goto out; + put_response(&paging->mem_event, rsp); /* Notify policy of page being paged in */ if ( notify_policy ) @@ -649,12 +643,7 @@ int main(int argc, char *argv[]) while ( RING_HAS_UNCONSUMED_REQUESTS(&paging->mem_event.back_ring) ) { - rc = get_request(&paging->mem_event, &req); - if ( rc != 0 ) - { - ERROR("Error getting request"); - goto out; - } + get_request(&paging->mem_event, &req); /* Check if the page has already been paged in */ if ( test_and_clear_bit(req.gfn, paging->bitmap) )
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor