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

thunderbolt: Update nvm.c function documentation

Make nvm.c function documentation compliant with current kernel-doc
standards. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>

authored by

Alan Borzeszkowski and committed by
Mika Westerberg
fe83a273 bbbca9bf

+26 -16
+26 -16
drivers/thunderbolt/nvm.c
··· 278 278 * tb_nvm_alloc() - Allocate new NVM structure 279 279 * @dev: Device owning the NVM 280 280 * 281 - * Allocates new NVM structure with unique @id and returns it. In case 282 - * of error returns ERR_PTR(). Specifically returns %-EOPNOTSUPP if the 283 - * NVM format of the @dev is not known by the kernel. 281 + * Allocates new NVM structure with unique @id and returns it. 282 + * 283 + * Return: 284 + * * Pointer to &struct tb_nvm - On success. 285 + * * %-EOPNOTSUPP - If the NVM format of the @dev is not known by the 286 + * kernel. 287 + * * %ERR_PTR - In case of failure. 284 288 */ 285 289 struct tb_nvm *tb_nvm_alloc(struct device *dev) 286 290 { ··· 351 347 * tb_nvm_read_version() - Read and populate NVM version 352 348 * @nvm: NVM structure 353 349 * 354 - * Uses vendor specific means to read out and fill in the existing 355 - * active NVM version. Returns %0 in case of success and negative errno 356 - * otherwise. 350 + * Uses vendor specific means to read and fill out the existing 351 + * active NVM version. 352 + * 353 + * Return: %0 on success, negative errno otherwise. 357 354 */ 358 355 int tb_nvm_read_version(struct tb_nvm *nvm) 359 356 { ··· 370 365 * tb_nvm_validate() - Validate new NVM image 371 366 * @nvm: NVM structure 372 367 * 373 - * Runs vendor specific validation over the new NVM image and if all 374 - * checks pass returns %0. As side effect updates @nvm->buf_data_start 375 - * and @nvm->buf_data_size fields to match the actual data to be written 376 - * to the NVM. 368 + * Runs vendor specific validation over the new NVM image. As a 369 + * side effect, updates @nvm->buf_data_start and @nvm->buf_data_size 370 + * fields to match the actual data to be written to the NVM. 377 371 * 378 - * If the validation does not pass then returns negative errno. 372 + * Return: %0 on successful validation, negative errno otherwise. 379 373 */ 380 374 int tb_nvm_validate(struct tb_nvm *nvm) 381 375 { ··· 409 405 * the image, this function does that. Can be called even if the device 410 406 * does not need this. 411 407 * 412 - * Returns %0 in case of success and negative errno otherwise. 408 + * Return: %0 on success, negative errno otherwise. 413 409 */ 414 410 int tb_nvm_write_headers(struct tb_nvm *nvm) 415 411 { ··· 427 423 * Registers new active NVmem device for @nvm. The @reg_read is called 428 424 * directly from NVMem so it must handle possible concurrent access if 429 425 * needed. The first parameter passed to @reg_read is @nvm structure. 430 - * Returns %0 in success and negative errno otherwise. 426 + * 427 + * Return: %0 on success, negative errno otherwise. 431 428 */ 432 429 int tb_nvm_add_active(struct tb_nvm *nvm, nvmem_reg_read_t reg_read) 433 430 { ··· 466 461 * Helper function to cache the new NVM image before it is actually 467 462 * written to the flash. Copies @bytes from @val to @nvm->buf starting 468 463 * from @offset. 464 + * 465 + * Return: 466 + * * %0 - On success. 467 + * * %-ENOMEM - If buffer allocation failed. 468 + * * Negative errno - Another error occurred. 469 469 */ 470 470 int tb_nvm_write_buf(struct tb_nvm *nvm, unsigned int offset, void *val, 471 471 size_t bytes) ··· 498 488 * needed. The first parameter passed to @reg_write is @nvm structure. 499 489 * The size of the NVMem device is set to %NVM_MAX_SIZE. 500 490 * 501 - * Returns %0 in success and negative errno otherwise. 491 + * Return: %0 on success, negative errno otherwise. 502 492 */ 503 493 int tb_nvm_add_non_active(struct tb_nvm *nvm, nvmem_reg_write_t reg_write) 504 494 { ··· 555 545 * This is a generic function that reads data from NVM or NVM like 556 546 * device. 557 547 * 558 - * Returns %0 on success and negative errno otherwise. 548 + * Return: %0 on success, negative errno otherwise. 559 549 */ 560 550 int tb_nvm_read_data(unsigned int address, void *buf, size_t size, 561 551 unsigned int retries, read_block_fn read_block, ··· 602 592 * 603 593 * This is generic function that writes data to NVM or NVM like device. 604 594 * 605 - * Returns %0 on success and negative errno otherwise. 595 + * Return: %0 on success, negative errno otherwise. 606 596 */ 607 597 int tb_nvm_write_data(unsigned int address, const void *buf, size_t size, 608 598 unsigned int retries, write_block_fn write_block,