Skip to content
  • Bruno Prémont's avatar
    HID: picoLCD: satify some checkpatch warnings · baacf9c5
    Bruno Prémont authored
    
    
    WARNING: static const char * array should probably be static const char * const
    +static const char *error_codes[] = {
    
    WARNING: min() should probably be min_t(size_t, 20, s)
    +       raw_data[2] = min((size_t)20, s);
    
    Note: the second min_t suggestion cannot be followed because GCC is not
    smart enough to track constants through it and make
    copy_from_user_overflow() check happy.
    
    WARNING: min() should probably be min_t(u8, 20, raw_data[2])
    +       if (copy_from_user(raw_data+3, u, min((u8)20, raw_data[2])))
                    return -EFAULT;
    
    Signed-off-by: default avatarBruno Prémont <bonbons@linux-vserver.org>
    Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
    baacf9c5