* [PATCH] efi: Fix compiler warnings (unused, const, type)
@ 2014-06-02 10:31 Catalin Marinas
2014-06-02 11:31 ` Fleming, Matt
0 siblings, 1 reply; 2+ messages in thread
From: Catalin Marinas @ 2014-06-02 10:31 UTC (permalink / raw)
To: Matt Fleming; +Cc: linux-efi, linux-kernel
This patch fixes a few compiler warning in the efi code for unused
variable, discarding const qualifier and wrong pointer type:
drivers/firmware/efi/fdt.c|66 col 22| warning: unused variable ‘name’ [-Wunused-variable]
drivers/firmware/efi/efi.c|368 col 3| warning: passing argument 3 of ‘of_get_flat_dt_prop’ from incompatible pointer type [enabled by default]
drivers/firmware/efi/efi.c|368 col 8| warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
---
Matt,
Unless you have fixed these already, please consider applying (warnings in
latest next/master branch).
Thanks,
Catalin
drivers/firmware/efi/efi.c | 6 +++---
drivers/firmware/efi/fdt.c | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
index cd36deb619fa..eff1a2f22f09 100644
--- a/drivers/firmware/efi/efi.c
+++ b/drivers/firmware/efi/efi.c
@@ -353,10 +353,10 @@ static int __init fdt_find_uefi_params(unsigned long node, const char *uname,
int depth, void *data)
{
struct param_info *info = data;
- void *prop, *dest;
- unsigned long len;
+ const void *prop;
+ void *dest;
u64 val;
- int i;
+ int i, len;
if (depth != 1 ||
(strcmp(uname, "chosen") != 0 && strcmp(uname, "chosen@0") != 0))
diff --git a/drivers/firmware/efi/fdt.c b/drivers/firmware/efi/fdt.c
index 5c6a8e8a9580..82d774161cc9 100644
--- a/drivers/firmware/efi/fdt.c
+++ b/drivers/firmware/efi/fdt.c
@@ -63,7 +63,7 @@ static efi_status_t update_fdt(efi_system_table_t *sys_table, void *orig_fdt,
*/
prev = 0;
for (;;) {
- const char *type, *name;
+ const char *type;
int len;
node = fdt_next_node(fdt, prev, NULL);
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] efi: Fix compiler warnings (unused, const, type)
2014-06-02 10:31 [PATCH] efi: Fix compiler warnings (unused, const, type) Catalin Marinas
@ 2014-06-02 11:31 ` Fleming, Matt
0 siblings, 0 replies; 2+ messages in thread
From: Fleming, Matt @ 2014-06-02 11:31 UTC (permalink / raw)
To: Catalin Marinas; +Cc: linux-efi, linux-kernel
On 2 June 2014 11:31, Catalin Marinas <catalin.marinas@arm.com> wrote:
> This patch fixes a few compiler warning in the efi code for unused
> variable, discarding const qualifier and wrong pointer type:
>
> drivers/firmware/efi/fdt.c|66 col 22| warning: unused variable ‘name’ [-Wunused-variable]
> drivers/firmware/efi/efi.c|368 col 3| warning: passing argument 3 of ‘of_get_flat_dt_prop’ from incompatible pointer type [enabled by default]
> drivers/firmware/efi/efi.c|368 col 8| warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
>
> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
> ---
>
> Matt,
>
> Unless you have fixed these already, please consider applying (warnings in
> latest next/master branch).
Thanks, applied to arm64-efi.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-02 11:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-02 10:31 [PATCH] efi: Fix compiler warnings (unused, const, type) Catalin Marinas
2014-06-02 11:31 ` Fleming, Matt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®