Re: [PATCH v6 01/12] spi: add driver for intel graphics on-die spi device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux