linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: kbuild-all@01.org, Thierry Reding <thierry.reding@gmail.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/5] lib/math: remove int_pow()
Date: Sat, 21 Sep 2019 23:19:46 +0800	[thread overview]
Message-ID: <20190921151946.GG13091@xsang-OptiPlex-9020> (raw)
In-Reply-To: <20190919140620.32407-5-linux@rasmusvillemoes.dk>

[-- Attachment #1: Type: text/plain, Size: 5651 bytes --]

Hi Rasmus,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[cannot apply to v5.3 next-20190918]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Rasmus-Villemoes/backlight-pwm_bl-fix-cie1913-comments-and-constant/20190919-225123
config: x86_64-randconfig-s0-201937 (attached as .config)
compiler: gcc-5 (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 
:::::: branch date: 2 hours ago
:::::: commit date: 2 hours ago

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

All errors (new ones prefixed by >>):

   drivers/iio/common/hid-sensors/hid-sensor-attributes.c: In function 'simple_div':
>> drivers/iio/common/hid-sensors/hid-sensor-attributes.c:94:35: error: implicit declaration of function 'int_pow' [-Werror=implicit-function-declaration]
      *micro_frac = (rem / divisor) * int_pow(10, 6 - exp);
                                      ^
   Cyclomatic Complexity 3 include/linux/hid-sensor-hub.h:hid_sensor_convert_exponent
   Cyclomatic Complexity 1 drivers/iio/common/hid-sensors/hid-sensor-attributes.c:hid_sensor_convert_timestamp
   Cyclomatic Complexity 3 drivers/iio/common/hid-sensors/hid-sensor-attributes.c:hid_sensor_batch_mode_supported
   Cyclomatic Complexity 4 drivers/iio/common/hid-sensors/hid-sensor-attributes.c:hid_sensor_read_poll_value
   Cyclomatic Complexity 2 drivers/iio/common/hid-sensors/hid-sensor-attributes.c:hid_sensor_get_report_latency
   Cyclomatic Complexity 4 drivers/iio/common/hid-sensors/hid-sensor-attributes.c:simple_div
   Cyclomatic Complexity 5 drivers/iio/common/hid-sensors/hid-sensor-attributes.c:hid_sensor_read_samp_freq_value
   Cyclomatic Complexity 1 drivers/iio/common/hid-sensors/hid-sensor-attributes.c:split_micro_fraction
   Cyclomatic Complexity 4 drivers/iio/common/hid-sensors/hid-sensor-attributes.c:convert_from_vtf_format
   Cyclomatic Complexity 3 drivers/iio/common/hid-sensors/hid-sensor-attributes.c:hid_sensor_read_raw_hyst_value
   Cyclomatic Complexity 4 drivers/iio/common/hid-sensors/hid-sensor-attributes.c:convert_to_vtf_format
   Cyclomatic Complexity 7 drivers/iio/common/hid-sensors/hid-sensor-attributes.c:adjust_exponent_nano
   Cyclomatic Complexity 4 drivers/iio/common/hid-sensors/hid-sensor-attributes.c:hid_sensor_format_scale
   Cyclomatic Complexity 9 drivers/iio/common/hid-sensors/hid-sensor-attributes.c:hid_sensor_write_samp_freq_value
   Cyclomatic Complexity 6 drivers/iio/common/hid-sensors/hid-sensor-attributes.c:hid_sensor_write_raw_hyst_value
   Cyclomatic Complexity 1 drivers/iio/common/hid-sensors/hid-sensor-attributes.c:hid_sensor_set_report_latency
   Cyclomatic Complexity 2 drivers/iio/common/hid-sensors/hid-sensor-attributes.c:hid_sensor_get_reporting_interval
   Cyclomatic Complexity 2 drivers/iio/common/hid-sensors/hid-sensor-attributes.c:hid_sensor_get_report_latency_info
   Cyclomatic Complexity 6 drivers/iio/common/hid-sensors/hid-sensor-attributes.c:hid_sensor_parse_common_attributes
   cc1: some warnings being treated as errors

# https://github.com/0day-ci/linux/commit/d89cf2c7a3840d1691169c9e099c7def0dc16c46
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout d89cf2c7a3840d1691169c9e099c7def0dc16c46
vim +/int_pow +94 drivers/iio/common/hid-sensors/hid-sensor-attributes.c

5d02edfc395744 Srinivas Pandruvada 2014-04-19  75  
73c6768b710a16 srinivas pandruvada 2012-09-05  76  static void simple_div(int dividend, int divisor, int *whole,
73c6768b710a16 srinivas pandruvada 2012-09-05  77  				int *micro_frac)
73c6768b710a16 srinivas pandruvada 2012-09-05  78  {
73c6768b710a16 srinivas pandruvada 2012-09-05  79  	int rem;
73c6768b710a16 srinivas pandruvada 2012-09-05  80  	int exp = 0;
73c6768b710a16 srinivas pandruvada 2012-09-05  81  
73c6768b710a16 srinivas pandruvada 2012-09-05  82  	*micro_frac = 0;
73c6768b710a16 srinivas pandruvada 2012-09-05  83  	if (divisor == 0) {
73c6768b710a16 srinivas pandruvada 2012-09-05  84  		*whole = 0;
73c6768b710a16 srinivas pandruvada 2012-09-05  85  		return;
73c6768b710a16 srinivas pandruvada 2012-09-05  86  	}
73c6768b710a16 srinivas pandruvada 2012-09-05  87  	*whole = dividend/divisor;
73c6768b710a16 srinivas pandruvada 2012-09-05  88  	rem = dividend % divisor;
73c6768b710a16 srinivas pandruvada 2012-09-05  89  	if (rem) {
73c6768b710a16 srinivas pandruvada 2012-09-05  90  		while (rem <= divisor) {
73c6768b710a16 srinivas pandruvada 2012-09-05  91  			rem *= 10;
73c6768b710a16 srinivas pandruvada 2012-09-05  92  			exp++;
73c6768b710a16 srinivas pandruvada 2012-09-05  93  		}
473d12f7638c93 Andy Shevchenko     2019-06-19 @94  		*micro_frac = (rem / divisor) * int_pow(10, 6 - exp);
73c6768b710a16 srinivas pandruvada 2012-09-05  95  	}
73c6768b710a16 srinivas pandruvada 2012-09-05  96  }
73c6768b710a16 srinivas pandruvada 2012-09-05  97  

:::::: The code at line 94 was first introduced by commit
:::::: 473d12f7638c93acbd9296a8cd455b203d5eb528 iio: hid-sensor-attributes: Convert to use int_pow()

:::::: TO: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
:::::: CC: Jonathan Cameron <Jonathan.Cameron@huawei.com>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31905 bytes --]

  parent reply	other threads:[~2019-09-21 15:13 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-19 14:06 [PATCH 1/5] backlight: pwm_bl: fix cie1913 comments and constant Rasmus Villemoes
2019-09-19 14:06 ` [PATCH 2/5] backlight: pwm_bl: eliminate a 64/32 division Rasmus Villemoes
2019-10-07 15:13   ` Daniel Thompson
2019-09-19 14:06 ` [PATCH 3/5] backlight: pwm_bl: drop use of int_pow() Rasmus Villemoes
2019-10-07 15:28   ` Daniel Thompson
2019-10-07 18:43     ` Rasmus Villemoes
2019-10-08  9:31       ` Daniel Thompson
2019-10-08 10:02         ` Rasmus Villemoes
2019-10-08 10:43           ` Daniel Thompson
2019-09-19 14:06 ` [PATCH 4/5] backlight: pwm_bl: switch to power-of-2 base for fixed-point math Rasmus Villemoes
2019-10-07 15:32   ` Daniel Thompson
2019-09-19 14:06 ` [PATCH 5/5] lib/math: remove int_pow() Rasmus Villemoes
2019-09-19 14:36   ` Andy Shevchenko
2019-09-21 15:19   ` kbuild test robot [this message]
2019-09-21 15:22   ` kbuild test robot
2019-09-20 10:14 ` [PATCH 1/5] backlight: pwm_bl: fix cie1913 comments and constant Daniel Thompson
2019-09-20 10:36   ` Rasmus Villemoes
2019-10-07 15:08 ` Daniel Thompson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190921151946.GG13091@xsang-OptiPlex-9020 \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=corbet@lwn.net \
    --cc=kbuild-all@01.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).