1
0
Fork 0

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>
hifive-unleashed-5.1
Mahesh Khanwalkar 2016-02-13 19:05:31 -05:00 committed by Jonathan Corbet
parent 45c73ea7a7
commit f0cd147e61
6 changed files with 8 additions and 7 deletions

View File

@ -349,7 +349,7 @@ static ssize_t
sum_iovec_len(struct mic_copy_desc *copy) sum_iovec_len(struct mic_copy_desc *copy)
{ {
ssize_t sum = 0; ssize_t sum = 0;
int i; unsigned int i;
for (i = 0; i < copy->iovcnt; i++) for (i = 0; i < copy->iovcnt; i++)
sum += copy->iov[i].iov_len; sum += copy->iov[i].iov_len;
@ -372,7 +372,7 @@ static void
disp_iovec(struct mic_info *mic, struct mic_copy_desc *copy, disp_iovec(struct mic_info *mic, struct mic_copy_desc *copy,
const char *s, int line) const char *s, int line)
{ {
int i; unsigned int i;
for (i = 0; i < copy->iovcnt; i++) for (i = 0; i < copy->iovcnt; i++)
mpsslog("%s %s %d copy->iov[%d] addr %p len 0x%zx\n", mpsslog("%s %s %d copy->iov[%d] addr %p len 0x%zx\n",

View File

@ -74,7 +74,7 @@ static void rdtsctask(void)
} }
int main(int argc, char **argv) int main(void)
{ {
int n_tasks = 100, i; int n_tasks = 100, i;

View File

@ -78,7 +78,7 @@ static void task(void)
} }
int main(int argc, char **argv) int main(void)
{ {
int n_tasks = 100, i; int n_tasks = 100, i;

View File

@ -57,7 +57,7 @@ static void sigsegv_cb(int sig)
printf("rdtsc() == "); printf("rdtsc() == ");
} }
int main(int argc, char **argv) int main(void)
{ {
int tsc_val = 0; int tsc_val = 0;

View File

@ -160,7 +160,8 @@ int main(int argc, char *argv[])
char *progname; char *progname;
int i, c, cnt, fd; unsigned int i;
int c, cnt, fd;
char *device = DEVICE; char *device = DEVICE;
clockid_t clkid; clockid_t clkid;

View File

@ -49,7 +49,7 @@ struct hpet_command {
int int
main(int argc, const char ** argv) main(int argc, const char ** argv)
{ {
int i; unsigned int i;
argc--; argc--;
argv++; argv++;