CC: [email protected]
In-Reply-To: <[email protected]>
References: <[email protected]>
TO: Furquan Shaikh <[email protected]>
TO: [email protected]
CC: Prashant Malani <[email protected]>
CC: "Greg Kroah-Hartman" <[email protected]>
CC: Arthur Heymans <[email protected]>
CC: Patrick Rudolph <[email protected]>
CC: Ard Biesheuvel <[email protected]>
CC: [email protected]
CC: Furquan Shaikh <[email protected]>

Hi Furquan,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on linux/master v5.9 next-20201023]
[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/Furquan-Shaikh/firmware-gsmi-Drop-the-use-of-dma_pool_-API-functions/20201021-130247
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
c4d6fe7311762f2e03b3c27ad38df7c40c80cc93
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: i386-randconfig-s002-20201023 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-17-g2d3af347-dirty
        # 
https://github.com/0day-ci/linux/commit/66886f5e6d40e829b8a48ab2dbb6615b906290a5
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review 
Furquan-Shaikh/firmware-gsmi-Drop-the-use-of-dma_pool_-API-functions/20201021-130247
        git checkout 66886f5e6d40e829b8a48ab2dbb6615b906290a5
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>


"sparse warnings: (new ones prefixed by >>)"
>> drivers/firmware/google/gsmi.c:170:16: sparse: sparse: shift too big (32) 
>> for type unsigned int

vim +170 drivers/firmware/google/gsmi.c

8942b2d5094b01 Furquan Shaikh 2018-10-12  151  
66886f5e6d40e8 Furquan Shaikh 2020-10-20  152  static struct gsmi_page 
*gsmi_page_alloc(void)
66886f5e6d40e8 Furquan Shaikh 2020-10-20  153  {
66886f5e6d40e8 Furquan Shaikh 2020-10-20  154   struct gsmi_page *page_info;
66886f5e6d40e8 Furquan Shaikh 2020-10-20  155  
66886f5e6d40e8 Furquan Shaikh 2020-10-20  156   page_info = 
kzalloc(sizeof(*page_info), GFP_KERNEL);
66886f5e6d40e8 Furquan Shaikh 2020-10-20  157   if (!page_info) {
66886f5e6d40e8 Furquan Shaikh 2020-10-20  158           printk(KERN_ERR "gsmi: 
out of memory\n");
66886f5e6d40e8 Furquan Shaikh 2020-10-20  159           return NULL;
66886f5e6d40e8 Furquan Shaikh 2020-10-20  160   }
66886f5e6d40e8 Furquan Shaikh 2020-10-20  161  
66886f5e6d40e8 Furquan Shaikh 2020-10-20  162   page_info->base_address = 
get_zeroed_page(GFP_KERNEL | GFP_DMA32);
66886f5e6d40e8 Furquan Shaikh 2020-10-20  163   if (!page_info->base_address) {
66886f5e6d40e8 Furquan Shaikh 2020-10-20  164           printk(KERN_ERR "gsmi: 
failed to allocate page for buffers\n");
66886f5e6d40e8 Furquan Shaikh 2020-10-20  165           return NULL;
66886f5e6d40e8 Furquan Shaikh 2020-10-20  166   }
66886f5e6d40e8 Furquan Shaikh 2020-10-20  167  
66886f5e6d40e8 Furquan Shaikh 2020-10-20  168   /* Ensure the entire buffer is 
allocated within 32bit address space */
66886f5e6d40e8 Furquan Shaikh 2020-10-20  169   if (virt_to_phys((void 
*)(page_info->base_address + PAGE_SIZE - 1))
66886f5e6d40e8 Furquan Shaikh 2020-10-20 @170       >> 32) {
66886f5e6d40e8 Furquan Shaikh 2020-10-20  171           printk(KERN_ERR "gsmi: 
allocation not within 32-bit physical address space\n");
66886f5e6d40e8 Furquan Shaikh 2020-10-20  172           
free_page(page_info->base_address);
66886f5e6d40e8 Furquan Shaikh 2020-10-20  173           kfree(page_info);
66886f5e6d40e8 Furquan Shaikh 2020-10-20  174           return NULL;
66886f5e6d40e8 Furquan Shaikh 2020-10-20  175   }
66886f5e6d40e8 Furquan Shaikh 2020-10-20  176  
66886f5e6d40e8 Furquan Shaikh 2020-10-20  177   page_info->alloc_size = 
PAGE_SIZE;
66886f5e6d40e8 Furquan Shaikh 2020-10-20  178  
66886f5e6d40e8 Furquan Shaikh 2020-10-20  179   return page_info;
66886f5e6d40e8 Furquan Shaikh 2020-10-20  180  }
66886f5e6d40e8 Furquan Shaikh 2020-10-20  181  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to