VirtualBox

Changeset 76938 in vbox for trunk/src/VBox/Additions/linux


Ignore:
Timestamp:
Jan 22, 2019 4:50:18 PM (6 years ago)
Author:
vboxsync
Message:

Additions/linux/vboxvideo: Fix incorrect type in assignment sparse warning
bugref:8282: Additions/linux: track kernel changes to vboxvideo in our own tree

Sparse emitted the following warning:
../drivers/staging/vboxvideo/vbox_fb.c:173:27: warning: incorrect type in as

signment (different address spaces)

../drivers/staging/vboxvideo/vbox_fb.c:173:27: expected char [noderef] <a

sn:2>*screen_base

../drivers/staging/vboxvideo/vbox_fb.c:173:27: got void *virtual


The vbox_bo buffer object kernel mapping is handled by a call
to ttm_bo_kmap() prior to the assignment of bo->kmap.virtual to
info->screen_base of type char iomem*.
Casting bo->kmap.virtual to char
iomem* in this assignment fixes
the warning.


vboxvideo: Fix address space of expression removal sparse warning


Sparse emitted the following warning:
../drivers/staging/vboxvideo/vbox_main.c:64:25: warning: cast removes address space of expression


vbox->vbva_buffers iomapping is handled by calling vbox_accel_init()
from vbox_hw_init().
force attribute is used in assignment to vbva to fix the warning.


Signed-off-by: Alexander Kapshuk <alexander.kapshuk@…>
Reviewed-by: Hans de Goede <hdegoede@…>
Signed-off-by: Greg Kroah-Hartman <gregkh@…>

Location:
trunk/src/VBox/Additions/linux
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/drm/vbox_fb.c

    r76936 r76938  
    344344                               sizes->fb_height);
    345345
    346         info->screen_base = bo->kmap.virtual;
     346        info->screen_base = (char __iomem *)bo->kmap.virtual;
    347347        info->screen_size = size;
    348348
  • trunk/src/VBox/Additions/linux/drm/vbox_main.c

    r76553 r76938  
    6868                        continue;
    6969
    70                 vbva = (void *)vbox->vbva_buffers + i * VBVA_MIN_BUFFER_SIZE;
     70                vbva = (void __force *)vbox->vbva_buffers + i * VBVA_MIN_BUFFER_SIZE;
    7171                if (!VBoxVBVAEnable(&vbox->vbva_info[i],
    7272                                 vbox->guest_pool, vbva, i)) {
  • trunk/src/VBox/Additions/linux/sharedfolders/lnkops.c

    r76744 r76938  
    3636#  if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
    3737static const char *sf_follow_link(struct dentry *dentry, void **cookie)
    38 #  else
     38#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
    3939static void *sf_follow_link(struct dentry *dentry, struct nameidata *nd)
     40#else
     41static int sf_follow_link(struct dentry *dentry, struct nameidata *nd)
    4042#  endif
    4143{
     
    6163#  else
    6264        nd_set_link(nd, error ? ERR_PTR(error) : path);
     65# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
    6366        return NULL;
    64 #  endif
     67# else
     68        return 0;
     69# endif
     70#endif
    6571}
    6672
    6773#  if LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0)
     74# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
    6875static void sf_put_link(struct dentry *dentry, struct nameidata *nd,
    6976                        void *cookie)
     77#else
     78static void sf_put_link(struct dentry *dentry, struct nameidata *nd)
     79#endif
    7080{
    7181        char *page = nd_get_link(nd);
  • trunk/src/VBox/Additions/linux/sharedfolders/utils.c

    r76733 r76938  
    853853        /* Each new shared folder map gets a new uint64_t identifier,
    854854         * allocated in sequence.  We ASSUME the sequence will not wrap. */
     855#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
    855856        static uint64_t s_u64Sequence = 0;
    856857        uint64_t u64CurrentSequence = ASMAtomicIncU64(&s_u64Sequence);
     858#endif
    857859
    858860        sf_g->bdi.ra_pages = 0; /* No readahead */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette