[josef-btrfs:master 3/11] mm/util.c:551:48: warning: right shift count >= width of type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git master
head:   d0a148ae67276be35f69f2f674913b8a1c54c4c8
commit: 51aa63bfa72fab9ec726b0b443ea92df53697502 [3/11] writeback: add counters for metadata usage
config: x86_64-randconfig-x014-201642 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        git checkout 51aa63bfa72fab9ec726b0b443ea92df53697502
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   mm/util.c: In function '__vm_enough_memory':
>> mm/util.c:551:48: warning: right shift count >= width of type [-Wshift-count-overflow]
      free += global_page_state(NR_METADATA_BYTES) >> PAGE_SIZE;
                                                   ^~

vim +551 mm/util.c

   535			 * case, they can't be purged, only swapped out, and
   536			 * that won't affect the overall amount of available
   537			 * memory in the system.
   538			 */
   539			free -= global_node_page_state(NR_SHMEM);
   540	
   541			free += get_nr_swap_pages();
   542	
   543			/*
   544			 * Any slabs which are created with the
   545			 * SLAB_RECLAIM_ACCOUNT flag claim to have contents
   546			 * which are reclaimable, under pressure.  The dentry
   547			 * cache and most inode caches should fall into this
   548			 */
   549			free += global_page_state(NR_SLAB_RECLAIMABLE);
   550	
 > 551			free += global_page_state(NR_METADATA_BYTES) >> PAGE_SIZE;
   552	
   553			/*
   554			 * Leave reserved pages. The pages are not for anonymous pages.
   555			 */
   556			if (free <= totalreserve_pages)
   557				goto error;
   558			else
   559				free -= totalreserve_pages;

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux