vmw_balloon: simplify vmballoon_send_get_target()
authorNadav Amit <namit@vmware.com>
Thu, 20 Sep 2018 17:30:16 +0000 (10:30 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 25 Sep 2018 18:11:42 +0000 (20:11 +0200)
commit0395be3ece114cda496dafd1fb337288c8305e7b
treea7042d863635af49f25d04adadd180311358692e
parent8b079cd00f70cf8ad2df00fb36674683d637fae0
vmw_balloon: simplify vmballoon_send_get_target()

As we want to leave as little as possible on the global balloon
structure, to avoid possible future races, we want to get rid sysinfo.
We can actually get the total_ram directly, and simplify the logic of
vmballoon_send_get_target() a little.

While we are doing that, let's return int and avoid mistakes due to
bool/int conversions.

Reviewed-by: Xavier Deguillard <xdeguillard@vmware.com>
Signed-off-by: Nadav Amit <namit@vmware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/vmw_balloon.c