From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755431AbbIHRnF (ORCPT ); Tue, 8 Sep 2015 13:43:05 -0400 Received: from mail-pa0-f52.google.com ([209.85.220.52]:34983 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752189AbbIHRnD (ORCPT ); Tue, 8 Sep 2015 13:43:03 -0400 Date: Tue, 8 Sep 2015 23:12:50 +0530 From: Sudip Mukherjee To: Joe Perches Cc: Oleg Drokin , Andreas Dilger , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, HPDD-discuss@ml01.01.org, devel@driverdev.osuosl.org Subject: Re: [PATCH 2/2] staging: lustre: lov: remove always false condition Message-ID: <20150908174250.GA32706@sudip-pc> References: <1441729382-27865-1-git-send-email-sudipm.mukherjee@gmail.com> <1441729382-27865-2-git-send-email-sudipm.mukherjee@gmail.com> <1441731189.17219.1.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1441731189.17219.1.camel@perches.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 08, 2015 at 09:53:09AM -0700, Joe Perches wrote: > On Tue, 2015-09-08 at 21:53 +0530, Sudip Mukherjee wrote: > > if (qctl->qc_valid == QC_OSTIDX) { > > - if (qctl->qc_idx < 0 || count <= qctl->qc_idx) > > + if (count <= qctl->qc_idx) > > Perhaps this test would be clearer reversed too > > if (qctl->qc_idx >= count) There are more such comparison in that file, like: 1) if (ost_idx >= lov->desc.ld_tgt_count) 2) if (index >= lov->lov_tgt_size) and some more. And if I include it in this patch then it will become separate change. I will better send a separate patch for this. Regards Sudip