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

[xen-tip:linux-next 6/10] drivers/xen/grant-dma-ops.c:278:6: warning: no previous prototype for 'xen_grant_setup_dma_ops'



Hi Juergen,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git linux-next
head:   bb1b8419ea23d8d2de3c886a540f41e39dfe82a9
commit: 6b268a48884cf8ef00477a0e652864638391587c [6/10] xen/virtio: Enable 
restricted memory access using Xen grant mappings
config: x86_64-allyesconfig 
(https://download.01.org/0day-ci/archive/20220606/202206062149.cNjVOFb7-lkp@xxxxxxxxx/config)
compiler: gcc-11 (Debian 11.3.0-1) 11.3.0
reproduce (this is a W=1 build):
        # 
https://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git/commit/?id=6b268a48884cf8ef00477a0e652864638391587c
        git remote add xen-tip 
https://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git
        git fetch --no-tags xen-tip linux-next
        git checkout 6b268a48884cf8ef00477a0e652864638391587c
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/net/usb/ 
drivers/xen/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

>> drivers/xen/grant-dma-ops.c:278:6: warning: no previous prototype for 
>> 'xen_grant_setup_dma_ops' [-Wmissing-prototypes]
     278 | void xen_grant_setup_dma_ops(struct device *dev)
         |      ^~~~~~~~~~~~~~~~~~~~~~~


vim +/xen_grant_setup_dma_ops +278 drivers/xen/grant-dma-ops.c

2c73e39aceb90b Juergen Gross 2022-06-02  277  
2c73e39aceb90b Juergen Gross 2022-06-02 @278  void 
xen_grant_setup_dma_ops(struct device *dev)
2c73e39aceb90b Juergen Gross 2022-06-02  279  {
2c73e39aceb90b Juergen Gross 2022-06-02  280    struct xen_grant_dma_data *data;
2c73e39aceb90b Juergen Gross 2022-06-02  281  
2c73e39aceb90b Juergen Gross 2022-06-02  282    data = 
find_xen_grant_dma_data(dev);
2c73e39aceb90b Juergen Gross 2022-06-02  283    if (data) {
2c73e39aceb90b Juergen Gross 2022-06-02  284            dev_err(dev, "Xen grant 
DMA data is already created\n");
2c73e39aceb90b Juergen Gross 2022-06-02  285            return;
2c73e39aceb90b Juergen Gross 2022-06-02  286    }
2c73e39aceb90b Juergen Gross 2022-06-02  287  
2c73e39aceb90b Juergen Gross 2022-06-02  288    data = devm_kzalloc(dev, 
sizeof(*data), GFP_KERNEL);
2c73e39aceb90b Juergen Gross 2022-06-02  289    if (!data)
2c73e39aceb90b Juergen Gross 2022-06-02  290            goto err;
2c73e39aceb90b Juergen Gross 2022-06-02  291  
2c73e39aceb90b Juergen Gross 2022-06-02  292    /* XXX The dom0 is hardcoded as 
the backend domain for now */
2c73e39aceb90b Juergen Gross 2022-06-02  293    data->backend_domid = 0;
2c73e39aceb90b Juergen Gross 2022-06-02  294  
2c73e39aceb90b Juergen Gross 2022-06-02  295    if 
(xa_err(xa_store(&xen_grant_dma_devices, (unsigned long)dev, data,
2c73e39aceb90b Juergen Gross 2022-06-02  296                    GFP_KERNEL))) {
2c73e39aceb90b Juergen Gross 2022-06-02  297            dev_err(dev, "Cannot 
store Xen grant DMA data\n");
2c73e39aceb90b Juergen Gross 2022-06-02  298            goto err;
2c73e39aceb90b Juergen Gross 2022-06-02  299    }
2c73e39aceb90b Juergen Gross 2022-06-02  300  
2c73e39aceb90b Juergen Gross 2022-06-02  301    dev->dma_ops = 
&xen_grant_dma_ops;
2c73e39aceb90b Juergen Gross 2022-06-02  302  
2c73e39aceb90b Juergen Gross 2022-06-02  303    return;
2c73e39aceb90b Juergen Gross 2022-06-02  304  
2c73e39aceb90b Juergen Gross 2022-06-02  305  err:
2c73e39aceb90b Juergen Gross 2022-06-02  306    dev_err(dev, "Cannot set up Xen 
grant DMA ops, retain platform DMA ops\n");
2c73e39aceb90b Juergen Gross 2022-06-02  307  }
2c73e39aceb90b Juergen Gross 2022-06-02  308  

:::::: The code at line 278 was first introduced by commit
:::::: 2c73e39aceb90b59058cdbc497916049e798963c xen/grant-dma-ops: Add option 
to restrict memory access under Xen

:::::: TO: Juergen Gross <jgross@xxxxxxxx>
:::::: CC: Juergen Gross <jgross@xxxxxxxx>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.