New issue
Advanced search Search tips

Issue 790769 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Build warning in cros_usbpd-charger.c driver

Project Member Reported by groeck@chromium.org, Nov 30 2017

Issue description

Reported by 0day:

  In file included from ./arch/blackfin/include/generated/asm/div64.h:1:0, 
                    from include/linux/kernel.h:173, 
                    from include/linux/list.h:9, 
                    from include/linux/wait.h:7, 
                    from include/linux/wait_bit.h:8, 
                    from include/linux/fs.h:6, 
                    from drivers/power/supply/cros_usbpd-charger.c:21: 
   drivers/power/supply/cros_usbpd-charger.c: In function 'cros_usb_pd_print_log_entry': 
   include/asm-generic/div64.h:208:28: warning: comparison of distinct pointer types lacks a cast 
     (void)(((typeof((n)) *)0) == ((uint64_t *)0)); \ 
                               ^ 
>> drivers/power/supply/cros_usbpd-charger.c:578:2: note: in expansion of macro 'do_div' 
     do_div(msecs, MSEC_PER_SEC); 
     ^~~~~~ 

 

Comment 1 by groeck@chromium.org, Nov 30 2017

Status: Started (was: Assigned)
Project Member

Comment 2 by bugdroid1@chromium.org, Dec 1 2017

Labels: merge-merged-chromeos-4.14
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/92a578928f40c8a73ef8dcf51d7e96ed6df863bd

commit 92a578928f40c8a73ef8dcf51d7e96ed6df863bd
Author: Guenter Roeck <groeck@chromium.org>
Date: Fri Dec 01 06:40:02 2017

CHROMIUM: cros_usbpd-charger: Argument of do_div should be u64

0day reports:

drivers/power/supply/cros_usbpd-charger.c: In function
'cros_usb_pd_print_log_entry':
   include/asm-generic/div64.h:208:28: warning:
   		comparison of distinct pointer types lacks a cast
   (void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
	            ^
>> drivers/power/supply/cros_usbpd-charger.c:578:2:
>> note: in expansion of macro 'do_div' do_div(msecs, MSEC_PER_SEC);
					^~~~~~

BUG= chromium:790769 
TEST=Build without warning

Change-Id: Iec770ead2de6c492e0429c5d3b525b918cf49a03
Signed-off-by: Guenter Roeck <groeck@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/802245
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>

[modify] https://crrev.com/92a578928f40c8a73ef8dcf51d7e96ed6df863bd/drivers/power/supply/cros_usbpd-charger.c

Status: Fixed (was: Started)

Sign in to add a comment