Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: imu: adis: fix all kernel-doc warnings in header file

Correct and add to adis.h to resolve all kernel-doc warnings:

- add a missing struct member description
- change one non-kernel-doc comment to use /* instead of /**
- correct function parameter @value to @val (7 locations)
- add function return value comments (13 locations)

Warning: include/linux/iio/imu/adis.h:97 struct member 'has_fifo'
not described in 'adis_data'
Warning: include/linux/iio/imu/adis.h:139 Incorrect use of kernel-doc
format: * The state_lock is meant to be used during operations that
require
Warning: include/linux/iio/imu/adis.h:158 struct member '"__adis_"'
not described in 'adis'
Warning: include/linux/iio/imu/adis.h:264 function parameter 'val'
not described in 'adis_write_reg'
Warning: include/linux/iio/imu/adis.h:371 No description found for
return value of 'adis_update_bits_base'

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Randy Dunlap and committed by
Jonathan Cameron
1d165919 bb578dd7

+36 -9
+36 -9
include/linux/iio/imu/adis.h
··· 57 57 * @enable_irq: Hook for ADIS devices that have a special IRQ enable/disable 58 58 * @unmasked_drdy: True for devices that cannot mask/unmask the data ready pin 59 59 * @has_paging: True if ADIS device has paged registers 60 + * @has_fifo: True if ADIS device has a hardware FIFO 60 61 * @burst_reg_cmd: Register command that triggers burst 61 62 * @burst_len: Burst size in the SPI RX buffer. If @burst_max_len is defined, 62 63 * this should be the minimum size supported by the device. ··· 137 136 const struct adis_data *data; 138 137 unsigned int burst_extra_len; 139 138 const struct adis_ops *ops; 140 - /** 139 + /* 141 140 * The state_lock is meant to be used during operations that require 142 141 * a sequence of SPI R/W in order to protect the SPI transfer 143 142 * information (fields 'xfer', 'msg' & 'current_page') between ··· 167 166 * adis_reset() - Reset the device 168 167 * @adis: The adis device 169 168 * 170 - * Returns 0 on success, a negative error code otherwise 169 + * Returns: %0 on success, a negative error code otherwise 171 170 */ 172 171 static inline int adis_reset(struct adis *adis) 173 172 { ··· 184 183 * __adis_write_reg_8() - Write single byte to a register (unlocked) 185 184 * @adis: The adis device 186 185 * @reg: The address of the register to be written 187 - * @value: The value to write 186 + * @val: The value to write 187 + * 188 + * Returns: %0 on success, a negative error code otherwise 188 189 */ 189 190 static inline int __adis_write_reg_8(struct adis *adis, unsigned int reg, 190 191 u8 val) ··· 198 195 * __adis_write_reg_16() - Write 2 bytes to a pair of registers (unlocked) 199 196 * @adis: The adis device 200 197 * @reg: The address of the lower of the two registers 201 - * @value: Value to be written 198 + * @val: Value to be written 199 + * 200 + * Returns: %0 on success, a negative error code otherwise 202 201 */ 203 202 static inline int __adis_write_reg_16(struct adis *adis, unsigned int reg, 204 203 u16 val) ··· 212 207 * __adis_write_reg_32() - write 4 bytes to four registers (unlocked) 213 208 * @adis: The adis device 214 209 * @reg: The address of the lower of the four register 215 - * @value: Value to be written 210 + * @val: Value to be written 211 + * 212 + * Returns: %0 on success, a negative error code otherwise 216 213 */ 217 214 static inline int __adis_write_reg_32(struct adis *adis, unsigned int reg, 218 215 u32 val) ··· 227 220 * @adis: The adis device 228 221 * @reg: The address of the lower of the two registers 229 222 * @val: The value read back from the device 223 + * 224 + * Returns: %0 on success, a negative error code otherwise 230 225 */ 231 226 static inline int __adis_read_reg_16(struct adis *adis, unsigned int reg, 232 227 u16 *val) ··· 248 239 * @adis: The adis device 249 240 * @reg: The address of the lower of the two registers 250 241 * @val: The value read back from the device 242 + * 243 + * Returns: %0 on success, a negative error code otherwise 251 244 */ 252 245 static inline int __adis_read_reg_32(struct adis *adis, unsigned int reg, 253 246 u32 *val) ··· 268 257 * adis_write_reg() - write N bytes to register 269 258 * @adis: The adis device 270 259 * @reg: The address of the lower of the two registers 271 - * @value: The value to write to device (up to 4 bytes) 260 + * @val: The value to write to device (up to 4 bytes) 272 261 * @size: The size of the @value (in bytes) 262 + * 263 + * Returns: %0 on success, a negative error code otherwise 273 264 */ 274 265 static inline int adis_write_reg(struct adis *adis, unsigned int reg, 275 266 unsigned int val, unsigned int size) ··· 286 273 * @reg: The address of the lower of the two registers 287 274 * @val: The value read back from the device 288 275 * @size: The size of the @val buffer 276 + * 277 + * Returns: %0 on success, a negative error code otherwise 289 278 */ 290 279 static int adis_read_reg(struct adis *adis, unsigned int reg, 291 280 unsigned int *val, unsigned int size) ··· 300 285 * adis_write_reg_8() - Write single byte to a register 301 286 * @adis: The adis device 302 287 * @reg: The address of the register to be written 303 - * @value: The value to write 288 + * @val: The value to write 289 + * 290 + * Returns: %0 on success, a negative error code otherwise 304 291 */ 305 292 static inline int adis_write_reg_8(struct adis *adis, unsigned int reg, 306 293 u8 val) ··· 314 297 * adis_write_reg_16() - Write 2 bytes to a pair of registers 315 298 * @adis: The adis device 316 299 * @reg: The address of the lower of the two registers 317 - * @value: Value to be written 300 + * @val: Value to be written 301 + * 302 + * Returns: %0 on success, a negative error code otherwise 318 303 */ 319 304 static inline int adis_write_reg_16(struct adis *adis, unsigned int reg, 320 305 u16 val) ··· 328 309 * adis_write_reg_32() - write 4 bytes to four registers 329 310 * @adis: The adis device 330 311 * @reg: The address of the lower of the four register 331 - * @value: Value to be written 312 + * @val: Value to be written 313 + * 314 + * Returns: %0 on success, a negative error code otherwise 332 315 */ 333 316 static inline int adis_write_reg_32(struct adis *adis, unsigned int reg, 334 317 u32 val) ··· 343 322 * @adis: The adis device 344 323 * @reg: The address of the lower of the two registers 345 324 * @val: The value read back from the device 325 + * 326 + * Returns: %0 on success, a negative error code otherwise 346 327 */ 347 328 static inline int adis_read_reg_16(struct adis *adis, unsigned int reg, 348 329 u16 *val) ··· 364 341 * @adis: The adis device 365 342 * @reg: The address of the lower of the two registers 366 343 * @val: The value read back from the device 344 + * 345 + * Returns: %0 on success, a negative error code otherwise 367 346 */ 368 347 static inline int adis_read_reg_32(struct adis *adis, unsigned int reg, 369 348 u32 *val) ··· 391 366 * @size: Size of the register to update 392 367 * 393 368 * Updates the desired bits of @reg in accordance with @mask and @val. 369 + * 370 + * Returns: %0 on success, a negative error code otherwise 394 371 */ 395 372 static inline int adis_update_bits_base(struct adis *adis, unsigned int reg, 396 373 const u32 mask, const u32 val, u8 size)