[lkml]   [2021]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH v2] spi: <linux/spi/spi.h>: add missing struct kernel-doc entry
Fix kernel-doc warning in spi.h by adding the missing kernel-doc entry
and also correct the original comment so that they both indicate the
correct polarity of the flag.

../include/linux/spi/spi.h:673: warning: Function parameter or member 'devm_allocated' not described in 'spi_controller'

Fixes: 794aaf01444d ("spi: Fix use-after-free with devm_spi_alloc_*")
Signed-off-by: Randy Dunlap <>
Cc: William A. Kennington III <>
Cc: Mark Brown <>
Cc: Lukas Wunner <>
v2: correct both comments for @devm_allocated to indicate the correct polarity
(thanks, Lukas)

include/linux/spi/spi.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

--- linux-next-20210628.orig/include/linux/spi/spi.h
+++ linux-next-20210628/include/linux/spi/spi.h
@@ -339,6 +339,7 @@ extern struct spi_device *spi_new_ancill
* @max_speed_hz: Highest supported transfer speed
* @flags: other constraints relevant to this driver
* @slave: indicates that this is an SPI slave controller
+ * @devm_allocated: whether the allocation of this struct is devres-managed
* @max_transfer_size: function that returns the max transfer size for
* a &spi_device; may be %NULL, so the default %SIZE_MAX will be used.
* @max_message_size: function that returns the max message size for
@@ -511,7 +512,7 @@ struct spi_controller {

#define SPI_MASTER_GPIO_SS BIT(5) /* GPIO CS must select slave */

- /* flag indicating this is a non-devres managed controller */
+ /* flag indicating if the allocation of this struct is devres-managed */
bool devm_allocated;

/* flag indicating this is an SPI slave controller */
 \ /
  Last update: 2021-06-28 23:06    [W:0.046 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site