linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Abanoub Sameh <abanoubsameh8@gmail.com>, pavel@ucw.cz
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org,
	Abanoub Sameh <abanoubsameh@protonmail.com>
Subject: Re: [PATCH] leds: led-core: Get rid of enum led_brightness
Date: Fri, 11 Dec 2020 04:03:10 +0800	[thread overview]
Message-ID: <202012110333.MBQK9o7s-lkp@intel.com> (raw)
In-Reply-To: <20201210134947.116507-1-abanoubsameh@protonmail.com>

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

Hi Abanoub,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on pavel-linux-leds/for-next]
[also build test WARNING on linux/master linus/master j.anaszewski-leds/for-next v5.10-rc7 next-20201210]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Abanoub-Sameh/leds-led-core-Get-rid-of-enum-led_brightness/20201210-215536
base:   git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds.git for-next
config: x86_64-randconfig-a004-20201209 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 1968804ac726e7674d5de22bc2204b45857da344)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/172073778888c1b26342cb54099eb1f54a482c1b
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Abanoub-Sameh/leds-led-core-Get-rid-of-enum-led_brightness/20201210-215536
        git checkout 172073778888c1b26342cb54099eb1f54a482c1b
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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

All warnings (new ones prefixed by >>):

>> drivers/leds/led-core.c:282:25: warning: comparison of distinct pointer types ('typeof (value) *' (aka 'int *') and 'typeof (led_cdev->max_brightness) *' (aka 'enum led_brightness *')) [-Wcompare-distinct-pointer-types]
           led_cdev->brightness = min(value, led_cdev->max_brightness);
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/minmax.h:51:19: note: expanded from macro 'min'
   #define min(x, y)       __careful_cmp(x, y, <)
                           ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/minmax.h:42:24: note: expanded from macro '__careful_cmp'
           __builtin_choose_expr(__safe_cmp(x, y), \
                                 ^~~~~~~~~~~~~~~~
   include/linux/minmax.h:32:4: note: expanded from macro '__safe_cmp'
                   (__typecheck(x, y) && __no_side_effects(x, y))
                    ^~~~~~~~~~~~~~~~~
   include/linux/minmax.h:18:28: note: expanded from macro '__typecheck'
           (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
                      ~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~
   drivers/leds/led-core.c:296:25: warning: comparison of distinct pointer types ('typeof (value) *' (aka 'int *') and 'typeof (led_cdev->max_brightness) *' (aka 'enum led_brightness *')) [-Wcompare-distinct-pointer-types]
           led_cdev->brightness = min(value, led_cdev->max_brightness);
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/minmax.h:51:19: note: expanded from macro 'min'
   #define min(x, y)       __careful_cmp(x, y, <)
                           ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/minmax.h:42:24: note: expanded from macro '__careful_cmp'
           __builtin_choose_expr(__safe_cmp(x, y), \
                                 ^~~~~~~~~~~~~~~~
   include/linux/minmax.h:32:4: note: expanded from macro '__safe_cmp'
                   (__typecheck(x, y) && __no_side_effects(x, y))
                    ^~~~~~~~~~~~~~~~~
   include/linux/minmax.h:18:28: note: expanded from macro '__typecheck'
           (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
                      ~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~
   2 warnings generated.

vim +282 drivers/leds/led-core.c

81fe8e5b73e3f4 Jacek Anaszewski 2015-10-07  279  
172073778888c1 Abanoub Sameh    2020-12-10  280  void led_set_brightness_nosleep(struct led_classdev *led_cdev, int value)
81fe8e5b73e3f4 Jacek Anaszewski 2015-10-07  281  {
81fe8e5b73e3f4 Jacek Anaszewski 2015-10-07 @282  	led_cdev->brightness = min(value, led_cdev->max_brightness);
81fe8e5b73e3f4 Jacek Anaszewski 2015-10-07  283  
81fe8e5b73e3f4 Jacek Anaszewski 2015-10-07  284  	if (led_cdev->flags & LED_SUSPENDED)
81fe8e5b73e3f4 Jacek Anaszewski 2015-10-07  285  		return;
81fe8e5b73e3f4 Jacek Anaszewski 2015-10-07  286  
81fe8e5b73e3f4 Jacek Anaszewski 2015-10-07  287  	led_set_brightness_nopm(led_cdev, led_cdev->brightness);
81fe8e5b73e3f4 Jacek Anaszewski 2015-10-07  288  }
81fe8e5b73e3f4 Jacek Anaszewski 2015-10-07  289  EXPORT_SYMBOL_GPL(led_set_brightness_nosleep);
81fe8e5b73e3f4 Jacek Anaszewski 2015-10-07  290  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

  reply	other threads:[~2020-12-10 20:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-10 13:49 [PATCH] leds: led-core: Get rid of enum led_brightness Abanoub Sameh
2020-12-10 20:03 ` kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-12-11  1:48 Abanoub Sameh
2020-12-11 12:56 ` Marek Behun
2020-12-11 14:08   ` David Laight
2020-12-11 18:31     ` Marek Behun
2020-12-17 22:59     ` Pavel Machek
2020-12-11 20:42 Abanoub Sameh
2021-02-19 10:36 ` Pavel Machek

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=202012110333.MBQK9o7s-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=abanoubsameh8@gmail.com \
    --cc=abanoubsameh@protonmail.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    /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).