Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752243AbdLLCiF (ORCPT ); Mon, 11 Dec 2017 21:38:05 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:36254 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751965AbdLLCh5 (ORCPT ); Mon, 11 Dec 2017 21:37:57 -0500 To: Colin King Cc: "James E . J . Bottomley" , "Martin K . Petersen" , Ching Huang , linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH][next] scsi: arcmsr: remove redundant check for secs < 0 From: "Martin K. Petersen" Organization: Oracle Corporation References: <20171209003414.17332-1-colin.king@canonical.com> Date: Mon, 11 Dec 2017 21:37:47 -0500 In-Reply-To: <20171209003414.17332-1-colin.king@canonical.com> (Colin King's message of "Sat, 9 Dec 2017 00:34:14 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8742 signatures=668644 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=890 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1712120035 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 412 Lines: 13 Colin, > The check for secs being less than zero is redundant for two reasons. > Firstly, secs is unsigned so the check is always going to be false. > Secondly, if secs was signed the proceeding calculation of secs is > never going to be negative. Hence we can remove this redundant check > and day and secs re-adjustment. Applied to 4.16/scsi-queue, thanks! -- Martin K. Petersen Oracle Linux Engineering