Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1583150ybh; Tue, 14 Jul 2020 01:31:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyca2/qvZenGb/FdMGYmcW+akhtNjqRWh7uuWTrjArPmHQKMahCudKkUjeNG3X99b33N5wZ X-Received: by 2002:a05:6402:1a54:: with SMTP id bf20mr3373434edb.69.1594715465604; Tue, 14 Jul 2020 01:31:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594715465; cv=none; d=google.com; s=arc-20160816; b=uH3hXLlaa/0BOpYpEJ+UzwFbtUFwPcOlyOQxW1jxfs5lfCTssFVgxChJNQT4MGqm57 swYTkDA6ZMD7GTLmKDA0St0OjuC0O8OJUYSD6aesznMECBv9wX2AnMAU9yd8zsl0Kkw1 QWOEGfNq5Ta1rTM4lM0IxuBfLVeb0WuBBFOuKFNofOscGk5dgv/NW95QOKibimOCLWF3 r2usDghN5RIx8Kht2TcgFuvu6U5LacBS+Cg6+jE6TZsTUHeVJlOZigspWaCIfnj5DdJk YB15WCGl+rm5ohjCRoUAYY3msd7VErk2IJ/FsNG8oamXfg+dgZwjrqCiTB7U2ZiYLqc1 mxxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=bmrC3uO0hL9mY59/ViKJ+rhM/g+cSn+ihe2iBW1t2lA=; b=t8giJyxjTXs1KGHFvQI8cwJxtNNXVHghQhZRURb52lQZ81MoZv5ykmIbErXWaQTmDh SGn38aVNuKk48D7vd1DgFm5CeZoBljF/40p7B+3FMMpGntHOxh/UfDctsZkV4DU9PHeJ tcI0ljp8SynrA7oaMQpG9kvdsH8U3s0xM6PfTVJ8akvC7Ds7uS+koooc/o0qlpUMmbtQ Soos8k7fIYE7SD0l36iZJ6yCXjcEJnB5QR7OSTCweUB0ZZ/pTEkDYmqlUZYq22o74S4w 0nOnJ3iJbll6QhicfkPAZ9NvyhkmhKkLnoEr4YOqqFSLO7V5ONjF9mKjPAQEODGh2zvT XW1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=nP9sv9HQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bh6si10320729ejb.325.2020.07.14.01.30.42; Tue, 14 Jul 2020 01:31:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=nP9sv9HQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726375AbgGNIad (ORCPT + 99 others); Tue, 14 Jul 2020 04:30:33 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:60520 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725801AbgGNIac (ORCPT ); Tue, 14 Jul 2020 04:30:32 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 06E8S3W8158519; Tue, 14 Jul 2020 08:30:24 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2020-01-29; bh=bmrC3uO0hL9mY59/ViKJ+rhM/g+cSn+ihe2iBW1t2lA=; b=nP9sv9HQLvr50sCLZVHB8NUFvJJPfh8ZULE2AUPbZhuSmQdwVh+AgYKI4alEJOfKBf9o 37mU7E5wIGriv4Ye0p7eL8PIFtuXTjzsqZfLgwoitfx84Zgtqx5Lu8WfTPIJpTHs+cmg EoyhyJu0OhAGfjwW/PZN+XyJ++lgVv6+YWKrWeQuQM7aAQ50Br9hQPm7G/EZRZ2QGLiJ P2GoTv6a7i1cPSIszxN59j716BMLTx1/g2nYmxBJfWZvdP/7tw5ShlcYO3vY+ub3zYQa 0cFrj0td3c9hGD8jf8WN3CkSfCK4gTkONWPvR02NY2iGoHxllUPsrw9X893nm7Qrh2Mk cA== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2130.oracle.com with ESMTP id 3274ur3yj9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 14 Jul 2020 08:30:24 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 06E8Hmsw084482; Tue, 14 Jul 2020 08:28:23 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3020.oracle.com with ESMTP id 327qb3a5qk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 14 Jul 2020 08:28:23 +0000 Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 06E8SNPG009448; Tue, 14 Jul 2020 08:28:23 GMT Received: from kadam (/41.57.98.10) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 14 Jul 2020 01:28:22 -0700 Date: Tue, 14 Jul 2020 11:28:16 +0300 From: Dan Carpenter To: Suraj Upadhyay Cc: manishc@marvell.com, GR-Linux-NIC-Dev@marvell.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH 4/6] staging: qlge: qlge_main: Simplify while statements. Message-ID: <20200714082816.GA2571@kadam> References: <1bb472c5595d832221fd142dddb68907feeeecbe.1594642213.git.usuraj35@gmail.com> <20200713141235.GT2549@kadam> <20200714064022.GA12651@blackclown> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200714064022.GA12651@blackclown> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9681 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 malwarescore=0 mlxscore=0 spamscore=0 phishscore=0 suspectscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007140063 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9681 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 lowpriorityscore=0 impostorscore=0 suspectscore=0 phishscore=0 spamscore=0 mlxlogscore=999 malwarescore=0 mlxscore=0 priorityscore=1501 adultscore=0 bulkscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007140064 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 14, 2020 at 12:10:22PM +0530, Suraj Upadhyay wrote: > On Mon, Jul 13, 2020 at 05:12:35PM +0300, Dan Carpenter wrote: > > On Mon, Jul 13, 2020 at 05:50:14PM +0530, Suraj Upadhyay wrote: > > > Simplify while loops into more readable and simple for loops. > > > > > > > I don't think either is more clear that the other. Walter Harms hates > > count down loops and he's not entirely wrong... > > > > regards, > > dan carpenter > > Hi Dan, > Thanks for your response. > Should I send a v2 of this patch or not ?? > Also do you have any problems with the other two patches doing the same > thing in different files ?? > I am all ears. I would just resend patch 6/6. If this is your driver and you're going to be working on it extensively then you do what makes you feel comfortable. But to me the original code seems fine with while count down loops. regards, dan carpenter