linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tursulin@ursulin.net>
To: "Winkler, Tomas" <tomas.winkler@intel.com>,
	Mark Brown <broonie@kernel.org>
Cc: "Usyskin, Alexander" <alexander.usyskin@intel.com>,
	"De Marchi, Lucas" <lucas.demarchi@intel.com>,
	"Oded Gabbay" <ogabbay@kernel.org>,
	"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"David Airlie" <airlied@gmail.com>,
	"Daniel Vetter" <daniel@ffwll.ch>,
	"Jani Nikula" <jani.nikula@linux.intel.com>,
	"Joonas Lahtinen" <joonas.lahtinen@linux.intel.com>,
	"Vivi, Rodrigo" <rodrigo.vivi@intel.com>,
	"Lubart, Vitaly" <vitaly.lubart@intel.com>,
	"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH v6 01/12] spi: add driver for intel graphics on-die spi device
Date: Mon, 23 Sep 2024 09:02:45 +0100	[thread overview]
Message-ID: <1b824cfe-2006-4f5f-a34e-3496c259cd90@ursulin.net> (raw)
In-Reply-To: <PH7PR11MB760505A11C7A41DAB0359184E56D2@PH7PR11MB7605.namprd11.prod.outlook.com>


On 21/09/2024 14:00, Winkler, Tomas wrote:
> 
> 
>>
>> On Thu, Sep 19, 2024 at 09:54:24AM +0000, Winkler, Tomas wrote:
>>>> On Mon, Sep 16, 2024 at 04:49:17PM +0300, Alexander Usyskin wrote:
>>
>>>>> @@ -0,0 +1,142 @@
>>>>> +// SPDX-License-Identifier: GPL-2.0
>>>>> +/*
>>>>> + * Copyright(c) 2019-2024, Intel Corporation. All rights reserved.
>>>>> + */
>>
>>>> Please make the entire comment a C++ one so things look more
>> intentional.
>>
>>> This is how it is required by Linux spdx checker,
>>
>> There is no incompatibility between SPDX and what I'm asking for...
>>
>>>>> +	size = sizeof(*spi) + sizeof(spi->regions[0]) * nregions;
>>>>> +	spi = kzalloc(size, GFP_KERNEL);
>>
>>>> Use at least array_size().
>>
>>> Regions is not fixed size array, it will not work.
>>
>> Yes, that's the wrong helper - there is a relevent one though which I'm not
>> remembering right now.
> 
> 
> I don't think there is one, you can allocate arrays but this is not the case here.

struct_size() probably.

Regards,

Tvrtko

  reply	other threads:[~2024-09-23  8:02 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-16 13:49 [PATCH v6 00/12] spi: add driver for Intel discrete graphics Alexander Usyskin
2024-09-16 13:49 ` [PATCH v6 01/12] spi: add driver for intel graphics on-die spi device Alexander Usyskin
2024-09-18 13:33   ` Mark Brown
2024-09-19  9:54     ` Winkler, Tomas
2024-09-19 10:32       ` Mark Brown
2024-09-21 13:00         ` Winkler, Tomas
2024-09-23  8:02           ` Tvrtko Ursulin [this message]
2024-09-23 12:49           ` Mark Brown
2024-09-25 12:31             ` Usyskin, Alexander
2024-09-25 13:12               ` Mark Brown
2024-09-16 13:49 ` [PATCH v6 02/12] spi: intel-dg: implement region enumeration Alexander Usyskin
2024-09-18 13:35   ` Mark Brown
2024-09-19  9:55     ` Winkler, Tomas
2024-09-19 10:34       ` Mark Brown
2024-09-16 13:49 ` [PATCH v6 03/12] spi: intel-dg: implement spi access functions Alexander Usyskin
2024-09-16 13:49 ` [PATCH v6 04/12] spi: intel-dg: spi register with mtd Alexander Usyskin
2024-09-18 13:38   ` Mark Brown
2024-09-19 10:01     ` Winkler, Tomas
2024-09-19 10:43       ` Mark Brown
2024-09-16 13:49 ` [PATCH v6 05/12] spi: intel-dg: implement mtd access handlers Alexander Usyskin
2024-09-16 13:49 ` [PATCH v6 06/12] spi: intel-dg: align 64bit read and write Alexander Usyskin
2024-09-16 13:49 ` [PATCH v6 07/12] spi: intel-dg: wake card on operations Alexander Usyskin
2024-09-16 18:00   ` Rodrigo Vivi
2024-09-16 13:49 ` [PATCH v6 08/12] drm/i915/spi: add spi device for discrete graphics Alexander Usyskin
2024-09-23  8:31   ` Jani Nikula
2024-09-23 11:33     ` Usyskin, Alexander
2024-09-16 13:49 ` [PATCH v6 09/12] drm/i915/spi: add intel_spi_region map Alexander Usyskin
2024-09-16 13:49 ` [PATCH v6 10/12] drm/i915/spi: add support for access mode Alexander Usyskin
2024-09-16 13:49 ` [PATCH v6 11/12] drm/xe/spi: add on-die spi device Alexander Usyskin
2024-09-16 18:04   ` Rodrigo Vivi
2024-09-16 13:49 ` [PATCH v6 12/12] drm/xe/spi: add support for access mode Alexander Usyskin
2024-09-18 13:45 ` [PATCH v6 00/12] spi: add driver for Intel discrete graphics Mark Brown
2024-09-19  6:56   ` Usyskin, Alexander
2024-09-19  8:31     ` Mark Brown

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=1b824cfe-2006-4f5f-a34e-3496c259cd90@ursulin.net \
    --to=tursulin@ursulin.net \
    --cc=airlied@gmail.com \
    --cc=alexander.usyskin@intel.com \
    --cc=broonie@kernel.org \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=linux-spi@vger.kernel.org \
    --cc=lucas.demarchi@intel.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=ogabbay@kernel.org \
    --cc=rodrigo.vivi@intel.com \
    --cc=thomas.hellstrom@linux.intel.com \
    --cc=tomas.winkler@intel.com \
    --cc=tzimmermann@suse.de \
    --cc=vitaly.lubart@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).