mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
resource: Make resource_alignment() input const resource
resource_alignment() does not need to change resource so it can be made const. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://patch.msgid.link/20260429122617.7324-6-ilpo.jarvinen@linux.intel.com
This commit is contained in:
parent
854f9522a2
commit
71c6e7808e
|
|
@ -261,7 +261,7 @@ extern int allocate_resource(struct resource *root, struct resource *new,
|
|||
struct resource *lookup_resource(struct resource *root, resource_size_t start);
|
||||
int adjust_resource(struct resource *res, resource_size_t start,
|
||||
resource_size_t size);
|
||||
resource_size_t resource_alignment(struct resource *res);
|
||||
resource_size_t resource_alignment(const struct resource *res);
|
||||
|
||||
/**
|
||||
* resource_set_size - Calculate resource end address from size and start
|
||||
|
|
|
|||
|
|
@ -1238,7 +1238,7 @@ reserve_region_with_split(struct resource *root, resource_size_t start,
|
|||
*
|
||||
* Returns alignment on success, 0 (invalid alignment) on failure.
|
||||
*/
|
||||
resource_size_t resource_alignment(struct resource *res)
|
||||
resource_size_t resource_alignment(const struct resource *res)
|
||||
{
|
||||
switch (res->flags & (IORESOURCE_SIZEALIGN | IORESOURCE_STARTALIGN)) {
|
||||
case IORESOURCE_SIZEALIGN:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user