Re: [PATCH v3 4/4] virt: vmgenid: add support for devicetree bindings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sudan,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 8e938e39866920ddc266898e6ae1fffc5c8f51aa]

url:    https://github.com/intel-lab-lkp/linux/commits/Sudan-Landge/virt-vmgenid-rearrange-code-to-make-review-easier/20240326-035657
base:   8e938e39866920ddc266898e6ae1fffc5c8f51aa
patch link:    https://lore.kernel.org/r/20240325195306.13133-5-sudanl%40amazon.com
patch subject: [PATCH v3 4/4] virt: vmgenid: add support for devicetree bindings
config: x86_64-buildonly-randconfig-004-20240326 (https://download.01.org/0day-ci/archive/20240327/202403270050.wJ0Hd5aB-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240327/202403270050.wJ0Hd5aB-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/202403270050.wJ0Hd5aB-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   drivers/virt/vmgenid.c: In function 'vmgenid_add_of':
   drivers/virt/vmgenid.c:154:15: error: 'dev' undeclared (first use in this function); did you mean 'pdev'?
     154 |         (void)dev;
         |               ^~~
         |               pdev
   drivers/virt/vmgenid.c:154:15: note: each undeclared identifier is reported only once for each function it appears in
   drivers/virt/vmgenid.c: At top level:
>> drivers/virt/vmgenid.c:60:12: warning: 'setup_vmgenid_state' defined but not used [-Wunused-function]
      60 | static int setup_vmgenid_state(struct vmgenid_state *state, u8 *next_id)
         |            ^~~~~~~~~~~~~~~~~~~
>> drivers/virt/vmgenid.c:27:13: warning: 'vmgenid_notify' defined but not used [-Wunused-function]
      27 | static void vmgenid_notify(struct device *device)
         |             ^~~~~~~~~~~~~~


vim +/setup_vmgenid_state +60 drivers/virt/vmgenid.c

af6b54e2b5baa5 Jason A. Donenfeld 2022-02-23  26  
fba2c3554a30ca Sudan Landge       2024-03-25 @27  static void vmgenid_notify(struct device *device)
5eb78dfcd888d3 Sudan Landge       2024-03-25  28  {
fba2c3554a30ca Sudan Landge       2024-03-25  29  	struct vmgenid_state *state = device->driver_data;
5eb78dfcd888d3 Sudan Landge       2024-03-25  30  	char *envp[] = { "NEW_VMGENID=1", NULL };
5eb78dfcd888d3 Sudan Landge       2024-03-25  31  	u8 old_id[VMGENID_SIZE];
5eb78dfcd888d3 Sudan Landge       2024-03-25  32  
5eb78dfcd888d3 Sudan Landge       2024-03-25  33  	memcpy(old_id, state->this_id, sizeof(old_id));
5eb78dfcd888d3 Sudan Landge       2024-03-25  34  	memcpy(state->this_id, state->next_id, sizeof(state->this_id));
5eb78dfcd888d3 Sudan Landge       2024-03-25  35  	if (!memcmp(old_id, state->this_id, sizeof(old_id)))
5eb78dfcd888d3 Sudan Landge       2024-03-25  36  		return;
5eb78dfcd888d3 Sudan Landge       2024-03-25  37  	add_vmfork_randomness(state->this_id, sizeof(state->this_id));
fba2c3554a30ca Sudan Landge       2024-03-25  38  	kobject_uevent_env(&device->kobj, KOBJ_CHANGE, envp);
5eb78dfcd888d3 Sudan Landge       2024-03-25  39  }
5eb78dfcd888d3 Sudan Landge       2024-03-25  40  
84d2b6732ae89f Sudan Landge       2024-03-25  41  #if IS_ENABLED(CONFIG_ACPI)
fba2c3554a30ca Sudan Landge       2024-03-25  42  static void vmgenid_acpi_handler(acpi_handle handle, u32 event, void *dev)
af6b54e2b5baa5 Jason A. Donenfeld 2022-02-23  43  {
84d2b6732ae89f Sudan Landge       2024-03-25  44  	(void)handle;
84d2b6732ae89f Sudan Landge       2024-03-25  45  	(void)event;
fba2c3554a30ca Sudan Landge       2024-03-25  46  	vmgenid_notify(dev);
fba2c3554a30ca Sudan Landge       2024-03-25  47  }
84d2b6732ae89f Sudan Landge       2024-03-25  48  #endif
84d2b6732ae89f Sudan Landge       2024-03-25  49  
84d2b6732ae89f Sudan Landge       2024-03-25  50  #if IS_ENABLED(CONFIG_OF)
84d2b6732ae89f Sudan Landge       2024-03-25  51  static irqreturn_t vmgenid_of_irq_handler(int irq, void *dev)
84d2b6732ae89f Sudan Landge       2024-03-25  52  {
84d2b6732ae89f Sudan Landge       2024-03-25  53  	(void)irq;
84d2b6732ae89f Sudan Landge       2024-03-25  54  	vmgenid_notify(dev);
84d2b6732ae89f Sudan Landge       2024-03-25  55  
84d2b6732ae89f Sudan Landge       2024-03-25  56  	return IRQ_HANDLED;
84d2b6732ae89f Sudan Landge       2024-03-25  57  }
84d2b6732ae89f Sudan Landge       2024-03-25  58  #endif
fba2c3554a30ca Sudan Landge       2024-03-25  59  
fba2c3554a30ca Sudan Landge       2024-03-25 @60  static int setup_vmgenid_state(struct vmgenid_state *state, u8 *next_id)
fba2c3554a30ca Sudan Landge       2024-03-25  61  {
fba2c3554a30ca Sudan Landge       2024-03-25  62  	if (IS_ERR(next_id))
fba2c3554a30ca Sudan Landge       2024-03-25  63  		return PTR_ERR(next_id);
fba2c3554a30ca Sudan Landge       2024-03-25  64  
fba2c3554a30ca Sudan Landge       2024-03-25  65  	state->next_id = next_id;
fba2c3554a30ca Sudan Landge       2024-03-25  66  	memcpy(state->this_id, state->next_id, sizeof(state->this_id));
fba2c3554a30ca Sudan Landge       2024-03-25  67  	add_device_randomness(state->this_id, sizeof(state->this_id));
fba2c3554a30ca Sudan Landge       2024-03-25  68  	return 0;
fba2c3554a30ca Sudan Landge       2024-03-25  69  }
fba2c3554a30ca Sudan Landge       2024-03-25  70  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux