From: Alexander Lobakin Date: Tue, 2 Feb 2021 13:31:05 +0000 (+0000) Subject: skbuff: constify skb_propagate_pfmemalloc() "page" argument X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=48f971c9c80a728646fc03367a28df747f20d0f4;p=linux.git skbuff: constify skb_propagate_pfmemalloc() "page" argument The function doesn't write anything to the page struct itself, so this argument can be const. Misc: align second argument to the brace while at it. Signed-off-by: Alexander Lobakin Reviewed-by: Jesse Brandeburg Acked-by: David Rientjes Signed-off-by: Jakub Kicinski --- diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 9313b5aaf45b6..b027526da4f9c 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -2943,8 +2943,8 @@ static inline struct page *dev_alloc_page(void) * @page: The page that was allocated from skb_alloc_page * @skb: The skb that may need pfmemalloc set */ -static inline void skb_propagate_pfmemalloc(struct page *page, - struct sk_buff *skb) +static inline void skb_propagate_pfmemalloc(const struct page *page, + struct sk_buff *skb) { if (page_is_pfmemalloc(page)) skb->pfmemalloc = true;