* [tty:tty-next 80/83] drivers/staging/gdm724x/gdm_tty.c:165:24: warning: comparison of distinct pointer types ('typeof (2048UL) *' (aka 'unsigned long *') and 'typeof (remain) *' (aka 'unsigned int *'))
@ 2023-08-15 11:59 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-08-15 11:59 UTC (permalink / raw)
To: Jiri Slaby (SUSE); +Cc: llvm, oe-kbuild-all, linux-serial, Greg Kroah-Hartman
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-next
head: e67d7f60d2382677c25de10b2e4d8d3717ace91f
commit: c3e5c706aefc3ceee941c1e7bd72084d3aeca37b [80/83] tty: gdm724x: convert counts to size_t
config: i386-buildonly-randconfig-r004-20230815 (https://download.01.org/0day-ci/archive/20230815/202308151953.rNNnAR2N-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce: (https://download.01.org/0day-ci/archive/20230815/202308151953.rNNnAR2N-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202308151953.rNNnAR2N-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/staging/gdm724x/gdm_tty.c:165:24: warning: comparison of distinct pointer types ('typeof (2048UL) *' (aka 'unsigned long *') and 'typeof (remain) *' (aka 'unsigned int *')) [-Wcompare-distinct-pointer-types]
size_t sending_len = min(MUX_TX_MAX_SIZE, remain);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:67:19: note: expanded from macro 'min'
#define min(x, y) __careful_cmp(x, y, <)
^~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:36:24: note: expanded from macro '__careful_cmp'
__builtin_choose_expr(__safe_cmp(x, y), \
^~~~~~~~~~~~~~~~
include/linux/minmax.h:26:4: note: expanded from macro '__safe_cmp'
(__typecheck(x, y) && __no_side_effects(x, y))
^~~~~~~~~~~~~~~~~
include/linux/minmax.h:20:28: note: expanded from macro '__typecheck'
(!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
1 warning generated.
vim +165 drivers/staging/gdm724x/gdm_tty.c
151
152 static ssize_t gdm_tty_write(struct tty_struct *tty, const u8 *buf, size_t len)
153 {
154 struct gdm *gdm = tty->driver_data;
155 size_t remain = len;
156 size_t sent_len = 0;
157
158 if (!gdm_tty_ready(gdm))
159 return -ENODEV;
160
161 if (!len)
162 return 0;
163
164 while (1) {
> 165 size_t sending_len = min(MUX_TX_MAX_SIZE, remain);
166 gdm->tty_dev->send_func(gdm->tty_dev->priv_dev,
167 (void *)(buf + sent_len),
168 sending_len,
169 gdm->index,
170 gdm_tty_send_complete,
171 gdm);
172 sent_len += sending_len;
173 remain -= sending_len;
174 if (remain <= 0)
175 break;
176 }
177
178 return len;
179 }
180
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-08-15 12:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-15 11:59 [tty:tty-next 80/83] drivers/staging/gdm724x/gdm_tty.c:165:24: warning: comparison of distinct pointer types ('typeof (2048UL) *' (aka 'unsigned long *') and 'typeof (remain) *' (aka 'unsigned int *')) kernel test robot
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).