drivers/firmware/efi/sysfb_efi.c:190:35: warning: unused variable 'efifb_dmi_system_table'
by kernel test robot
Hi Randy,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c9e6606c7fe92b50a02ce51dda82586ebdf99b48
commit: 15d27b15de965043d6f8e23bc7f34386fcd1a772 efi: sysfb_efi: fix build when EFI is not set
date: 5 months ago
config: x86_64-randconfig-a016-20210927 (https://download.01.org/0day-ci/archive/20220104/202201041920.mOzzco4D-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project dc6e8dfdfe7efecfda318d43a06fae18b40eb498)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 15d27b15de965043d6f8e23bc7f34386fcd1a772
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/firmware/efi/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/firmware/efi/sysfb_efi.c:72:6: warning: no previous prototype for function 'efifb_setup_from_dmi' [-Wmissing-prototypes]
void efifb_setup_from_dmi(struct screen_info *si, const char *opt)
^
drivers/firmware/efi/sysfb_efi.c:72:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void efifb_setup_from_dmi(struct screen_info *si, const char *opt)
^
static
>> drivers/firmware/efi/sysfb_efi.c:190:35: warning: unused variable 'efifb_dmi_system_table' [-Wunused-const-variable]
static const struct dmi_system_id efifb_dmi_system_table[] __initconst = {
^
>> drivers/firmware/efi/sysfb_efi.c:240:35: warning: unused variable 'efifb_dmi_swap_width_height' [-Wunused-const-variable]
static const struct dmi_system_id efifb_dmi_swap_width_height[] __initconst = {
^
>> drivers/firmware/efi/sysfb_efi.c:331:39: warning: unused variable 'efifb_fwnode_ops' [-Wunused-const-variable]
static const struct fwnode_operations efifb_fwnode_ops = {
^
4 warnings generated.
vim +/efifb_dmi_system_table +190 drivers/firmware/efi/sysfb_efi.c
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 71
21289ec02b41c4 arch/x86/kernel/sysfb_efi.c Ard Biesheuvel 2016-04-25 @72 void efifb_setup_from_dmi(struct screen_info *si, const char *opt)
21289ec02b41c4 arch/x86/kernel/sysfb_efi.c Ard Biesheuvel 2016-04-25 73 {
21289ec02b41c4 arch/x86/kernel/sysfb_efi.c Ard Biesheuvel 2016-04-25 74 int i;
21289ec02b41c4 arch/x86/kernel/sysfb_efi.c Ard Biesheuvel 2016-04-25 75
21289ec02b41c4 arch/x86/kernel/sysfb_efi.c Ard Biesheuvel 2016-04-25 76 for (i = 0; i < M_UNKNOWN; i++) {
21289ec02b41c4 arch/x86/kernel/sysfb_efi.c Ard Biesheuvel 2016-04-25 77 if (efifb_dmi_list[i].base != 0 &&
21289ec02b41c4 arch/x86/kernel/sysfb_efi.c Ard Biesheuvel 2016-04-25 78 !strcmp(opt, efifb_dmi_list[i].optname)) {
21289ec02b41c4 arch/x86/kernel/sysfb_efi.c Ard Biesheuvel 2016-04-25 79 si->lfb_base = efifb_dmi_list[i].base;
21289ec02b41c4 arch/x86/kernel/sysfb_efi.c Ard Biesheuvel 2016-04-25 80 si->lfb_linelength = efifb_dmi_list[i].stride;
21289ec02b41c4 arch/x86/kernel/sysfb_efi.c Ard Biesheuvel 2016-04-25 81 si->lfb_width = efifb_dmi_list[i].width;
21289ec02b41c4 arch/x86/kernel/sysfb_efi.c Ard Biesheuvel 2016-04-25 82 si->lfb_height = efifb_dmi_list[i].height;
21289ec02b41c4 arch/x86/kernel/sysfb_efi.c Ard Biesheuvel 2016-04-25 83 }
21289ec02b41c4 arch/x86/kernel/sysfb_efi.c Ard Biesheuvel 2016-04-25 84 }
21289ec02b41c4 arch/x86/kernel/sysfb_efi.c Ard Biesheuvel 2016-04-25 85 }
21289ec02b41c4 arch/x86/kernel/sysfb_efi.c Ard Biesheuvel 2016-04-25 86
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 87 #define choose_value(dmivalue, fwvalue, field, flags) ({ \
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 88 typeof(fwvalue) _ret_ = fwvalue; \
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 89 if ((flags) & (field)) \
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 90 _ret_ = dmivalue; \
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 91 else if ((fwvalue) == 0) \
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 92 _ret_ = dmivalue; \
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 93 _ret_; \
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 94 })
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 95
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 96 static int __init efifb_set_system(const struct dmi_system_id *id)
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 97 {
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 98 struct efifb_dmi_info *info = id->driver_data;
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 99
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 100 if (info->base == 0 && info->height == 0 && info->width == 0 &&
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 101 info->stride == 0)
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 102 return 0;
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 103
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 104 /* Trust the bootloader over the DMI tables */
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 105 if (screen_info.lfb_base == 0) {
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 106 #if defined(CONFIG_PCI)
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 107 struct pci_dev *dev = NULL;
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 108 int found_bar = 0;
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 109 #endif
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 110 if (info->base) {
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 111 screen_info.lfb_base = choose_value(info->base,
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 112 screen_info.lfb_base, OVERRIDE_BASE,
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 113 info->flags);
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 114
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 115 #if defined(CONFIG_PCI)
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 116 /* make sure that the address in the table is actually
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 117 * on a VGA device's PCI BAR */
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 118
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 119 for_each_pci_dev(dev) {
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 120 int i;
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 121 if ((dev->class >> 8) != PCI_CLASS_DISPLAY_VGA)
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 122 continue;
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 123 for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 124 resource_size_t start, end;
c10fcb14c7afd6 arch/x86/kernel/sysfb_efi.c Wang YanQing 2016-05-05 125 unsigned long flags;
c10fcb14c7afd6 arch/x86/kernel/sysfb_efi.c Wang YanQing 2016-05-05 126
c10fcb14c7afd6 arch/x86/kernel/sysfb_efi.c Wang YanQing 2016-05-05 127 flags = pci_resource_flags(dev, i);
c10fcb14c7afd6 arch/x86/kernel/sysfb_efi.c Wang YanQing 2016-05-05 128 if (!(flags & IORESOURCE_MEM))
c10fcb14c7afd6 arch/x86/kernel/sysfb_efi.c Wang YanQing 2016-05-05 129 continue;
c10fcb14c7afd6 arch/x86/kernel/sysfb_efi.c Wang YanQing 2016-05-05 130
c10fcb14c7afd6 arch/x86/kernel/sysfb_efi.c Wang YanQing 2016-05-05 131 if (flags & IORESOURCE_UNSET)
c10fcb14c7afd6 arch/x86/kernel/sysfb_efi.c Wang YanQing 2016-05-05 132 continue;
c10fcb14c7afd6 arch/x86/kernel/sysfb_efi.c Wang YanQing 2016-05-05 133
c10fcb14c7afd6 arch/x86/kernel/sysfb_efi.c Wang YanQing 2016-05-05 134 if (pci_resource_len(dev, i) == 0)
c10fcb14c7afd6 arch/x86/kernel/sysfb_efi.c Wang YanQing 2016-05-05 135 continue;
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 136
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 137 start = pci_resource_start(dev, i);
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 138 end = pci_resource_end(dev, i);
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 139 if (screen_info.lfb_base >= start &&
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 140 screen_info.lfb_base < end) {
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 141 found_bar = 1;
c10fcb14c7afd6 arch/x86/kernel/sysfb_efi.c Wang YanQing 2016-05-05 142 break;
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 143 }
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 144 }
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 145 }
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 146 if (!found_bar)
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 147 screen_info.lfb_base = 0;
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 148 #endif
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 149 }
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 150 }
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 151 if (screen_info.lfb_base) {
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 152 screen_info.lfb_linelength = choose_value(info->stride,
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 153 screen_info.lfb_linelength, OVERRIDE_STRIDE,
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 154 info->flags);
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 155 screen_info.lfb_width = choose_value(info->width,
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 156 screen_info.lfb_width, OVERRIDE_WIDTH,
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 157 info->flags);
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 158 screen_info.lfb_height = choose_value(info->height,
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 159 screen_info.lfb_height, OVERRIDE_HEIGHT,
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 160 info->flags);
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 161 if (screen_info.orig_video_isVGA == 0)
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 162 screen_info.orig_video_isVGA = VIDEO_TYPE_EFI;
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 163 } else {
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 164 screen_info.lfb_linelength = 0;
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 165 screen_info.lfb_width = 0;
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 166 screen_info.lfb_height = 0;
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 167 screen_info.orig_video_isVGA = 0;
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 168 return 0;
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 169 }
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 170
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 171 printk(KERN_INFO "efifb: dmi detected %s - framebuffer at 0x%08x "
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 172 "(%dx%d, stride %d)\n", id->ident,
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 173 screen_info.lfb_base, screen_info.lfb_width,
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 174 screen_info.lfb_height, screen_info.lfb_linelength);
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 175
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 176 return 1;
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 177 }
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 178
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 179 #define EFIFB_DMI_SYSTEM_ID(vendor, name, enumid) \
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 180 { \
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 181 efifb_set_system, \
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 182 name, \
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 183 { \
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 184 DMI_MATCH(DMI_BIOS_VENDOR, vendor), \
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 185 DMI_MATCH(DMI_PRODUCT_NAME, name) \
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 186 }, \
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 187 &efifb_dmi_list[enumid] \
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 188 }
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 189
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 @190 static const struct dmi_system_id efifb_dmi_system_table[] __initconst = {
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 191 EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "iMac4,1", M_I17),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 192 /* At least one of these two will be right; maybe both? */
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 193 EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "iMac5,1", M_I20),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 194 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "iMac5,1", M_I20),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 195 /* At least one of these two will be right; maybe both? */
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 196 EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "iMac6,1", M_I24),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 197 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "iMac6,1", M_I24),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 198 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "iMac7,1", M_I20_SR),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 199 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "iMac8,1", M_I24_8_1),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 200 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "iMac10,1", M_I24_10_1),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 201 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "iMac11,1", M_I27_11_1),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 202 EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "Macmini1,1", M_MINI),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 203 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "Macmini3,1", M_MINI_3_1),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 204 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "Macmini4,1", M_MINI_4_1),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 205 EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBook1,1", M_MB),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 206 /* At least one of these two will be right; maybe both? */
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 207 EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBook2,1", M_MB),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 208 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBook2,1", M_MB),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 209 /* At least one of these two will be right; maybe both? */
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 210 EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBook3,1", M_MB),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 211 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBook3,1", M_MB),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 212 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBook4,1", M_MB),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 213 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBook5,1", M_MB_5_1),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 214 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBook6,1", M_MB_6_1),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 215 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBook7,1", M_MB_7_1),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 216 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookAir1,1", M_MBA),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 217 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookAir3,1", M_MBA_3),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 218 EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBookPro1,1", M_MBP),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 219 EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBookPro2,1", M_MBP_2),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 220 EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBookPro2,2", M_MBP_2_2),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 221 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro2,1", M_MBP_2),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 222 EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBookPro3,1", M_MBP_SR),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 223 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro3,1", M_MBP_SR),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 224 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro4,1", M_MBP_4),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 225 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro5,1", M_MBP_5_1),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 226 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro5,2", M_MBP_5_2),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 227 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro5,3", M_MBP_5_3),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 228 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro6,1", M_MBP_6_1),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 229 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro6,2", M_MBP_6_2),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 230 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro7,1", M_MBP_7_1),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 231 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro8,2", M_MBP_8_2),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 232 {},
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 233 };
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 234
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 235 /*
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 236 * Some devices have a portrait LCD but advertise a landscape resolution (and
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 237 * pitch). We simply swap width and height for these devices so that we can
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 238 * correctly deal with some of them coming with multiple resolutions.
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 239 */
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 @240 static const struct dmi_system_id efifb_dmi_swap_width_height[] __initconst = {
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 241 {
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 242 /*
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 243 * Lenovo MIIX310-10ICR, only some batches have the troublesome
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 244 * 800x1280 portrait screen. Luckily the portrait version has
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 245 * its own BIOS version, so we match on that.
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 246 */
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 247 .matches = {
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 248 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "LENOVO"),
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 249 DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "MIIX 310-10ICR"),
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 250 DMI_EXACT_MATCH(DMI_BIOS_VERSION, "1HCN44WW"),
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 251 },
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 252 },
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 253 {
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 254 /* Lenovo MIIX 320-10ICR with 800x1280 portrait screen */
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 255 .matches = {
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 256 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "LENOVO"),
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 257 DMI_EXACT_MATCH(DMI_PRODUCT_VERSION,
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 258 "Lenovo MIIX 320-10ICR"),
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 259 },
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 260 },
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 261 {
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 262 /* Lenovo D330 with 800x1280 or 1200x1920 portrait screen */
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 263 .matches = {
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 264 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "LENOVO"),
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 265 DMI_EXACT_MATCH(DMI_PRODUCT_VERSION,
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 266 "Lenovo ideapad D330-10IGM"),
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 267 },
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 268 },
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 269 {},
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 270 };
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 271
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 272 static bool efifb_overlaps_pci_range(const struct of_pci_range *range)
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 273 {
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 274 u64 fb_base = screen_info.lfb_base;
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 275
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 276 if (screen_info.capabilities & VIDEO_CAPABILITY_64BIT_BASE)
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 277 fb_base |= (u64)(unsigned long)screen_info.ext_lfb_base << 32;
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 278
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 279 return fb_base >= range->cpu_addr &&
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 280 fb_base < (range->cpu_addr + range->size);
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 281 }
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 282
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 283 static struct device_node *find_pci_overlap_node(void)
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 284 {
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 285 struct device_node *np;
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 286
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 287 for_each_node_by_type(np, "pci") {
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 288 struct of_pci_range_parser parser;
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 289 struct of_pci_range range;
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 290 int err;
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 291
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 292 err = of_pci_range_parser_init(&parser, np);
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 293 if (err) {
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 294 pr_warn("of_pci_range_parser_init() failed: %d\n", err);
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 295 continue;
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 296 }
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 297
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 298 for_each_of_pci_range(&parser, &range)
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 299 if (efifb_overlaps_pci_range(&range))
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 300 return np;
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 301 }
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 302 return NULL;
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 303 }
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 304
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 305 /*
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 306 * If the efifb framebuffer is backed by a PCI graphics controller, we have
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 307 * to ensure that this relation is expressed using a device link when
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 308 * running in DT mode, or the probe order may be reversed, resulting in a
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 309 * resource reservation conflict on the memory window that the efifb
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 310 * framebuffer steals from the PCIe host bridge.
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 311 */
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 312 static int efifb_add_links(struct fwnode_handle *fwnode)
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 313 {
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 314 struct device_node *sup_np;
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 315
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 316 sup_np = find_pci_overlap_node();
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 317
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 318 /*
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 319 * If there's no PCI graphics controller backing the efifb, we are
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 320 * done here.
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 321 */
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 322 if (!sup_np)
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 323 return 0;
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 324
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 325 fwnode_link_add(fwnode, of_fwnode_handle(sup_np));
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 326 of_node_put(sup_np);
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 327
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 328 return 0;
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 329 }
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 330
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 @331 static const struct fwnode_operations efifb_fwnode_ops = {
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 332 .add_links = efifb_add_links,
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 333 };
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 334
:::::: The code at line 190 was first introduced by commit
:::::: 2995e506276bfdc7311eb02db8b2aa1a61a4b849 x86: sysfb: move EFI quirks from efifb to sysfb
:::::: TO: David Herrmann <dh.herrmann(a)gmail.com>
:::::: CC: H. Peter Anvin <hpa(a)linux.intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months
[mingo-tip:sched/headers 195/2384] init/main.c:947:34: error: no member named 'scoped_addresses' in 'struct kcsan_ctx'; did you mean 'scoped_accesses'?
by kernel test robot
tree: git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git sched/headers
head: 4c707c1c0de83967079b4e385012fa5b00e2cd11
commit: 358c0016c619cb96065fc10b25be736053481392 [195/2384] headers/deps: kcsan: Move task_struct::kcsan_ctx to per_task()
config: x86_64-randconfig-c007 (https://download.01.org/0day-ci/archive/20220117/202201170819.f8ENBRJK-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c63a3175c2947e8c1a2d3bbe16a8586600705c54)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git/commit/?id=...
git remote add mingo-tip git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git
git fetch --no-tags mingo-tip sched/headers
git checkout 358c0016c619cb96065fc10b25be736053481392
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
init/main.c:790:20: warning: no previous prototype for function 'mem_encrypt_init' [-Wmissing-prototypes]
void __init __weak mem_encrypt_init(void) { }
^
init/main.c:790:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __init __weak mem_encrypt_init(void) { }
^
static
>> init/main.c:947:34: error: no member named 'scoped_addresses' in 'struct kcsan_ctx'; did you mean 'scoped_accesses'?
per_task(&init_task, kcsan_ctx).scoped_addresses.next = LIST_POISON1;
^~~~~~~~~~~~~~~~
scoped_accesses
include/linux/kcsan.h:55:19: note: 'scoped_accesses' declared here
struct list_head scoped_accesses;
^
init/main.c:891:13: warning: no previous prototype for function 'init_per_task_early' [-Wmissing-prototypes]
void __init init_per_task_early(void)
^
init/main.c:891:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __init init_per_task_early(void)
^
static
2 warnings and 1 error generated.
vim +947 init/main.c
890
891 void __init init_per_task_early(void)
892 {
893 #ifdef CONFIG_POSIX_TIMERS
894 per_task(&init_task, posix_cputimers) = (struct posix_cputimers) __INIT_CPU_TIMERS(init_task);
895 #endif
896 task_thread(&init_task) = (struct thread_struct) INIT_THREAD;
897
898 INIT_LIST_HEAD(&per_task(&init_task, rt).run_list);
899 per_task(&init_task, rt).time_slice = RR_TIMESLICE;
900
901 INIT_LIST_HEAD(&per_task(&init_task, se).group_node);
902
903 per_task(&init_task, stack) = init_stack;
904
905 refcount_set(&per_task(&init_task, usage), 2);
906 #ifdef CONFIG_THREAD_INFO_IN_TASK
907 refcount_set(&per_task(&init_task, stack_refcount), 1);
908 #endif
909 #ifdef CONFIG_CGROUP_SCHED
910 per_task(&init_task, sched_task_group) = &root_task_group;
911 #endif
912 #ifdef CONFIG_TASKS_RCU
913 per_task(&init_task, rcu_tasks_idle_cpu) = -1;
914 INIT_LIST_HEAD(&per_task(&init_task, rcu_tasks_holdout_list));
915 #endif
916 #ifdef CONFIG_CPUSETS
917 per_task(&init_task, mems_allowed_seq) = (seqcount_spinlock_t) SEQCNT_SPINLOCK_ZERO(init_task.mems_allowed_seq,
918 &per_task(&init_task, alloc_lock));
919 #endif
920 per_task(&init_task, restart_block).fn = do_no_restart_syscall;
921 #ifdef CONFIG_VIRT_CPU_ACCOUNTING_GEN
922 seqcount_init(&per_task(&init_task, vtime).seqcount);
923 per_task(&init_task, vtime).state = VTIME_SYS;
924 #endif
925 #ifdef CONFIG_PERF_EVENTS
926 mutex_init(&per_task(&init_task, perf_event_mutex));
927 INIT_LIST_HEAD(&per_task(&init_task, perf_event_list));
928 #endif
929 #ifdef CONFIG_SMP
930 plist_node_init(&per_task(&init_task, pushable_tasks), MAX_PRIO);
931 #endif
932 #ifdef CONFIG_AUDIT
933 per_task(&init_task, loginuid) = INVALID_UID;
934 #endif
935 per_task(&init_task, cpus_mask) = CPU_MASK_ALL;
936 per_task(&init_task, cpus_ptr) = &per_task(&init_task, cpus_mask);
937 INIT_LIST_HEAD(&per_task(&init_task, pending).list);
938 #ifdef CONFIG_RT_MUTEXES
939 per_task(&init_task, pi_waiters) = RB_ROOT_CACHED;
940 #endif
941 #ifndef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE
942 raw_spin_lock_init(&per_task(&init_task, prev_cputime).lock);
943 #endif
944 spin_lock_init(&per_task(&init_task, alloc_lock));
945 raw_spin_lock_init(&per_task(&init_task, pi_lock));
946 #ifdef CONFIG_KCSAN
> 947 per_task(&init_task, kcsan_ctx).scoped_addresses.next = LIST_POISON1;
948 #endif
949 }
950
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months
drivers/media/i2c/ov5648.c:2035:39: warning: taking address of packed member 'handler' of class or structure 'ov5648_ctrls' may result in an unaligned pointer value
by kernel test robot
Hi Paul,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 79e06c4c4950be2abd8ca5d2428a8c915aa62c24
commit: e43ccb0a045f34838b786e8021dc4838b4af5c38 media: i2c: Add support for the OV5648 image sensor
date: 1 year ago
config: mips-randconfig-r002-20220116 (https://download.01.org/0day-ci/archive/20220117/202201170727.bHmScZS3-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c63a3175c2947e8c1a2d3bbe16a8586600705c54)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout e43ccb0a045f34838b786e8021dc4838b4af5c38
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash drivers/hid/ drivers/iio/adc/ drivers/media/i2c/ drivers/media/v4l2-core/ drivers/usb/gadget/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/media/i2c/ov5648.c:2035:39: warning: taking address of packed member 'handler' of class or structure 'ov5648_ctrls' may result in an unaligned pointer value [-Waddress-of-packed-member]
struct v4l2_ctrl_handler *handler = &ctrls->handler;
^~~~~~~~~~~~~~
>> drivers/media/i2c/ov5648.c:2054:29: warning: taking address of packed member 'exposure_auto' of class or structure 'ov5648_ctrls' may result in an unaligned pointer value [-Waddress-of-packed-member]
v4l2_ctrl_auto_cluster(2, &ctrls->exposure_auto, 1, true);
^~~~~~~~~~~~~~~~~~~~
>> drivers/media/i2c/ov5648.c:2064:29: warning: taking address of packed member 'gain_auto' of class or structure 'ov5648_ctrls' may result in an unaligned pointer value [-Waddress-of-packed-member]
v4l2_ctrl_auto_cluster(2, &ctrls->gain_auto, 0, true);
^~~~~~~~~~~~~~~~
>> drivers/media/i2c/ov5648.c:2080:29: warning: taking address of packed member 'white_balance_auto' of class or structure 'ov5648_ctrls' may result in an unaligned pointer value [-Waddress-of-packed-member]
v4l2_ctrl_auto_cluster(3, &ctrls->white_balance_auto, 0, false);
^~~~~~~~~~~~~~~~~~~~~~~~~
4 warnings generated.
vim +2035 drivers/media/i2c/ov5648.c
2031
2032 static int ov5648_ctrls_init(struct ov5648_sensor *sensor)
2033 {
2034 struct ov5648_ctrls *ctrls = &sensor->ctrls;
> 2035 struct v4l2_ctrl_handler *handler = &ctrls->handler;
2036 const struct v4l2_ctrl_ops *ops = &ov5648_ctrl_ops;
2037 int ret;
2038
2039 v4l2_ctrl_handler_init(handler, 32);
2040
2041 /* Use our mutex for ctrl locking. */
2042 handler->lock = &sensor->mutex;
2043
2044 /* Exposure */
2045
2046 ctrls->exposure_auto = v4l2_ctrl_new_std_menu(handler, ops,
2047 V4L2_CID_EXPOSURE_AUTO,
2048 V4L2_EXPOSURE_MANUAL, 0,
2049 V4L2_EXPOSURE_AUTO);
2050
2051 ctrls->exposure = v4l2_ctrl_new_std(handler, ops, V4L2_CID_EXPOSURE,
2052 16, 1048575, 16, 512);
2053
> 2054 v4l2_ctrl_auto_cluster(2, &ctrls->exposure_auto, 1, true);
2055
2056 /* Gain */
2057
2058 ctrls->gain_auto =
2059 v4l2_ctrl_new_std(handler, ops, V4L2_CID_AUTOGAIN, 0, 1, 1, 1);
2060
2061 ctrls->gain = v4l2_ctrl_new_std(handler, ops, V4L2_CID_GAIN, 16, 1023,
2062 16, 16);
2063
> 2064 v4l2_ctrl_auto_cluster(2, &ctrls->gain_auto, 0, true);
2065
2066 /* White Balance */
2067
2068 ctrls->white_balance_auto =
2069 v4l2_ctrl_new_std(handler, ops, V4L2_CID_AUTO_WHITE_BALANCE, 0,
2070 1, 1, 1);
2071
2072 ctrls->red_balance = v4l2_ctrl_new_std(handler, ops,
2073 V4L2_CID_RED_BALANCE, 0, 4095,
2074 1, 1024);
2075
2076 ctrls->blue_balance = v4l2_ctrl_new_std(handler, ops,
2077 V4L2_CID_BLUE_BALANCE, 0, 4095,
2078 1, 1024);
2079
> 2080 v4l2_ctrl_auto_cluster(3, &ctrls->white_balance_auto, 0, false);
2081
2082 /* Flip */
2083
2084 v4l2_ctrl_new_std(handler, ops, V4L2_CID_HFLIP, 0, 1, 1, 0);
2085 v4l2_ctrl_new_std(handler, ops, V4L2_CID_VFLIP, 0, 1, 1, 0);
2086
2087 /* Test Pattern */
2088
2089 v4l2_ctrl_new_std_menu_items(handler, ops, V4L2_CID_TEST_PATTERN,
2090 ARRAY_SIZE(ov5648_test_pattern_menu) - 1,
2091 0, 0, ov5648_test_pattern_menu);
2092
2093 /* MIPI CSI-2 */
2094
2095 ctrls->link_freq =
2096 v4l2_ctrl_new_int_menu(handler, NULL, V4L2_CID_LINK_FREQ,
2097 ARRAY_SIZE(ov5648_link_freq_menu) - 1,
2098 0, ov5648_link_freq_menu);
2099
2100 ctrls->pixel_rate =
2101 v4l2_ctrl_new_std(handler, NULL, V4L2_CID_PIXEL_RATE, 1,
2102 INT_MAX, 1, 1);
2103
2104 if (handler->error) {
2105 ret = handler->error;
2106 goto error_ctrls;
2107 }
2108
2109 ctrls->exposure->flags |= V4L2_CTRL_FLAG_VOLATILE;
2110 ctrls->gain->flags |= V4L2_CTRL_FLAG_VOLATILE;
2111
2112 ctrls->link_freq->flags |= V4L2_CTRL_FLAG_READ_ONLY;
2113 ctrls->pixel_rate->flags |= V4L2_CTRL_FLAG_READ_ONLY;
2114
2115 sensor->subdev.ctrl_handler = handler;
2116
2117 return 0;
2118
2119 error_ctrls:
2120 v4l2_ctrl_handler_free(handler);
2121
2122 return ret;
2123 }
2124
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months
[mingo-tip:sched/headers 1617/2384] arch/mips/alchemy/common/clock.c:143:2: error: use of undeclared identifier 'preset_lpj'
by kernel test robot
tree: git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git sched/headers
head: 4c707c1c0de83967079b4e385012fa5b00e2cd11
commit: 4a1f9d16bf267958eefcbac668167e6135f75621 [1617/2384] headers/deps: ktime: Remove the <linux/ktime_api.h> header from <linux/ktime.h>
config: mips-randconfig-c004-20220116 (https://download.01.org/0day-ci/archive/20220117/202201170727.IDnTpMbA-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c63a3175c2947e8c1a2d3bbe16a8586600705c54)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git/commit/?id=...
git remote add mingo-tip git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git
git fetch --no-tags mingo-tip sched/headers
git checkout 4a1f9d16bf267958eefcbac668167e6135f75621
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> arch/mips/alchemy/common/clock.c:143:2: error: use of undeclared identifier 'preset_lpj'
preset_lpj = alchemy_clk_cpu_recalc(NULL, ALCHEMY_ROOTCLK_RATE);
^
arch/mips/alchemy/common/clock.c:144:2: error: use of undeclared identifier 'preset_lpj'
preset_lpj /= 2 * HZ;
^
arch/mips/alchemy/common/clock.c:141:13: warning: no previous prototype for function 'alchemy_set_lpj' [-Wmissing-prototypes]
void __init alchemy_set_lpj(void)
^
arch/mips/alchemy/common/clock.c:141:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __init alchemy_set_lpj(void)
^
static
arch/mips/alchemy/common/clock.c:554:31: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
unsigned long div, v, flags, ret;
^
arch/mips/alchemy/common/clock.c:676:31: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
unsigned long div, v, flags, ret;
^
3 warnings and 2 errors generated.
vim +/preset_lpj +143 arch/mips/alchemy/common/clock.c
474402291a0ad4 Manuel Lauss 2014-07-23 140
45a848f7fa067a Manuel Lauss 2015-01-29 141 void __init alchemy_set_lpj(void)
45a848f7fa067a Manuel Lauss 2015-01-29 142 {
45a848f7fa067a Manuel Lauss 2015-01-29 @143 preset_lpj = alchemy_clk_cpu_recalc(NULL, ALCHEMY_ROOTCLK_RATE);
45a848f7fa067a Manuel Lauss 2015-01-29 144 preset_lpj /= 2 * HZ;
45a848f7fa067a Manuel Lauss 2015-01-29 145 }
45a848f7fa067a Manuel Lauss 2015-01-29 146
:::::: The code at line 143 was first introduced by commit
:::::: 45a848f7fa067a81ae606bb06b2edcdf53772eac MIPS: Alchemy: preset loops_per_jiffy based on CPU clock
:::::: TO: Manuel Lauss <manuel.lauss(a)gmail.com>
:::::: CC: Ralf Baechle <ralf(a)linux-mips.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months
Re: [PATCH] Wire up CONFIG_DEVTMPFS_MOUNT to initramfs.
by kernel test robot
Hi Rob,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linux/master]
[also build test ERROR on linus/master v5.16 next-20220116]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Rob-Landley/Wire-up-CONFIG_DEVTM...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git daadb3bd0e8d3e317e36bc2c1542e86c528665e5
config: i386-randconfig-a001-20220117 (https://download.01.org/0day-ci/archive/20220117/202201170603.CXS8HDSz-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c63a3175c2947e8c1a2d3bbe16a8586600705c54)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/c6b7e8ccdf2b0a9620c9dc0b5e5b2a719...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Rob-Landley/Wire-up-CONFIG_DEVTMPFS_MOUNT-to-initramfs/20220117-023610
git checkout c6b7e8ccdf2b0a9620c9dc0b5e5b2a719b223817
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
init/main.c:780:20: warning: no previous prototype for function 'mem_encrypt_init' [-Wmissing-prototypes]
void __init __weak mem_encrypt_init(void) { }
^
init/main.c:780:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __init __weak mem_encrypt_init(void) { }
^
static
>> init/main.c:1624:3: error: implicit declaration of function 'sys_mkdir' [-Werror,-Wimplicit-function-declaration]
sys_mkdir("/dev", 0755);
^
init/main.c:1624:3: note: did you mean 'vfs_mkdir'?
include/linux/fs.h:1867:5: note: 'vfs_mkdir' declared here
int vfs_mkdir(struct user_namespace *, struct inode *,
^
1 warning and 1 error generated.
vim +/sys_mkdir +1624 init/main.c
1579
1580 static noinline void __init kernel_init_freeable(void)
1581 {
1582 /* Now the scheduler is fully set up and can do blocking allocations */
1583 gfp_allowed_mask = __GFP_BITS_MASK;
1584
1585 /*
1586 * init can allocate pages on any node
1587 */
1588 set_mems_allowed(node_states[N_MEMORY]);
1589
1590 cad_pid = get_pid(task_pid(current));
1591
1592 smp_prepare_cpus(setup_max_cpus);
1593
1594 workqueue_init();
1595
1596 init_mm_internals();
1597
1598 rcu_init_tasks_generic();
1599 do_pre_smp_initcalls();
1600 lockup_detector_init();
1601
1602 smp_init();
1603 sched_init_smp();
1604
1605 padata_init();
1606 page_alloc_init_late();
1607 /* Initialize page ext after all struct pages are initialized. */
1608 page_ext_init();
1609
1610 do_basic_setup();
1611
1612 kunit_run_all_tests();
1613
1614 wait_for_initramfs();
1615
1616 /*
1617 * check if there is an early userspace init. If yes, let it do all
1618 * the work
1619 */
1620 if (init_eaccess(ramdisk_execute_command) != 0) {
1621 ramdisk_execute_command = NULL;
1622 prepare_namespace();
1623 } else if (IS_ENABLED(CONFIG_DEVTMPFS_MOUNT)) {
> 1624 sys_mkdir("/dev", 0755);
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months
[intel-lts:5.10/yocto 18526/20368] drivers/gpio/gpio-ehl-pse-plat.c:79:6: warning: no previous prototype for function 'ehl_pse_gpio_free'
by kernel test robot
Hi Raymond,
FYI, the error/warning still remains.
tree: https://github.com/intel/linux-intel-lts.git 5.10/yocto
head: 1941d4b82f36cc6ecc513f3e496ad62726d00514
commit: 0bce160955505f13b1c53ce6c48eaa49f3dd472d [18526/20368] mfd: intel-ehl-gpio: Introduce MFD framework to PSE GPIO/TGPIO
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220117/202201170451.nBuGNQtN-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 650fc40b6d8d9a5869b4fca525d5f237b0ee2803)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel/linux-intel-lts/commit/0bce160955505f13b1c53ce6c...
git remote add intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-lts 5.10/yocto
git checkout 0bce160955505f13b1c53ce6c48eaa49f3dd472d
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/gpio/ drivers/gpu/drm/i915/ drivers/ptp/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/gpio/gpio-ehl-pse-plat.c:79:6: warning: no previous prototype for function 'ehl_pse_gpio_free' [-Wmissing-prototypes]
void ehl_pse_gpio_free(struct gpio_chip *chip, unsigned int offset)
^
drivers/gpio/gpio-ehl-pse-plat.c:79:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void ehl_pse_gpio_free(struct gpio_chip *chip, unsigned int offset)
^
static
drivers/gpio/gpio-ehl-pse-plat.c:175:6: warning: mixing declarations and code is a C99 extension [-Wdeclaration-after-statement]
u32 reg_gpdr = intel_gpio_readl(priv->reg_base, GPDR);
^
drivers/gpio/gpio-ehl-pse-plat.c:378:10: warning: incompatible pointer to integer conversion returning 'void *' from a function with result type 'int' [-Wint-conversion]
return NULL;
^~~~
include/linux/stddef.h:8:14: note: expanded from macro 'NULL'
#define NULL ((void *)0)
^~~~~~~~~~~
drivers/gpio/gpio-ehl-pse-plat.c:382:10: warning: incompatible pointer to integer conversion returning 'void *' from a function with result type 'int' [-Wint-conversion]
return NULL;
^~~~
include/linux/stddef.h:8:14: note: expanded from macro 'NULL'
#define NULL ((void *)0)
^~~~~~~~~~~
drivers/gpio/gpio-ehl-pse-plat.c:365:16: warning: unused variable 'base' [-Wunused-variable]
void __iomem *base;
^
5 warnings generated.
--
>> drivers/ptp/ptp-intel-tgpio-plat.c:234:6: warning: variable 'isgn' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (scaled_ppm < 0) {
^~~~~~~~~~~~~~
drivers/ptp/ptp-intel-tgpio-plat.c:247:9: note: uninitialized use occurs here
reg |= isgn << 31;
^~~~
drivers/ptp/ptp-intel-tgpio-plat.c:234:2: note: remove the 'if' if its condition is always true
if (scaled_ppm < 0) {
^~~~~~~~~~~~~~~~~~~~
drivers/ptp/ptp-intel-tgpio-plat.c:229:13: note: initialize the variable 'isgn' to silence this warning
bool isgn;
^
= 0
1 warning generated.
vim +/ehl_pse_gpio_free +79 drivers/gpio/gpio-ehl-pse-plat.c
78
> 79 void ehl_pse_gpio_free(struct gpio_chip *chip, unsigned int offset)
80 {
81 /* decrease runtime_usage counter */
82 pm_runtime_put_sync(chip->parent);
83 }
84
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 1 week