lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <201907270417.JOqeHZuN%lkp@intel.com>
Date:   Sat, 27 Jul 2019 04:31:17 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Richard Tresidder <rtresidd@...ctromag.com.au>
Cc:     kbuild-all@...org, sre@...nel.org, enric.balletbo@...labora.com,
        ncrews@...omium.org, andrew.smirnov@...il.com, groeck@...omium.org,
        rtresidd@...ctromag.com.au, david@...hnology.com,
        tglx@...utronix.de, kstewart@...uxfoundation.org,
        gregkh@...uxfoundation.org, rfontana@...hat.com,
        allison@...utok.net, baolin.wang@...aro.org,
        linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RESEND v2 1/1] power/supply/sbs-battery: Fix confusing battery
 status when idle or empty

Hi Richard,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.3-rc1 next-20190726]
[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/Richard-Tresidder/power-supply-sbs-battery-Fix-confusing-battery-status-when-idle-or-empty/20190727-031454
config: arm-allmodconfig (attached as .config)
compiler: arm-linux-gnueabi-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=arm 

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

All error/warnings (new ones prefixed by >>):

   drivers/power//supply/sbs-battery.c: In function 'sbs_status_correct':
>> drivers/power//supply/sbs-battery.c:296:65: error: expected ')' before '{' token
     if ((*intval == POWER_SUPPLY_STATUS_DISCHARGING && (ret == 0)) {
                                                                    ^
>> drivers/power//supply/sbs-battery.c:305:1: error: expected expression before '}' token
    }
    ^
>> drivers/power//supply/sbs-battery.c:305:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^

vim +296 drivers/power//supply/sbs-battery.c

   285	
   286	static int sbs_status_correct(struct i2c_client *client, int *intval)
   287	{
   288		int ret;
   289	
   290		ret = sbs_read_word_data(client, sbs_data[REG_CURRENT].addr);
   291		if (ret < 0)
   292			return ret;
   293	
   294		ret = (s16)ret;
   295	
 > 296		if ((*intval == POWER_SUPPLY_STATUS_DISCHARGING && (ret == 0)) {
   297			/* Charging indicator not set in battery */
   298			*intval = POWER_SUPPLY_STATUS_IDLE;
   299		} else if ((*intval == POWER_SUPPLY_STATUS_FULL) && (ret < 0)) {
   300			/* Full Flag set but we are discharging */
   301			*intval = POWER_SUPPLY_STATUS_DISCHARGING;
   302		}
   303	
   304		return 0;
 > 305	}
   306	

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

Download attachment ".config.gz" of type "application/gzip" (71381 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ