Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Documentation: Fix int/unsigned int comparison

Signed int - unsigned int comparison fixed in mpssd, prctl, ptp, and
timers in Documentation. In places where 'int argc' and 'const char
**argv' are not used, they are replaced with void

Documentation/mic/mpssd/mpssd.c: Fixed comparison in sum_iovec_len and
disp_iovec

Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c: main signature
changed to void, as parameters 'argc' and 'argv' are never used

Documentation/prctl/disable-tsc-on-off-stress-test.c: main signature
changed to void

Documentation/prctl/disable-tsc-test.c: main signature changed to void

Documentation/ptp/testptp.c: Sign comparison fix
Documentation/timers/hpet_example.c: Sign comparision fix

Signed-off-by: Mahesh Khanwalkar <maheshkhanwalkar@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>

authored by

Mahesh Khanwalkar and committed by
Jonathan Corbet
f0cd147e 45c73ea7

+8 -7
+2 -2
Documentation/mic/mpssd/mpssd.c
··· 349 349 sum_iovec_len(struct mic_copy_desc *copy) 350 350 { 351 351 ssize_t sum = 0; 352 - int i; 352 + unsigned int i; 353 353 354 354 for (i = 0; i < copy->iovcnt; i++) 355 355 sum += copy->iov[i].iov_len; ··· 372 372 disp_iovec(struct mic_info *mic, struct mic_copy_desc *copy, 373 373 const char *s, int line) 374 374 { 375 - int i; 375 + unsigned int i; 376 376 377 377 for (i = 0; i < copy->iovcnt; i++) 378 378 mpsslog("%s %s %d copy->iov[%d] addr %p len 0x%zx\n",
+1 -1
Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c
··· 74 74 } 75 75 76 76 77 - int main(int argc, char **argv) 77 + int main(void) 78 78 { 79 79 int n_tasks = 100, i; 80 80
+1 -1
Documentation/prctl/disable-tsc-on-off-stress-test.c
··· 78 78 } 79 79 80 80 81 - int main(int argc, char **argv) 81 + int main(void) 82 82 { 83 83 int n_tasks = 100, i; 84 84
+1 -1
Documentation/prctl/disable-tsc-test.c
··· 57 57 printf("rdtsc() == "); 58 58 } 59 59 60 - int main(int argc, char **argv) 60 + int main(void) 61 61 { 62 62 int tsc_val = 0; 63 63
+2 -1
Documentation/ptp/testptp.c
··· 160 160 161 161 162 162 char *progname; 163 - int i, c, cnt, fd; 163 + unsigned int i; 164 + int c, cnt, fd; 164 165 165 166 char *device = DEVICE; 166 167 clockid_t clkid;
+1 -1
Documentation/timers/hpet_example.c
··· 49 49 int 50 50 main(int argc, const char ** argv) 51 51 { 52 - int i; 52 + unsigned int i; 53 53 54 54 argc--; 55 55 argv++;