From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Martin K. Petersen" Date: Tue, 12 Dec 2017 02:37:47 +0000 Subject: Re: [PATCH][next] scsi: arcmsr: remove redundant check for secs < 0 Message-Id: List-Id: References: <20171209003414.17332-1-colin.king@canonical.com> In-Reply-To: <20171209003414.17332-1-colin.king@canonical.com> (Colin King's message of "Sat, 9 Dec 2017 00:34:14 +0000") MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Martin K. Petersen" Subject: Re: [PATCH][next] scsi: arcmsr: remove redundant check for secs < 0 Date: Mon, 11 Dec 2017 21:37:47 -0500 Message-ID: References: <20171209003414.17332-1-colin.king@canonical.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: <20171209003414.17332-1-colin.king@canonical.com> (Colin King's message of "Sat, 9 Dec 2017 00:34:14 +0000") Sender: linux-kernel-owner@vger.kernel.org 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 List-Id: linux-scsi@vger.kernel.org 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