Hi Vaibhav,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on powerpc/next]
[also build test WARNING on v5.2-rc6 next-20190625]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:    
https://github.com/0day-ci/linux/commits/Vaibhav-Jain/powerpc-papr_scm-Workaround-for-failure-of-drc-bind-after-kexec/20190626-034335
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 7.4.0
reproduce:
        wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=powerpc 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <l...@intel.com>

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   arch/powerpc/platforms/pseries/papr_scm.c: In function 
'drc_pmem_unbind.isra.2':
>> arch/powerpc/platforms/pseries/papr_scm.c:90:6: warning: 'token' may be used 
>> uninitialized in this function [-Wmaybe-uninitialized]
      rc = plpar_hcall(H_SCM_UNBIND_ALL, ret, H_UNBIND_SCOPE_DRC,
      ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         p->drc_index, token);
         ~~~~~~~~~~~~~~~~~~~~

vim +/token +90 arch/powerpc/platforms/pseries/papr_scm.c

    77  
    78  static int drc_pmem_unbind(struct papr_scm_priv *p)
    79  {
    80          unsigned long ret[PLPAR_HCALL_BUFSIZE];
    81          uint64_t token;
    82          int64_t rc;
    83  
    84          dev_dbg(&p->pdev->dev, "unbind drc %x\n", p->drc_index);
    85  
    86          /* NB: unbind has the same retry requirements as 
drc_pmem_bind() */
    87          do {
    88  
    89                  /* Unbind of all SCM resources associated with drcIndex 
*/
  > 90                  rc = plpar_hcall(H_SCM_UNBIND_ALL, ret, 
H_UNBIND_SCOPE_DRC,
    91                                   p->drc_index, token);
    92                  token = ret[0];
    93  
    94                  /* Check if we are stalled for some time */
    95                  if (H_IS_LONG_BUSY(rc)) {
    96                          msleep(get_longbusy_msecs(rc));
    97                          rc = H_BUSY;
    98                  } else if (rc == H_BUSY) {
    99                          cond_resched();
   100                  }
   101  
   102          } while (rc == H_BUSY);
   103  
   104          if (rc)
   105                  dev_err(&p->pdev->dev, "unbind error: %lld\n", rc);
   106          else
   107                  dev_dbg(&p->pdev->dev, "unbind drc %x complete\n",
   108                          p->drc_index);
   109  
   110          return rc == H_SUCCESS ? 0 : -ENXIO;
   111  }
   112  

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

Attachment: .config.gz
Description: application/gzip

Reply via email to