All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sumit Semwal <sumit.semwal@linaro.org>
To: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: Linaro Kernel Mailman List <linaro-kernel@lists.linaro.org>,
	Pawel Osciak <pawel@osciak.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	intel-gfx@lists.freedesktop.org,
	LKML <linux-kernel@vger.kernel.org>,
	DRI mailing list <dri-devel@lists.freedesktop.org>,
	Linaro MM SIG Mailman List <linaro-mm-sig@lists.linaro.org>,
	kgene@kernel.org, daniel.vetter@intel.com,
	linux-tegra@vger.kernel.org, rmk+kernel@arm.linux.org.uk,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>
Subject: Re: [PATCH v3] dma-buf: cleanup dma_buf_export() to make it easily extensible
Date: Wed, 28 Jan 2015 19:00:46 +0530	[thread overview]
Message-ID: <CAO_48GH3CVPeGUfDTuOgGfYmBnc1CvwVc5GYS6O3=275o0SwCw@mail.gmail.com> (raw)
In-Reply-To: <20150128112339.164c55fd@recife.lan>

Hi Mauro,

On 28 January 2015 at 18:53, Mauro Carvalho Chehab
<mchehab@osg.samsung.com> wrote:
> Em Wed, 28 Jan 2015 18:24:03 +0530
> Sumit Semwal <sumit.semwal@linaro.org> escreveu:
>
>> +/**
>> + * helper macro for exporters; zeros and fills in most common values
>> + */
>> +#define DEFINE_DMA_BUF_EXPORT_INFO(a)        \
>> +     struct dma_buf_export_info a = { .exp_name = KBUILD_MODNAME }
>> +
>
> I suspect that this will let the other fields not initialized.
>
> You likely need to do:
>
> #define DEFINE_DMA_BUF_EXPORT_INFO(a)   \
>         struct dma_buf_export_info a = {        \
>         .exp_name = KBUILD_MODNAME;             \
>         .fields = 0;                            \
> ...
> }
I suspected the same, but Daniel kindly referred to the C99 standard,
which states:
" If there are fewer initializers in a brace-enclosed list than there
are elements or members
of an aggregate, or fewer characters in a string literal used to
initialize an array of known
size than there are elements in the array, the remainder of the
aggregate shall be
initialized implicitly the same as objects that have static storage duration."

So I think we're well covered there?
>
> Regards,
> Mauro



-- 
Thanks and regards,

Sumit Semwal
Kernel Team Lead - Linaro Mobile Group
Linaro.org │ Open source software for ARM SoCs
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: Sumit Semwal <sumit.semwal@linaro.org>
To: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	DRI mailing list <dri-devel@lists.freedesktop.org>,
	Linaro MM SIG Mailman List <linaro-mm-sig@lists.linaro.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	rmk+kernel@arm.linux.org.uk, Dave Airlie <airlied@linux.ie>,
	kgene@kernel.org, daniel.vetter@intel.com,
	Thierry Reding <thierry.reding@gmail.com>,
	Pawel Osciak <pawel@osciak.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Linaro Kernel Mailman List <linaro-kernel@lists.linaro.org>,
	Rob Clark <robdclark@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
	intel-gfx@lists.freedesktop.org, linux-tegra@vger.kernel.org,
	inki.dae@samsung.com
Subject: Re: [PATCH v3] dma-buf: cleanup dma_buf_export() to make it easily extensible
Date: Wed, 28 Jan 2015 19:00:46 +0530	[thread overview]
Message-ID: <CAO_48GH3CVPeGUfDTuOgGfYmBnc1CvwVc5GYS6O3=275o0SwCw@mail.gmail.com> (raw)
In-Reply-To: <20150128112339.164c55fd@recife.lan>

Hi Mauro,

On 28 January 2015 at 18:53, Mauro Carvalho Chehab
<mchehab@osg.samsung.com> wrote:
> Em Wed, 28 Jan 2015 18:24:03 +0530
> Sumit Semwal <sumit.semwal@linaro.org> escreveu:
>
>> +/**
>> + * helper macro for exporters; zeros and fills in most common values
>> + */
>> +#define DEFINE_DMA_BUF_EXPORT_INFO(a)        \
>> +     struct dma_buf_export_info a = { .exp_name = KBUILD_MODNAME }
>> +
>
> I suspect that this will let the other fields not initialized.
>
> You likely need to do:
>
> #define DEFINE_DMA_BUF_EXPORT_INFO(a)   \
>         struct dma_buf_export_info a = {        \
>         .exp_name = KBUILD_MODNAME;             \
>         .fields = 0;                            \
> ...
> }
I suspected the same, but Daniel kindly referred to the C99 standard,
which states:
" If there are fewer initializers in a brace-enclosed list than there
are elements or members
of an aggregate, or fewer characters in a string literal used to
initialize an array of known
size than there are elements in the array, the remainder of the
aggregate shall be
initialized implicitly the same as objects that have static storage duration."

So I think we're well covered there?
>
> Regards,
> Mauro



-- 
Thanks and regards,

Sumit Semwal
Kernel Team Lead - Linaro Mobile Group
Linaro.org │ Open source software for ARM SoCs

WARNING: multiple messages have this Message-ID (diff)
From: Sumit Semwal <sumit.semwal@linaro.org>
To: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	DRI mailing list <dri-devel@lists.freedesktop.org>,
	Linaro MM SIG Mailman List <linaro-mm-sig@lists.linaro.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	rmk+kernel@arm.linux.org.uk, Dave Airlie <airlied@linux.ie>,
	kgene@kernel.org, daniel.vetter@intel.com,
	Thierry Reding <thierry.reding@gmail.com>,
	Pawel Osciak <pawel@osciak.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Linaro Kernel Mailman List <linaro-kernel@lists.linaro.org>,
	Rob Clark <robdclark@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
	intel-gfx@lists.freedesktop.org, linux-tegra@vger.kernel.org,
	inki.dae@samsung.com
Subject: Re: [PATCH v3] dma-buf: cleanup dma_buf_export() to make it easily extensible
Date: Wed, 28 Jan 2015 19:00:46 +0530	[thread overview]
Message-ID: <CAO_48GH3CVPeGUfDTuOgGfYmBnc1CvwVc5GYS6O3=275o0SwCw@mail.gmail.com> (raw)
In-Reply-To: <20150128112339.164c55fd@recife.lan>

Hi Mauro,

On 28 January 2015 at 18:53, Mauro Carvalho Chehab
<mchehab@osg.samsung.com> wrote:
> Em Wed, 28 Jan 2015 18:24:03 +0530
> Sumit Semwal <sumit.semwal@linaro.org> escreveu:
>
>> +/**
>> + * helper macro for exporters; zeros and fills in most common values
>> + */
>> +#define DEFINE_DMA_BUF_EXPORT_INFO(a)        \
>> +     struct dma_buf_export_info a = { .exp_name = KBUILD_MODNAME }
>> +
>
> I suspect that this will let the other fields not initialized.
>
> You likely need to do:
>
> #define DEFINE_DMA_BUF_EXPORT_INFO(a)   \
>         struct dma_buf_export_info a = {        \
>         .exp_name = KBUILD_MODNAME;             \
>         .fields = 0;                            \
> ...
> }
I suspected the same, but Daniel kindly referred to the C99 standard,
which states:
" If there are fewer initializers in a brace-enclosed list than there
are elements or members
of an aggregate, or fewer characters in a string literal used to
initialize an array of known
size than there are elements in the array, the remainder of the
aggregate shall be
initialized implicitly the same as objects that have static storage duration."

So I think we're well covered there?
>
> Regards,
> Mauro



-- 
Thanks and regards,

Sumit Semwal
Kernel Team Lead - Linaro Mobile Group
Linaro.org │ Open source software for ARM SoCs

WARNING: multiple messages have this Message-ID (diff)
From: sumit.semwal@linaro.org (Sumit Semwal)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3] dma-buf: cleanup dma_buf_export() to make it easily extensible
Date: Wed, 28 Jan 2015 19:00:46 +0530	[thread overview]
Message-ID: <CAO_48GH3CVPeGUfDTuOgGfYmBnc1CvwVc5GYS6O3=275o0SwCw@mail.gmail.com> (raw)
In-Reply-To: <20150128112339.164c55fd@recife.lan>

Hi Mauro,

On 28 January 2015 at 18:53, Mauro Carvalho Chehab
<mchehab@osg.samsung.com> wrote:
> Em Wed, 28 Jan 2015 18:24:03 +0530
> Sumit Semwal <sumit.semwal@linaro.org> escreveu:
>
>> +/**
>> + * helper macro for exporters; zeros and fills in most common values
>> + */
>> +#define DEFINE_DMA_BUF_EXPORT_INFO(a)        \
>> +     struct dma_buf_export_info a = { .exp_name = KBUILD_MODNAME }
>> +
>
> I suspect that this will let the other fields not initialized.
>
> You likely need to do:
>
> #define DEFINE_DMA_BUF_EXPORT_INFO(a)   \
>         struct dma_buf_export_info a = {        \
>         .exp_name = KBUILD_MODNAME;             \
>         .fields = 0;                            \
> ...
> }
I suspected the same, but Daniel kindly referred to the C99 standard,
which states:
" If there are fewer initializers in a brace-enclosed list than there
are elements or members
of an aggregate, or fewer characters in a string literal used to
initialize an array of known
size than there are elements in the array, the remainder of the
aggregate shall be
initialized implicitly the same as objects that have static storage duration."

So I think we're well covered there?
>
> Regards,
> Mauro



-- 
Thanks and regards,

Sumit Semwal
Kernel Team Lead - Linaro Mobile Group
Linaro.org ? Open source software for ARM SoCs

  reply	other threads:[~2015-01-28 13:30 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-28 12:54 [PATCH v3] dma-buf: cleanup dma_buf_export() to make it easily extensible Sumit Semwal
2015-01-28 12:54 ` Sumit Semwal
2015-01-28 12:54 ` Sumit Semwal
2015-01-28 13:23 ` Mauro Carvalho Chehab
2015-01-28 13:23   ` Mauro Carvalho Chehab
2015-01-28 13:23   ` Mauro Carvalho Chehab
2015-01-28 13:30   ` Sumit Semwal [this message]
2015-01-28 13:30     ` Sumit Semwal
2015-01-28 13:30     ` Sumit Semwal
2015-01-28 13:30     ` Sumit Semwal
2015-01-28 15:00 ` Maarten Lankhorst
2015-01-28 15:00   ` Maarten Lankhorst
2015-01-28 15:00   ` Maarten Lankhorst
2015-02-03  9:29 ` Daniel Thompson
2015-02-03  9:29   ` Daniel Thompson
2015-02-03  9:29   ` Daniel Thompson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAO_48GH3CVPeGUfDTuOgGfYmBnc1CvwVc5GYS6O3=275o0SwCw@mail.gmail.com' \
    --to=sumit.semwal@linaro.org \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=kgene@kernel.org \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mchehab@osg.samsung.com \
    --cc=pawel@osciak.com \
    --cc=rmk+kernel@arm.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.