• Ben Dooks's avatar
    [PATCH] drivers/base - fix sparse warnings · a1bdc7aa
    Ben Dooks authored
    There are a number of sparse warnings from the latest sparse
    snapshot being generated from the drivers/base build. The
    main culprits are due to the initialisation functions not
    being declared in a header file.
    
    Also, the firmware.c file should include <linux/device.h>
    to get the prototype of  firmware_register() and
    firmware_unregister().
    
    This patch moves the init function declerations from the
    init.c file to the base.h, and ensures it is included in
    all the relevant c sources. It also adds <linux/device.h>
    to the included headers for firmware.c.
    
    The patch does not solve all the sparse errors generated,
    but reduces the count significantly.
    
    drivers/base/core.c:161:1: warning: symbol 'devices_subsys' was not declared. Should it be static?
    drivers/base/core.c:417:12: warning: symbol 'devices_init' was not declared. Should it be static?
    drivers/base/sys.c:253:6: warning: symbol 'sysdev_shutdown' was not declared. Should it be static?
    drivers/base/sys.c:326:5: warn...
    a1bdc7aa
firmware.c 715 Bytes