lkml.org 
[lkml]   [2021]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] blk-mq: fix alignment mismatch.
On Tue, Mar 30, 2021 at 04:02:49PM -0700, Jian Cai wrote:
> This fixes the mismatch of alignments between csd and its use as an
> argument to smp_call_function_single_async, which causes build failure
> when -Walign-mismatch in Clang is used.
>
> Link:
> http://crrev.com/c/1193732

That link does not work. You probably meant
http://crbug.com/1193732

You'll probably want drop the link and to copy the relevant information
directly into the patch description. Generate the error with an upstream
kernel and cut-and-paste the output here.

For others, the observed error message is:

block/blk-mq.c:622:44: error: passing 8-byte aligned argument to 32-byte
aligned parameter 2 of 'smp_call_function_single_async' may result
in an unaligned pointer access [-Werror,-Walign-mismatch]

Thanks,
Guenter

>
> Suggested-by: Guenter Roeck <linux@roeck-us.net>
> Signed-off-by: Jian Cai <jiancai@google.com>
> ---
> include/linux/blkdev.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
> index bc6bc8383b43..3b92330d95ad 100644
> --- a/include/linux/blkdev.h
> +++ b/include/linux/blkdev.h
> @@ -231,7 +231,7 @@ struct request {
> unsigned long deadline;
>
> union {
> - struct __call_single_data csd;
> + call_single_data_t csd;
> u64 fifo_time;
> };
>
> --
> 2.31.0.291.g576ba9dcdaf-goog
>

\
 
 \ /
  Last update: 2021-03-31 01:15    [W:0.053 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site