Re: [PATCH v5] Drivers: hv: Cosmetic changes for hv.c and balloon.c
From: kernel test robot
Date: Wed May 29 2024 - 21:07:49 EST
Hi Aditya,
kernel test robot noticed the following build errors:
[auto build test ERROR on next-20240529]
[cannot apply to linus/master v6.10-rc1 v6.9 v6.9-rc7 v6.10-rc1]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Aditya-Nagesh/Drivers-hv-Cosmetic-changes-for-hv-c-and-balloon-c/20240530-000928
base: next-20240529
patch link: https://lore.kernel.org/r/1716998695-32135-1-git-send-email-adityanagesh%40linux.microsoft.com
patch subject: [PATCH v5] Drivers: hv: Cosmetic changes for hv.c and balloon.c
config: i386-buildonly-randconfig-004-20240530 (https://download.01.org/0day-ci/archive/20240530/202405300835.7RLpoY4A-lkp@xxxxxxxxx/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240530/202405300835.7RLpoY4A-lkp@xxxxxxxxx/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405300835.7RLpoY4A-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
>> drivers/hv/hv_balloon.c:980:2: error: unterminated conditional directive
980 | #ifdef CONFIG_MEMORY_HOTPLUG
| ^
>> drivers/hv/hv_balloon.c:2129:23: error: expected '}'
2129 | MODULE_LICENSE("GPL");
| ^
drivers/hv/hv_balloon.c:968:1: note: to match this '{'
968 | {
| ^
2 errors generated.
vim +980 drivers/hv/hv_balloon.c
1cac8cd4d146b6 K. Y. Srinivasan 2013-03-15 966
1cac8cd4d146b6 K. Y. Srinivasan 2013-03-15 967 static void hot_add_req(struct work_struct *dummy)
1cac8cd4d146b6 K. Y. Srinivasan 2013-03-15 968 {
1cac8cd4d146b6 K. Y. Srinivasan 2013-03-15 969 struct dm_hot_add_response resp;
1cac8cd4d146b6 K. Y. Srinivasan 2013-03-15 970 #ifdef CONFIG_MEMORY_HOTPLUG
1cac8cd4d146b6 K. Y. Srinivasan 2013-03-15 971 unsigned long pg_start, pfn_cnt;
1cac8cd4d146b6 K. Y. Srinivasan 2013-03-15 972 unsigned long rg_start, rg_sz;
1cac8cd4d146b6 K. Y. Srinivasan 2013-03-15 973 #endif
1cac8cd4d146b6 K. Y. Srinivasan 2013-03-15 974 struct hv_dynmem_device *dm = &dm_device;
9aa8b50b2b3d3a K. Y. Srinivasan 2012-11-14 975
9aa8b50b2b3d3a K. Y. Srinivasan 2012-11-14 976 memset(&resp, 0, sizeof(struct dm_hot_add_response));
9aa8b50b2b3d3a K. Y. Srinivasan 2012-11-14 977 resp.hdr.type = DM_MEM_HOT_ADD_RESPONSE;
9aa8b50b2b3d3a K. Y. Srinivasan 2012-11-14 978 resp.hdr.size = sizeof(struct dm_hot_add_response);
9aa8b50b2b3d3a K. Y. Srinivasan 2012-11-14 979
1cac8cd4d146b6 K. Y. Srinivasan 2013-03-15 @980 #ifdef CONFIG_MEMORY_HOTPLUG
1cac8cd4d146b6 K. Y. Srinivasan 2013-03-15 981 pg_start = dm->ha_wrk.ha_page_range.finfo.start_page;
1cac8cd4d146b6 K. Y. Srinivasan 2013-03-15 982 pfn_cnt = dm->ha_wrk.ha_page_range.finfo.page_cnt;
1cac8cd4d146b6 K. Y. Srinivasan 2013-03-15 983
1cac8cd4d146b6 K. Y. Srinivasan 2013-03-15 984 rg_start = dm->ha_wrk.ha_region_range.finfo.start_page;
1cac8cd4d146b6 K. Y. Srinivasan 2013-03-15 985 rg_sz = dm->ha_wrk.ha_region_range.finfo.page_cnt;
1cac8cd4d146b6 K. Y. Srinivasan 2013-03-15 986
1aa0ebde593dfb Aditya Nagesh 2024-05-29 987 if (rg_start == 0 && !dm->host_specified_ha_region) {
1cac8cd4d146b6 K. Y. Srinivasan 2013-03-15 988 /*
1cac8cd4d146b6 K. Y. Srinivasan 2013-03-15 989 * Based on the hot-add page range being specified,
1cac8cd4d146b6 K. Y. Srinivasan 2013-03-15 990 }
1cac8cd4d146b6 K. Y. Srinivasan 2013-03-15 991
7f4f2302a11173 K. Y. Srinivasan 2013-03-18 992 if (do_hot_add)
1cac8cd4d146b6 K. Y. Srinivasan 2013-03-15 993 resp.page_count = process_hot_add(pg_start, pfn_cnt,
1cac8cd4d146b6 K. Y. Srinivasan 2013-03-15 994 rg_start, rg_sz);
549fd280b145e2 Vitaly Kuznetsov 2015-02-28 995
549fd280b145e2 Vitaly Kuznetsov 2015-02-28 996 dm->num_pages_added += resp.page_count;
1cac8cd4d146b6 K. Y. Srinivasan 2013-03-15 997 #endif
7f4f2302a11173 K. Y. Srinivasan 2013-03-18 998 /*
7f4f2302a11173 K. Y. Srinivasan 2013-03-18 999 * The result field of the response structure has the
7f4f2302a11173 K. Y. Srinivasan 2013-03-18 1000 * following semantics:
7f4f2302a11173 K. Y. Srinivasan 2013-03-18 1001 *
7f4f2302a11173 K. Y. Srinivasan 2013-03-18 1002 * 1. If all or some pages hot-added: Guest should return success.
7f4f2302a11173 K. Y. Srinivasan 2013-03-18 1003 *
7f4f2302a11173 K. Y. Srinivasan 2013-03-18 1004 * 2. If no pages could be hot-added:
7f4f2302a11173 K. Y. Srinivasan 2013-03-18 1005 *
7f4f2302a11173 K. Y. Srinivasan 2013-03-18 1006 * If the guest returns success, then the host
7f4f2302a11173 K. Y. Srinivasan 2013-03-18 1007 * will not attempt any further hot-add operations. This
7f4f2302a11173 K. Y. Srinivasan 2013-03-18 1008 * signifies a permanent failure.
7f4f2302a11173 K. Y. Srinivasan 2013-03-18 1009 *
7f4f2302a11173 K. Y. Srinivasan 2013-03-18 1010 * If the guest returns failure, then this failure will be
7f4f2302a11173 K. Y. Srinivasan 2013-03-18 1011 * treated as a transient failure and the host may retry the
7f4f2302a11173 K. Y. Srinivasan 2013-03-18 1012 * hot-add operation after some delay.
7f4f2302a11173 K. Y. Srinivasan 2013-03-18 1013 */
1cac8cd4d146b6 K. Y. Srinivasan 2013-03-15 1014 if (resp.page_count > 0)
1cac8cd4d146b6 K. Y. Srinivasan 2013-03-15 1015 resp.result = 1;
7f4f2302a11173 K. Y. Srinivasan 2013-03-18 1016 else if (!do_hot_add)
7f4f2302a11173 K. Y. Srinivasan 2013-03-18 1017 resp.result = 1;
1cac8cd4d146b6 K. Y. Srinivasan 2013-03-15 1018 else
9aa8b50b2b3d3a K. Y. Srinivasan 2012-11-14 1019 resp.result = 0;
9aa8b50b2b3d3a K. Y. Srinivasan 2012-11-14 1020
25bd2b2f1f0534 Dexuan Cui 2019-11-19 1021 if (!do_hot_add || resp.page_count == 0) {
25bd2b2f1f0534 Dexuan Cui 2019-11-19 1022 if (!allow_hibernation)
223e1e4d2c16fe Vitaly Kuznetsov 2018-03-04 1023 pr_err("Memory hot add failed\n");
25bd2b2f1f0534 Dexuan Cui 2019-11-19 1024 else
25bd2b2f1f0534 Dexuan Cui 2019-11-19 1025 pr_info("Ignore hot-add request!\n");
25bd2b2f1f0534 Dexuan Cui 2019-11-19 1026 }
1cac8cd4d146b6 K. Y. Srinivasan 2013-03-15 1027
1cac8cd4d146b6 K. Y. Srinivasan 2013-03-15 1028 dm->state = DM_INITIALIZED;
20138d6cb838aa K. Y. Srinivasan 2013-07-17 1029 resp.hdr.trans_id = atomic_inc_return(&trans_id);
1cac8cd4d146b6 K. Y. Srinivasan 2013-03-15 1030 vmbus_sendpacket(dm->dev->channel, &resp,
9aa8b50b2b3d3a K. Y. Srinivasan 2012-11-14 1031 sizeof(struct dm_hot_add_response),
9aa8b50b2b3d3a K. Y. Srinivasan 2012-11-14 1032 (unsigned long)NULL,
9aa8b50b2b3d3a K. Y. Srinivasan 2012-11-14 1033 VM_PKT_DATA_INBAND, 0);
9aa8b50b2b3d3a K. Y. Srinivasan 2012-11-14 1034 }
9aa8b50b2b3d3a K. Y. Srinivasan 2012-11-14 1035
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki