Oh.  Crap.  The new min()/max() macros confuse Smatch and they all
generate warnings now.  I'll figure out a workaround later today.

regards,
dan carpenter


On Sat, Apr 07, 2018 at 09:23:30AM +0800, kbuild test robot wrote:
> CC: kbuild-...@01.org
> CC: linux-ker...@vger.kernel.org
> TO: Kees Cook <keesc...@chromium.org>
> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
> master
> head:   38c23685b273cfb4ccf31a199feccce3bdcb5d83
> commit: 3c8ba0d61d04ced9f8d9ff93977995a9e4e96e91 kernel.h: Retain constant 
> expression output for max()/min()
> date:   28 hours ago
> :::::: branch date: 21 hours ago
> :::::: commit date: 28 hours ago
> 
> 
> # 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3c8ba0d61d04ced9f8d9ff93977995a9e4e96e91
> git remote add linus 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> git remote update linus
> git checkout 3c8ba0d61d04ced9f8d9ff93977995a9e4e96e91
> vim +245 fs/pstore/platform.c
> 
> adb42f5e Aruna Balakrishnaiah 2013-08-16  216  
> 8cfc8ddc Geliang Tang         2016-02-18  217  static void allocate_zlib(void)
> b0aad7a9 Aruna Balakrishnaiah 2013-08-16  218  {
> b0aad7a9 Aruna Balakrishnaiah 2013-08-16  219         size_t size;
> 7de8fe2f Aruna Balakrishnaiah 2013-09-11  220         size_t cmpr;
> 7de8fe2f Aruna Balakrishnaiah 2013-09-11  221  
> 7de8fe2f Aruna Balakrishnaiah 2013-09-11  222         switch 
> (psinfo->bufsize) {
> 7de8fe2f Aruna Balakrishnaiah 2013-09-11  223         /* buffer range for 
> efivars */
> 7de8fe2f Aruna Balakrishnaiah 2013-09-11  224         case 1000 ... 2000:
> 7de8fe2f Aruna Balakrishnaiah 2013-09-11  225                 cmpr = 56;
> 7de8fe2f Aruna Balakrishnaiah 2013-09-11  226                 break;
> 7de8fe2f Aruna Balakrishnaiah 2013-09-11  227         case 2001 ... 3000:
> 7de8fe2f Aruna Balakrishnaiah 2013-09-11  228                 cmpr = 54;
> 7de8fe2f Aruna Balakrishnaiah 2013-09-11  229                 break;
> 7de8fe2f Aruna Balakrishnaiah 2013-09-11  230         case 3001 ... 3999:
> 7de8fe2f Aruna Balakrishnaiah 2013-09-11  231                 cmpr = 52;
> 7de8fe2f Aruna Balakrishnaiah 2013-09-11  232                 break;
> 7de8fe2f Aruna Balakrishnaiah 2013-09-11  233         /* buffer range for 
> nvram, erst */
> 7de8fe2f Aruna Balakrishnaiah 2013-09-11  234         case 4000 ... 10000:
> 7de8fe2f Aruna Balakrishnaiah 2013-09-11  235                 cmpr = 45;
> 7de8fe2f Aruna Balakrishnaiah 2013-09-11  236                 break;
> 7de8fe2f Aruna Balakrishnaiah 2013-09-11  237         default:
> 7de8fe2f Aruna Balakrishnaiah 2013-09-11  238                 cmpr = 60;
> 7de8fe2f Aruna Balakrishnaiah 2013-09-11  239                 break;
> 7de8fe2f Aruna Balakrishnaiah 2013-09-11  240         }
> b0aad7a9 Aruna Balakrishnaiah 2013-08-16  241  
> 7de8fe2f Aruna Balakrishnaiah 2013-09-11  242         big_oops_buf_sz = 
> (psinfo->bufsize * 100) / cmpr;
> b0aad7a9 Aruna Balakrishnaiah 2013-08-16  243         big_oops_buf = 
> kmalloc(big_oops_buf_sz, GFP_KERNEL);
> b0aad7a9 Aruna Balakrishnaiah 2013-08-16  244         if (big_oops_buf) {
> b0aad7a9 Aruna Balakrishnaiah 2013-08-16 @245                 size = 
> max(zlib_deflate_workspacesize(WINDOW_BITS, MEM_LEVEL),
> b0aad7a9 Aruna Balakrishnaiah 2013-08-16  246                         
> zlib_inflate_workspacesize());
> b0aad7a9 Aruna Balakrishnaiah 2013-08-16  247                 
> stream.workspace = kmalloc(size, GFP_KERNEL);
> b0aad7a9 Aruna Balakrishnaiah 2013-08-16  248                 if 
> (!stream.workspace) {
> ef748853 Fabian Frederick     2014-06-06  249                         
> pr_err("No memory for compression workspace; skipping compression\n");
> b0aad7a9 Aruna Balakrishnaiah 2013-08-16  250                         
> kfree(big_oops_buf);
> b0aad7a9 Aruna Balakrishnaiah 2013-08-16  251                         
> big_oops_buf = NULL;
> b0aad7a9 Aruna Balakrishnaiah 2013-08-16  252                 }
> b0aad7a9 Aruna Balakrishnaiah 2013-08-16  253         } else {
> ef748853 Fabian Frederick     2014-06-06  254                 pr_err("No 
> memory for uncompressed data; skipping compression\n");
> b0aad7a9 Aruna Balakrishnaiah 2013-08-16  255                 
> stream.workspace = NULL;
> b0aad7a9 Aruna Balakrishnaiah 2013-08-16  256         }
> b0aad7a9 Aruna Balakrishnaiah 2013-08-16  257  
> 
> :::::: The code at line 245 was first introduced by commit
> :::::: b0aad7a99c1df90c23ff4bac76eea9cf25049e9e pstore: Add compression 
> support to pstore
> 
> :::::: TO: Aruna Balakrishnaiah <ar...@linux.vnet.ibm.com>
> :::::: CC: Tony Luck <tony.l...@intel.com>
> 
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
_______________________________________________
kbuild mailing list
kbuild@lists.01.org
https://lists.01.org/mailman/listinfo/kbuild

Reply via email to