From: Dan Carpenter <dan.carpenter@oracle.com> To: Jonathan Cameron <jic23@kernel.org>, Martin Kelly <mkelly@xevo.com> Cc: Hartmut Knaack <knaack.h@gmx.de>, Lars-Peter Clausen <lars@metafoo.de>, Peter Meerwald-Stadler <pmeerw@pmeerw.net>, linux-iio@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] tools: iio: iio_generic_buffer: allow infinite looping Date: Thu, 07 Jun 2018 08:31:10 +0000 [thread overview] Message-ID: <20180607083110.gjfmdfuzw2my6sl5@kili.mountain> (raw) I think the num_loops variable was intended to be signed so that we could set it to -1 and it would loop forever. Right now it just loops for a very long time. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> diff --git a/tools/iio/iio_generic_buffer.c b/tools/iio/iio_generic_buffer.c index 3040830d7797..84545666a09c 100644 --- a/tools/iio/iio_generic_buffer.c +++ b/tools/iio/iio_generic_buffer.c @@ -330,7 +330,7 @@ static const struct option longopts[] = { int main(int argc, char **argv) { - unsigned long long num_loops = 2; + long long num_loops = 2; unsigned long timedelay = 1000000; unsigned long buf_len = 128;
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com> To: Jonathan Cameron <jic23@kernel.org>, Martin Kelly <mkelly@xevo.com> Cc: Hartmut Knaack <knaack.h@gmx.de>, Lars-Peter Clausen <lars@metafoo.de>, Peter Meerwald-Stadler <pmeerw@pmeerw.net>, linux-iio@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] tools: iio: iio_generic_buffer: allow infinite looping Date: Thu, 7 Jun 2018 11:31:10 +0300 [thread overview] Message-ID: <20180607083110.gjfmdfuzw2my6sl5@kili.mountain> (raw) I think the num_loops variable was intended to be signed so that we could set it to -1 and it would loop forever. Right now it just loops for a very long time. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> diff --git a/tools/iio/iio_generic_buffer.c b/tools/iio/iio_generic_buffer.c index 3040830d7797..84545666a09c 100644 --- a/tools/iio/iio_generic_buffer.c +++ b/tools/iio/iio_generic_buffer.c @@ -330,7 +330,7 @@ static const struct option longopts[] = { int main(int argc, char **argv) { - unsigned long long num_loops = 2; + long long num_loops = 2; unsigned long timedelay = 1000000; unsigned long buf_len = 128;
next reply other threads:[~2018-06-07 8:31 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-06-07 8:31 Dan Carpenter [this message] 2018-06-07 8:31 ` [PATCH] tools: iio: iio_generic_buffer: allow infinite looping Dan Carpenter 2018-06-07 16:31 ` Martin Kelly 2018-06-07 16:31 ` Martin Kelly 2018-06-10 13:44 ` Jonathan Cameron 2018-06-10 13:44 ` Jonathan Cameron
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20180607083110.gjfmdfuzw2my6sl5@kili.mountain \ --to=dan.carpenter@oracle.com \ --cc=jic23@kernel.org \ --cc=kernel-janitors@vger.kernel.org \ --cc=knaack.h@gmx.de \ --cc=lars@metafoo.de \ --cc=linux-iio@vger.kernel.org \ --cc=mkelly@xevo.com \ --cc=pmeerw@pmeerw.net \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.