linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Demi Marie Obenour <demi@invisiblethingslab.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>,
	Alasdair G Kergon <agk@redhat.com>,
	Mike Snitzer <snitzer@kernel.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: Re: linux-next: build failure after merge of the device-mapper tree
Date: Fri, 23 Jun 2023 12:47:08 -0400	[thread overview]
Message-ID: <ZJXMkd0eOEBnpUw2@itl-email> (raw)
In-Reply-To: <20230623143011.7deba53c@canb.auug.org.au>

[-- Attachment #1: Type: text/plain, Size: 3422 bytes --]

On Fri, Jun 23, 2023 at 02:30:11PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the device-mapper tree, today's linux-next build (i386
> defconfig) failed like this:
> 
> In file included from include/linux/kernel.h:30,
>                  from arch/x86/include/asm/percpu.h:27,
>                  from arch/x86/include/asm/current.h:10,
>                  from include/linux/sched.h:12,
>                  from include/linux/kthread.h:6,
>                  from drivers/md/dm-core.h:13,
>                  from drivers/md/dm-ioctl.c:9:
> drivers/md/dm-ioctl.c: In function 'next_target':
> include/linux/kern_levels.h:5:25: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'unsigned int' [-Werror=format=]
>     5 | #define KERN_SOH        "\001"          /* ASCII Start Of Header */
>       |                         ^~~~~~
> include/linux/printk.h:427:25: note: in definition of macro 'printk_index_wrap'
>   427 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
>       |                         ^~~~
> include/linux/printk.h:498:9: note: in expansion of macro 'printk'
>   498 |         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
>       |         ^~~~~~
> include/linux/kern_levels.h:11:25: note: in expansion of macro 'KERN_SOH'
>    11 | #define KERN_ERR        KERN_SOH "3"    /* error conditions */
>       |                         ^~~~~~~~
> include/linux/printk.h:498:16: note: in expansion of macro 'KERN_ERR'
>   498 |         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
>       |                ^~~~~~~~
> include/linux/device-mapper.h:626:25: note: in expansion of macro 'pr_err'
>   626 | #define DMERR(fmt, ...) pr_err(DM_FMT(fmt), ##__VA_ARGS__)
>       |                         ^~~~~~
> drivers/md/dm-ioctl.c:1421:17: note: in expansion of macro 'DMERR'
>  1421 |                 DMERR("Next dm_target_spec (offset %u) is not %lu-byte aligned",
>       |                 ^~~~~
> cc1: all warnings being treated as errors
> 
> Caused by commit
> 
>   5df1daff2cc6 ("dm ioctl: Check dm_target_spec is sufficiently aligned")

Ugh, sorry about that.  I’m pretty sure the code would actually work
okay at runtime since unsigned long and unsigned int are passed the same
way, but this is still a bug.

> I have applied the following patch for today:
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Fri, 23 Jun 2023 14:24:29 +1000
> Subject: [PATCH] fix up for "dm ioctl: Check dm_target_spec is sufficiently aligned"
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  drivers/md/dm-ioctl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c
> index 5f0b641538d8..8b480d7825fe 100644
> --- a/drivers/md/dm-ioctl.c
> +++ b/drivers/md/dm-ioctl.c
> @@ -1418,7 +1418,7 @@ static int next_target(struct dm_target_spec *last, uint32_t next, const char *e
>  	}
>  
>  	if (next % __alignof__(struct dm_target_spec)) {
> -		DMERR("Next dm_target_spec (offset %u) is not %lu-byte aligned",
> +		DMERR("Next dm_target_spec (offset %u) is not %zu-byte aligned",
>  		      next, __alignof__(struct dm_target_spec));
>  		return -EINVAL;
>  	}
> -- 
> 2.39.2

That fix is correct, thanks!
-- 
Sincerely,
Demi Marie Obenour (she/her/hers)
Invisible Things Lab

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2023-06-23 16:47 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-23  4:30 linux-next: build failure after merge of the device-mapper tree Stephen Rothwell
2023-06-23 16:47 ` Demi Marie Obenour [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-08-15  3:05 Stephen Rothwell
2025-08-15  8:05 ` Bagas Sanjaya
2025-08-15 15:21 ` Mikulas Patocka
2025-04-10  2:20 Stephen Rothwell
2024-02-07  3:40 Stephen Rothwell
2024-02-07  3:54 ` Matthew Sakai
2024-02-07 15:47 ` Mike Snitzer
2023-09-15  0:06 Stephen Rothwell
2021-02-11  3:36 Stephen Rothwell
2021-02-11 14:37 ` Mike Snitzer
2020-04-22  2:54 Stephen Rothwell
2018-12-06  6:21 Stephen Rothwell
2018-12-06 13:41 ` Mike Snitzer
2018-12-06 20:23   ` Stephen Rothwell
2018-05-31  4:23 Stephen Rothwell
2018-05-31  4:35 ` Jens Axboe
2018-05-31  4:38   ` Stephen Rothwell
2018-05-31 12:10   ` Mike Snitzer
2018-05-31 14:20     ` Jens Axboe
2018-05-31 14:22       ` Jens Axboe
2018-05-31 15:02         ` Jens Axboe
2018-05-31 21:42           ` Stephen Rothwell
2018-03-27  2:39 Stephen Rothwell
2018-03-27 15:39 ` Bart Van Assche
2017-06-19  2:27 Stephen Rothwell
2017-06-09  3:12 Stephen Rothwell
2017-06-09  4:28 ` Damien Le Moal
2017-06-09 11:59   ` Mike Snitzer
2016-03-04  2:59 Stephen Rothwell
2016-03-04  3:14 ` Mike Snitzer
2015-11-01 10:43 Stephen Rothwell
2015-11-01 13:44 ` Mike Snitzer
2015-07-05 23:27 Stephen Rothwell
2015-05-22  3:27 Stephen Rothwell
2015-05-22 12:49 ` Mike Snitzer
2015-05-22 13:26   ` Mike Snitzer
2015-05-22 14:58     ` Jens Axboe
2014-01-15  3:52 Stephen Rothwell
2014-01-15  4:30 ` Mike Snitzer
2013-11-05  2:51 Stephen Rothwell
2013-11-05  3:20 ` Mike Snitzer
2013-11-05  3:32   ` Stephen Rothwell
2013-11-05 12:54     ` Mike Snitzer
2013-11-05 16:22       ` Jens Axboe
2013-11-05 22:42         ` Stephen Rothwell
2013-11-05 22:44           ` Jens Axboe
2010-08-02  1:31 Stephen Rothwell
2010-08-02  6:44 ` Milan Broz
2010-08-02 11:34 ` Alasdair G Kergon
2010-06-30  2:57 Stephen Rothwell

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=ZJXMkd0eOEBnpUw2@itl-email \
    --to=demi@invisiblethingslab.com \
    --cc=agk@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    --cc=snitzer@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).