From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============4136878587847906625==" MIME-Version: 1.0 From: Andy Shevchenko To: kbuild-all@lists.01.org Subject: Re: [efi:urgent 6/6] drivers/firmware/efi/earlycon.c:33:10: warning: incompatible pointer to integer conversion returning 'void *' from a function with result type 'int' Date: Thu, 05 Dec 2019 21:50:59 +0200 Message-ID: <20191205195059.GC32742@smile.fi.intel.com> In-Reply-To: List-Id: --===============4136878587847906625== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Thu, Dec 05, 2019 at 11:12:34AM -0800, Nick Desaulniers wrote: > + Andy, looks legit. should be `return 0`. Thanks, Ard promised to fix this. Dunno what happen here. > On Thu, Dec 5, 2019 at 10:39 AM kbuild test robot wrote: > > > > CC: kbuild-all(a)lists.01.org > > CC: linux-efi(a)vger.kernel.org > > TO: Andy Shevchenko > > CC: Ard Biesheuvel > > > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git urg= ent > > head: 93afe6258b5ae6bd32981f5249f7b0c1a32cde01 > > commit: 93afe6258b5ae6bd32981f5249f7b0c1a32cde01 [6/6] efi/earlycon: Re= map entire framebuffer after page initialization > > config: arm64-defconfig (attached as .config) > > compiler: clang version 10.0.0 (git://gitmirror/llvm_project d6cbc9528d= 46d30416a6f9cd6c8570b704a0bd33) > > reproduce: > > wget https://raw.githubusercontent.com/intel/lkp-tests/master/s= bin/make.cross -O ~/bin/make.cross > > chmod +x ~/bin/make.cross > > git checkout 93afe6258b5ae6bd32981f5249f7b0c1a32cde01 > > # save the attached .config to linux build tree > > make.cross ARCH=3Darm64 > > > > If you fix the issue, kindly add following tag > > Reported-by: kbuild test robot > > > > All warnings (new ones prefixed by >>): > > > > >> drivers/firmware/efi/earlycon.c:33: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) > > ^~~~~~~~~~~ > > 1 warning generated. > > > > vim +33 drivers/firmware/efi/earlycon.c > > > > 22 > > 23 /* > > 24 * efi earlycon needs to use early_memremap() to map the frameb= uffer. > > 25 * But early_memremap() is not usable for 'earlycon=3Defifb kee= p_bootcon', > > 26 * memremap() should be used instead. memremap() will be availa= ble after > > 27 * paging_init() which is earlier than initcall callbacks. Thus= adding this > > 28 * early initcall function early_efi_map_fb() to map the whole = efi framebuffer. > > 29 */ > > 30 static int __init early_efi_map_fb(void) > > 31 { > > 32 if (!fb_base || !fb_size) > > > 33 return NULL; > > 34 > > 35 if (pgprot_val(fb_prot) =3D=3D pgprot_val(PAGE_KERNEL)) > > 36 efi_fb =3D memremap(fb_base, fb_size, MEMREMAP_= WB); > > 37 else > > 38 efi_fb =3D memremap(fb_base, fb_size, MEMREMAP_= WC); > > 39 > > 40 return efi_fb ? 0 : -ENOMEM; > > 41 } > > 42 early_initcall(early_efi_map_fb); > > 43 > > > > --- > > 0-DAY kernel test infrastructure Open Source Technology= Center > > https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Co= rporation > = > = > = > -- = > Thanks, > ~Nick Desaulniers -- = With Best Regards, Andy Shevchenko --===============4136878587847906625==--