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

Configure Feed

Select the types of activity you want to include in your feed.

resource: Mark res given to resource_assigned() as const

The caller may hold a const struct resource which will trigger an
unnecessary warning when calling resource_assigned() as it will not
modify res in any way.

Mark resource_assigned()'s struct resource *res parameter const to
avoid the compiler warning.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patch.msgid.link/20251219174036.16738-15-ilpo.jarvinen@linux.intel.com

authored by

Ilpo Järvinen and committed by
Bjorn Helgaas
2aa7c47a 6a5e64c7

+1 -1
+1 -1
include/linux/ioport.h
··· 338 338 * Check if this resource is added to a resource tree or detached. Caller is 339 339 * responsible for not racing assignment. 340 340 */ 341 - static inline bool resource_assigned(struct resource *res) 341 + static inline bool resource_assigned(const struct resource *res) 342 342 { 343 343 return res->parent; 344 344 }