Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753859AbdCFPWZ (ORCPT ); Mon, 6 Mar 2017 10:22:25 -0500 Received: from mga14.intel.com ([192.55.52.115]:21580 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753223AbdCFPWO (ORCPT ); Mon, 6 Mar 2017 10:22:14 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,254,1484035200"; d="scan'208";a="72168766" Subject: Re: block/sed-opal.c: 2 * bad if tests ? To: David Binderman , "scott.bauer@intel.com" , "rafael.antognolli@intel.com" , "axboe@kernel.dk" , "linux-block@vger.kernel.org" , "linux-kernel@vger.kernel.org" References: From: Jon Derrick Message-ID: <9b98f762-ca72-1f6a-6f28-d42138389df7@intel.com> Date: Mon, 6 Mar 2017 08:19:33 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 742 Lines: 30 On 03/06/2017 05:00 AM, David Binderman wrote: > Hello there, > > 1. > > block/sed-opal.c:2136:40: warning: logical ?and? of mutually exclusive tests is always false [-Wlogical-op] > > Source code is > > if (lk_unlk->session.who < OPAL_USER1 && > lk_unlk->session.who > OPAL_USER9) { > > 2. > > block/sed-opal.c:2319:37: warning: logical ?and? of mutually exclusive tests is always false [-Wlogical-op] > > if (opal_session->who < OPAL_USER1 && > opal_session->who > OPAL_USER9) { > > Duplicate. > > Also in the same file: > > [block/sed-opal.c:1034]: (style) Variable 'method' is assigned a value that is never used. > > Regards > > David Binderman > Thanks for the catch(es). Will provide patch shortly