ANDROID: usb: gadget: audio_source: fix comparison of distinct pointer types
authorAmit Pundir <amit.pundir@linaro.org>
Thu, 15 Sep 2016 10:35:40 +0000 (16:05 +0530)
committerDmitry Shmidt <dimitrysh@google.com>
Mon, 7 Nov 2016 21:54:51 +0000 (13:54 -0800)
commit96009ab737c4e6da44a0fff72d33534583454d03
tree4bc1279175b0f5b71d338a9af0632387b80ad314
parente124de382771254e09bb2bbd2ac753cdae71a36d
ANDROID: usb: gadget: audio_source: fix comparison of distinct pointer types

Use div_s64() instead of do_div() to fix following "comparison of
distinct pointer types lacks a cast" warning in do_div() call in
audio_send() for ARCH=arm in Linux 4.8-rc6:

  CC      drivers/usb/gadget/function/f_audio_source.o
In file included from ./arch/arm/include/asm/div64.h:126:0,
                 from ./include/linux/kernel.h:142,
                 from ./include/linux/list.h:8,
                 from ./include/linux/kobject.h:20,
                 from ./include/linux/device.h:17,
                 from drivers/usb/gadget/function/f_audio_source.c:17:
drivers/usb/gadget/function/f_audio_source.c: In function ‘audio_send’:
./include/asm-generic/div64.h:207:28: warning: comparison of distinct pointer types lacks a cast
  (void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
                            ^
drivers/usb/gadget/function/f_audio_source.c:381:2: note: in expansion of macro ‘do_div’
  do_div(msecs, 1000000);
  ^
./include/asm-generic/div64.h:207:28: warning: comparison of distinct pointer types lacks a cast
  (void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
                            ^
drivers/usb/gadget/function/f_audio_source.c:383:2: note: in expansion of macro ‘do_div’
  do_div(frames, 1000);
  ^
  LD      drivers/usb/gadget/function/usb_f_audio_source.o

Change-Id: Ie1a920c8948f3fc3f1263add25a402ded132fd66
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
drivers/usb/gadget/function/f_audio_source.c