From patchwork Thu Jun 7 08:31:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 10451447 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1C2BA60233 for ; Thu, 7 Jun 2018 08:31:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B0AD29BBD for ; Thu, 7 Jun 2018 08:31:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F180D29C55; Thu, 7 Jun 2018 08:31:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9030029BBD for ; Thu, 7 Jun 2018 08:31:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753325AbeFGIby (ORCPT ); Thu, 7 Jun 2018 04:31:54 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:40010 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752568AbeFGIbx (ORCPT ); Thu, 7 Jun 2018 04:31:53 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w578UxwB121962; Thu, 7 Jun 2018 08:31:24 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : mime-version : content-type; s=corp-2017-10-26; bh=RoenWZZZ0FF7bLi6OTF7VHspPsTf3oxsjCfJAMpJtDg=; b=osr3M4jB78zg3uqgs7UvmhCnxj77sj5DY9H/c5JkTDi7gY697fhYYLzrseS4wTGdFC47 ba1ErcKYIF8YX3U+2Pn2FuRGJhUue3ZuVpwt8Pt/VYerZOaYTj8amS/WxXRawZB22VPh 9m2/NvTzhJru99l44h/iflZSXLFknQJnSVJtuNMXzqVNiFxM+rXZJ9cHcIpptMmPCjpf S9z5VgFexWsa3y0Qkz7RRSBKR1fh5N0lYI5f+Y1xYUb+NWG0zwtSMcKimCbK8pU6tXG7 492cRDK4rlkRIKXPEByF8I21fBY4uqNzFe15oLcCItMmspXCIyFvGICE0aYUJJMfIvxi DQ== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2120.oracle.com with ESMTP id 2jbvypqw13-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 07 Jun 2018 08:31:24 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w578VNLw028023 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 7 Jun 2018 08:31:23 GMT Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w578VMR7020562; Thu, 7 Jun 2018 08:31:22 GMT Received: from kili.mountain (/41.202.241.42) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 07 Jun 2018 01:31:22 -0700 Date: Thu, 7 Jun 2018 11:31:10 +0300 From: Dan Carpenter To: Jonathan Cameron , Martin Kelly Cc: Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , linux-iio@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] tools: iio: iio_generic_buffer: allow infinite looping Message-ID: <20180607083110.gjfmdfuzw2my6sl5@kili.mountain> MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding User-Agent: NeoMutt/20170113 (1.7.2) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8916 signatures=668702 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=690 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1806070104 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Martin Kelly --- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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;