Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752659AbbKJRwD (ORCPT ); Tue, 10 Nov 2015 12:52:03 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59390 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752601AbbKJRwB (ORCPT ); Tue, 10 Nov 2015 12:52:01 -0500 From: Jeff Moyer To: Jerry Hoemann Cc: ross.zwisler@linux.intel.com, rjw@rjwysocki.net, lenb@kernel.org, dan.j.williams@intel.com, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvdimm@ml01.01.org Subject: Re: [PATCH 1/4] nvdimm: Add wrapper for IOCTL pass thru. References: <5411049831df211c8280e3239aaf344af033fa25.1446684001.git.jerry.hoemann@hpe.com> X-PGP-KeyID: 1F78E1B4 X-PGP-CertKey: F6FE 280D 8293 F72C 65FD 5A58 1FF8 A7CA 1F78 E1B4 X-PCLoadLetter: What the f**k does that mean? Date: Tue, 10 Nov 2015 12:51:59 -0500 In-Reply-To: <5411049831df211c8280e3239aaf344af033fa25.1446684001.git.jerry.hoemann@hpe.com> (Jerry Hoemann's message of "Fri, 6 Nov 2015 15:27:28 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1328 Lines: 37 Jerry Hoemann writes: > Add IOCTL type 'P' to denote NVDIMM_TYPE_PASSTHRU. Can't you just make passthrough a separate command? If you actually add the ioctl definition for passthrough (which you didn't do for some reason?), it looks odd: #define ND_IOCTL_PASSTHRU _IOWR(NVDIMM_TYPE_PASSTHRU,, ND_CMD_PASSTHRU, \ struct ndn_package) Care to comment on why you chose a different type instead of specifying a new command? > +struct ndn_pkg { > + struct { > + __u8 dsm_uuid[16]; > + __u32 dsm_in; /* size of _DSM input */ > + __u32 dsm_out; /* size of user buffer */ > + __u32 dsm_rev; /* revision of dsm call */ > + __u32 res[8]; /* reserved must be zero */ > + __u32 dsm_size; /* size _DSM would write */ > + } h; > + unsigned char buf[]; Please change that to: __u8 *buf; since acpi_object.buffer.pointer is a u8 *. Note that the size of this structure will be different for 32 vs. 64 bit, but I don't think it matters since offsets won't change (the pointer is at the end of the structure). -- 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/