* [PATCH 1/1] Documentation: Fix int/unsigned int comparison
@ 2016-02-14 0:05 Mahesh Khanwalkar
2016-02-17 21:10 ` Jonathan Corbet
0 siblings, 1 reply; 2+ messages in thread
From: Mahesh Khanwalkar @ 2016-02-14 0:05 UTC (permalink / raw)
To: Sudeep Dutt, Jonathan Corbet, Richard Cochran, Thomas Gleixner
Cc: linux-kernel, Mahesh Khanwalkar
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>
---
Documentation/mic/mpssd/mpssd.c | 4 ++--
Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c | 2 +-
Documentation/prctl/disable-tsc-on-off-stress-test.c | 2 +-
Documentation/prctl/disable-tsc-test.c | 2 +-
Documentation/ptp/testptp.c | 3 ++-
Documentation/timers/hpet_example.c | 2 +-
6 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/Documentation/mic/mpssd/mpssd.c b/Documentation/mic/mpssd/mpssd.c
index aaeafa1..7ce1e53 100644
--- a/Documentation/mic/mpssd/mpssd.c
+++ b/Documentation/mic/mpssd/mpssd.c
@@ -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;
@@ -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",
diff --git a/Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c b/Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c
index 81fdd42..f7499d1 100644
--- a/Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c
+++ b/Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c
@@ -74,7 +74,7 @@ static void rdtsctask(void)
}
-int main(int argc, char **argv)
+int main(void)
{
int n_tasks = 100, i;
diff --git a/Documentation/prctl/disable-tsc-on-off-stress-test.c b/Documentation/prctl/disable-tsc-on-off-stress-test.c
index 4d83a27..a06f027 100644
--- a/Documentation/prctl/disable-tsc-on-off-stress-test.c
+++ b/Documentation/prctl/disable-tsc-on-off-stress-test.c
@@ -78,7 +78,7 @@ static void task(void)
}
-int main(int argc, char **argv)
+int main(void)
{
int n_tasks = 100, i;
diff --git a/Documentation/prctl/disable-tsc-test.c b/Documentation/prctl/disable-tsc-test.c
index 2541e65..8d494f7 100644
--- a/Documentation/prctl/disable-tsc-test.c
+++ b/Documentation/prctl/disable-tsc-test.c
@@ -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;
diff --git a/Documentation/ptp/testptp.c b/Documentation/ptp/testptp.c
index 6c6247a..bee2f14 100644
--- a/Documentation/ptp/testptp.c
+++ b/Documentation/ptp/testptp.c
@@ -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;
diff --git a/Documentation/timers/hpet_example.c b/Documentation/timers/hpet_example.c
index 9a3e701..3ab4993 100644
--- a/Documentation/timers/hpet_example.c
+++ b/Documentation/timers/hpet_example.c
@@ -49,7 +49,7 @@ struct hpet_command {
int
main(int argc, const char ** argv)
{
- int i;
+ unsigned int i;
argc--;
argv++;
--
2.5.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] Documentation: Fix int/unsigned int comparison
2016-02-14 0:05 [PATCH 1/1] Documentation: Fix int/unsigned int comparison Mahesh Khanwalkar
@ 2016-02-17 21:10 ` Jonathan Corbet
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Corbet @ 2016-02-17 21:10 UTC (permalink / raw)
To: Mahesh Khanwalkar
Cc: Sudeep Dutt, Richard Cochran, Thomas Gleixner, linux-kernel
On Sat, 13 Feb 2016 19:05:31 -0500
Mahesh Khanwalkar <maheshkhanwalkar@gmail.com> wrote:
> 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
All this stuff probably belongs in samples/ someday. For now, though,
I've applied this to the docs tree, thanks.
jon
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-02-17 21:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-14 0:05 [PATCH 1/1] Documentation: Fix int/unsigned int comparison Mahesh Khanwalkar
2016-02-17 21:10 ` Jonathan Corbet
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).