Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752462AbbKKAtV (ORCPT ); Tue, 10 Nov 2015 19:49:21 -0500 Received: from mail-wm0-f46.google.com ([74.125.82.46]:37623 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752098AbbKKAtS (ORCPT ); Tue, 10 Nov 2015 19:49:18 -0500 MIME-Version: 1.0 In-Reply-To: <20151111004425.GG47666@tevye.fc.hp.com> References: <5411049831df211c8280e3239aaf344af033fa25.1446684001.git.jerry.hoemann@hpe.com> <20151110194938.GA47666@tevye.fc.hp.com> <20151111004425.GG47666@tevye.fc.hp.com> Date: Tue, 10 Nov 2015 16:49:17 -0800 Message-ID: Subject: Re: [PATCH 1/4] nvdimm: Add wrapper for IOCTL pass thru. From: Dan Williams To: Jerry Hoemann Cc: Jeff Moyer , Ross Zwisler , "Rafael J. Wysocki" , Len Brown , Linux ACPI , "linux-kernel@vger.kernel.org" , linux-nvdimm Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1017 Lines: 23 On Tue, Nov 10, 2015 at 4:44 PM, Jerry Hoemann wrote: > On Tue, Nov 10, 2015 at 03:26:38PM -0500, Jeff Moyer wrote: [..] >> I see. I misread that, because you didn't actually make buf a zero >> length array (see the structure definition quoted above). I guess you >> meant to write this: >> >> unsigned char buf[0]; >> > > The ndn_pkg.buf struct uses a flexible array definition. This is in C99. > An explicit zero length array is a gcc extension that has been around much > longer. They behave in a similar fashion, but aren't identical. In my > limited use they behave the same. "buf[0]" is more idiomatic for Linux. I know I expressed concern about compiler compatibility for ACPICA, but this path does not have ACPICA interactions. -- 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/