All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Stuart Summers <stuart.summers@intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] mm: Use local variable for swap address space
Date: Wed, 19 Jun 2019 18:30:04 +0300	[thread overview]
Message-ID: <87a7edlhj7.fsf@intel.com> (raw)
In-Reply-To: <20190619013856.11872-1-stuart.summers@intel.com>

On Tue, 18 Jun 2019, Stuart Summers <stuart.summers@intel.com> wrote:
> This addresses the following build error:
> mm/huge_memory.c: In function ‘__split_huge_page’:
> mm/huge_memory.c:2506:41: warning: dereferencing ‘void *’ pointer
>     __xa_store(&swap_address_space(entry)->i_pages,
>                                          ^~
> mm/huge_memory.c:2506:41: error: request for member ‘i_pages’ in
> something not a structure or union

Did you check under what circumstances it would be a void pointer?

Under those circumstances, what do you think will happen runtime after
you've brushed the build error under the carpet?

Anyway, the patch is against a commit in topic/core-for-CI, not to be
merged elsewhere.

BR,
Jani.



>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Stuart Summers <stuart.summers@intel.com>
> ---
>  mm/huge_memory.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/mm/huge_memory.c b/mm/huge_memory.c
> index affb2c3667f9..bced5485137b 100644
> --- a/mm/huge_memory.c
> +++ b/mm/huge_memory.c
> @@ -2503,7 +2503,9 @@ static void __split_huge_page(struct page *page, struct list_head *list,
>  					head + i, 0);
>  		} else if (PageSwapCache(page)) {
>  			swp_entry_t entry = { .val = page_private(head + i) };
> -			__xa_store(&swap_address_space(entry)->i_pages,
> +			struct address_space *address_space =
> +				swap_address_space(entry);
> +			__xa_store(&address_space->i_pages,
>  				   swp_offset(entry),
>  				   head + i, 0);
>  		}

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2019-06-19 15:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-19  1:38 [PATCH] mm: Use local variable for swap address space Stuart Summers
2019-06-19  2:03 ` ✗ Fi.CI.BAT: failure for " Patchwork
2019-06-19 15:30 ` Jani Nikula [this message]
2019-06-19 17:07   ` [PATCH] " Summers, Stuart
2019-06-19 20:00     ` Jani Nikula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a7edlhj7.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=stuart.summers@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.