Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752825AbbKKVok (ORCPT ); Wed, 11 Nov 2015 16:44:40 -0500 Received: from g2t2354.austin.hp.com ([15.217.128.53]:35641 "EHLO g2t2354.austin.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752424AbbKKVoj (ORCPT ); Wed, 11 Nov 2015 16:44:39 -0500 Date: Wed, 11 Nov 2015 14:44:35 -0700 From: Jerry Hoemann To: Dmitry Krivenok Cc: ross.zwisler@linux.intel.com, rjw@rjwysocki.net, Len Brown , dan.j.williams@intel.com, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvdimm@ml01.01.org Subject: Re: [PATCH 3/4] nvdimm: Add IOCTL pass thru Message-ID: <20151111214435.GB95024@tevye.fc.hp.com> Reply-To: Jerry.Hoemann@hpe.com References: <20151109215904.GB33245@tevye.fc.hp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 989 Lines: 26 On Tue, Nov 10, 2015 at 06:05:15PM +0300, Dmitry Krivenok wrote: > > > list_for_each_entry(nvdimm_bus, &nvdimm_bus_list, list) { > > - if (nvdimm_bus->id == id) { > > + if (nvdimm_bus->id != id) > > I noticed another minor issue. You have switched from "==" to "!=" > here, but you didn't add "break" after ioctl is handled for the found > bus. > I added the continue. the code is going through a list and wants to only do action when it matches on id. but, we still want to go through entire list. -- ----------------------------------------------------------------------------- Jerry Hoemann Software Engineer Hewlett-Packard Enterprise ----------------------------------------------------------------------------- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/