Skip to content

Commit

Permalink
Documentation: Fix int/unsigned int comparison
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Jonathan Corbet <[email protected]>
  • Loading branch information
maheshkhanwalkar authored and Jonathan Corbet committed Feb 17, 2016
1 parent 45c73ea commit f0cd147
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Documentation/mic/mpssd/mpssd.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ static ssize_t
sum_iovec_len(struct mic_copy_desc *copy)
{
ssize_t sum = 0;
int i;
unsigned int i;

for (i = 0; i < copy->iovcnt; i++)
sum += copy->iov[i].iov_len;
Expand All @@ -372,7 +372,7 @@ static void
disp_iovec(struct mic_info *mic, struct mic_copy_desc *copy,
const char *s, int line)
{
int i;
unsigned int i;

for (i = 0; i < copy->iovcnt; i++)
mpsslog("%s %s %d copy->iov[%d] addr %p len 0x%zx\n",
Expand Down
2 changes: 1 addition & 1 deletion Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ static void rdtsctask(void)
}


int main(int argc, char **argv)
int main(void)
{
int n_tasks = 100, i;

Expand Down
2 changes: 1 addition & 1 deletion Documentation/prctl/disable-tsc-on-off-stress-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ static void task(void)
}


int main(int argc, char **argv)
int main(void)
{
int n_tasks = 100, i;

Expand Down
2 changes: 1 addition & 1 deletion Documentation/prctl/disable-tsc-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ static void sigsegv_cb(int sig)
printf("rdtsc() == ");
}

int main(int argc, char **argv)
int main(void)
{
int tsc_val = 0;

Expand Down
3 changes: 2 additions & 1 deletion Documentation/ptp/testptp.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ int main(int argc, char *argv[])


char *progname;
int i, c, cnt, fd;
unsigned int i;
int c, cnt, fd;

char *device = DEVICE;
clockid_t clkid;
Expand Down
2 changes: 1 addition & 1 deletion Documentation/timers/hpet_example.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ struct hpet_command {
int
main(int argc, const char ** argv)
{
int i;
unsigned int i;

argc--;
argv++;
Expand Down

0 comments on commit f0cd147

Please sign in to comment.