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

ARM: 9318/1: locomo: move kernel-doc to prevent warnings

Move the kernel-doc comments for locomo_probe() to immediately before
that function instead of before __locomo_probe() to prevent
kernel-doc warnings. Adjust the documented function parameters and
make the return values compatible with ReST by adding bullets to them.
Add more possible return values to the list.

Prevents these warnings:

arch/arm/common/locomo.c:368: warning: Function parameter or member 'me' not described in '__locomo_probe'
arch/arm/common/locomo.c:368: warning: Function parameter or member 'mem' not described in '__locomo_probe'
arch/arm/common/locomo.c:368: warning: Function parameter or member 'irq' not described in '__locomo_probe'
arch/arm/common/locomo.c:368: warning: expecting prototype for locomo_probe(). Prototype was for __locomo_probe() instead

Link: lore.kernel.org/r/202308050851.zAvHe6y7-lkp@intel.com

Fixes: 5eb6e280432d ("ARM: 9289/1: Allow pre-ARMv5 builds with ld.lld 16.0.0 and newer")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: patches@armlinux.org.uk
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>

authored by

Randy Dunlap and committed by
Russell King (Oracle)
b0a6da43 8922ba71

+15 -13
+15 -13
arch/arm/common/locomo.c
··· 350 350 } 351 351 #endif 352 352 353 - 354 - /** 355 - * locomo_probe - probe for a single LoCoMo chip. 356 - * @phys_addr: physical address of device. 357 - * 358 - * Probe for a LoCoMo chip. This must be called 359 - * before any other locomo-specific code. 360 - * 361 - * Returns: 362 - * %-ENODEV device not found. 363 - * %-EBUSY physical address already marked in-use. 364 - * %0 successful. 365 - */ 366 353 static int 367 354 __locomo_probe(struct device *me, struct resource *mem, int irq) 368 355 { ··· 466 479 kfree(lchip); 467 480 } 468 481 482 + /** 483 + * locomo_probe - probe for a single LoCoMo chip. 484 + * @dev: platform device 485 + * 486 + * Probe for a LoCoMo chip. This must be called 487 + * before any other locomo-specific code. 488 + * 489 + * Returns: 490 + * * %-EINVAL - device's IORESOURCE_MEM not found 491 + * * %-ENXIO - could not allocate an IRQ for the device 492 + * * %-ENODEV - device not found. 493 + * * %-EBUSY - physical address already marked in-use. 494 + * * %-ENOMEM - could not allocate or iomap memory. 495 + * * %0 - successful. 496 + */ 469 497 static int locomo_probe(struct platform_device *dev) 470 498 { 471 499 struct resource *mem;