lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <158692631073.105027.12648118734810371009@swboyd.mtv.corp.google.com>
Date:   Tue, 14 Apr 2020 21:51:50 -0700
From:   Stephen Boyd <swboyd@...omium.org>
To:     Andy Gross <agross@...nel.org>,
        Stephen Rothwell <sfr@...b.auug.org.au>
Cc:     Linux Next Mailing List <linux-next@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Bjorn Andersson <bjorn.andersson@...aro.org>
Subject: Re: linux-next: build warning after merge of the qcom tree

Quoting Stephen Rothwell (2020-04-14 17:25:34)
> Hi all,
> 
> After merging the qcom tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
> 
> drivers/soc/qcom/cmd-db.c: In function 'cmd_db_debugfs_dump':
> drivers/soc/qcom/cmd-db.c:281:30: warning: field width specifier '*' expects argument of type 'int', but argument 4 has type 'long unsigned int' [-Wformat=]
>   281 |    seq_printf(seq, "0x%08x: %*pEp", le32_to_cpu(ent->addr),
>       |                             ~^~
>       |                              |
>       |                              int
>   282 |        sizeof(ent->id), ent->id);
>       |        ~~~~~~~~~~~~~~~        
>       |        |
>       |        long unsigned int
> 
> Introduced by commit
> 
>   d6815c5c43d4 ("soc: qcom: cmd-db: Add debugfs dumping file")

Thanks. I didn't notice this warning. Looks like we need to cast
sizeof() to int? Bjorn do you want another patch or does this get
squashed in?

---8<----
diff --git a/drivers/soc/qcom/cmd-db.c b/drivers/soc/qcom/cmd-db.c
index 6c308f92a13c..6b5c440c9dc3 100644
--- a/drivers/soc/qcom/cmd-db.c
+++ b/drivers/soc/qcom/cmd-db.c
@@ -280,7 +280,7 @@ static int cmd_db_debugfs_dump(struct seq_file *seq, void *p)
 		ent = rsc_to_entry_header(rsc);
 		for (j = 0; j < le16_to_cpu(rsc->cnt); j++, ent++) {
 			seq_printf(seq, "0x%08x: %*pEp", le32_to_cpu(ent->addr),
-				   sizeof(ent->id), ent->id);
+				   (int)sizeof(ent->id), ent->id);
 
 			len = le16_to_cpu(ent->len);
 			if (len) {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ