From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: MIME-Version: 1.0 In-Reply-To: <20151109215904.GB33245@tevye.fc.hp.com> References: <20151109215904.GB33245@tevye.fc.hp.com> Date: Tue, 10 Nov 2015 18:05:15 +0300 Message-ID: Subject: Re: [PATCH 3/4] nvdimm: Add IOCTL pass thru From: Dmitry Krivenok Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org To: Jerry Hoemann 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@lists.01.org List-ID: > Is your concern readibility or size of generated code (or both?) > > I'll look to consolidating the debug printing in next version as additional patch. Just a minor style comment, not critical. > If we had a longer list, I would definitely say yes. Not so sure with > just two types. I'll take a look for the next version. The same, just a style comment. > 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. Thanks, Dmitry From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753742AbbKJPFR (ORCPT ); Tue, 10 Nov 2015 10:05:17 -0500 Received: from mail-yk0-f178.google.com ([209.85.160.178]:36370 "EHLO mail-yk0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753436AbbKJPFQ (ORCPT ); Tue, 10 Nov 2015 10:05:16 -0500 MIME-Version: 1.0 In-Reply-To: <20151109215904.GB33245@tevye.fc.hp.com> References: <20151109215904.GB33245@tevye.fc.hp.com> Date: Tue, 10 Nov 2015 18:05:15 +0300 Message-ID: Subject: Re: [PATCH 3/4] nvdimm: Add IOCTL pass thru From: Dmitry Krivenok To: Jerry Hoemann 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 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Is your concern readibility or size of generated code (or both?) > > I'll look to consolidating the debug printing in next version as additional patch. Just a minor style comment, not critical. > If we had a longer list, I would definitely say yes. Not so sure with > just two types. I'll take a look for the next version. The same, just a style comment. > 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. Thanks, Dmitry