Linux-EFI Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] drivers: firmware: efi: fix gcc warning -Wint-conversion
@ 2019-06-15  4:02 Hariprasad Kelam
  2019-06-19  9:55 ` Ard Biesheuvel
  0 siblings, 1 reply; 6+ messages in thread
From: Hariprasad Kelam @ 2019-06-15  4:02 UTC (permalink / raw)
  To: Ard Biesheuvel, linux-efi, linux-kernel

This patch fixes below warning

drivers/firmware/efi/tpm.c:78:38: warning: passing argument 1 of
‘tpm2_calc_event_log_size’ makes pointer from integer without a cast
[-Wint-conversion]

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
---
 drivers/firmware/efi/tpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/efi/tpm.c b/drivers/firmware/efi/tpm.c
index 74d0cd1..1d3f5ca 100644
--- a/drivers/firmware/efi/tpm.c
+++ b/drivers/firmware/efi/tpm.c
@@ -75,7 +75,7 @@ int __init efi_tpm_eventlog_init(void)
 		goto out;
 	}
 
-	tbl_size = tpm2_calc_event_log_size(efi.tpm_final_log
+	tbl_size = tpm2_calc_event_log_size((void *)efi.tpm_final_log
 					    + sizeof(final_tbl->version)
 					    + sizeof(final_tbl->nr_events),
 					    final_tbl->nr_events,
-- 
2.7.4


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drivers: firmware: efi: fix gcc warning -Wint-conversion
  2019-06-15  4:02 [PATCH] drivers: firmware: efi: fix gcc warning -Wint-conversion Hariprasad Kelam
@ 2019-06-19  9:55 ` Ard Biesheuvel
  2019-06-19 22:48   ` Matthew Garrett
  0 siblings, 1 reply; 6+ messages in thread
From: Ard Biesheuvel @ 2019-06-19  9:55 UTC (permalink / raw)
  To: Hariprasad Kelam, Jarkko Sakkinen, tpmdd-devel, Matthew Garrett
  Cc: linux-efi, Linux Kernel Mailing List

(+ Jarkko, tpmdd, Matthew)

On Sat, 15 Jun 2019 at 06:02, Hariprasad Kelam
<hariprasad.kelam@gmail.com> wrote:
>
> This patch fixes below warning
>
> drivers/firmware/efi/tpm.c:78:38: warning: passing argument 1 of
> ‘tpm2_calc_event_log_size’ makes pointer from integer without a cast
> [-Wint-conversion]
>
> Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>

I think we already have a fix queued for this, no?

> ---
>  drivers/firmware/efi/tpm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/firmware/efi/tpm.c b/drivers/firmware/efi/tpm.c
> index 74d0cd1..1d3f5ca 100644
> --- a/drivers/firmware/efi/tpm.c
> +++ b/drivers/firmware/efi/tpm.c
> @@ -75,7 +75,7 @@ int __init efi_tpm_eventlog_init(void)
>                 goto out;
>         }
>
> -       tbl_size = tpm2_calc_event_log_size(efi.tpm_final_log
> +       tbl_size = tpm2_calc_event_log_size((void *)efi.tpm_final_log
>                                             + sizeof(final_tbl->version)
>                                             + sizeof(final_tbl->nr_events),
>                                             final_tbl->nr_events,
> --
> 2.7.4
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drivers: firmware: efi: fix gcc warning -Wint-conversion
  2019-06-19  9:55 ` Ard Biesheuvel
@ 2019-06-19 22:48   ` Matthew Garrett
  2019-06-20 21:37     ` Jarkko Sakkinen
  0 siblings, 1 reply; 6+ messages in thread
From: Matthew Garrett @ 2019-06-19 22:48 UTC (permalink / raw)
  To: Ard Biesheuvel
  Cc: Hariprasad Kelam, Jarkko Sakkinen, tpmdd-devel, linux-efi,
	Linux Kernel Mailing List

On Wed, Jun 19, 2019 at 2:55 AM Ard Biesheuvel
<ard.biesheuvel@linaro.org> wrote:
>
> (+ Jarkko, tpmdd, Matthew)
>
> On Sat, 15 Jun 2019 at 06:02, Hariprasad Kelam
> <hariprasad.kelam@gmail.com> wrote:
> >
> > This patch fixes below warning
> >
> > drivers/firmware/efi/tpm.c:78:38: warning: passing argument 1 of
> > ‘tpm2_calc_event_log_size’ makes pointer from integer without a cast
> > [-Wint-conversion]
> >
> > Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
>
> I think we already have a fix queued for this, no?

It looks like I fixed this in "Don't duplicate events from the final
event log in the TCG2 log" rather than a separate patch - I'm fine
merging this, based on Jarkko's preferences.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drivers: firmware: efi: fix gcc warning -Wint-conversion
  2019-06-19 22:48   ` Matthew Garrett
@ 2019-06-20 21:37     ` Jarkko Sakkinen
  2019-06-20 22:00       ` Matthew Garrett
  0 siblings, 1 reply; 6+ messages in thread
From: Jarkko Sakkinen @ 2019-06-20 21:37 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: Ard Biesheuvel, Hariprasad Kelam, tpmdd-devel, linux-efi,
	Linux Kernel Mailing List

On Wed, Jun 19, 2019 at 03:48:23PM -0700, Matthew Garrett wrote:
> On Wed, Jun 19, 2019 at 2:55 AM Ard Biesheuvel
> <ard.biesheuvel@linaro.org> wrote:
> >
> > (+ Jarkko, tpmdd, Matthew)
> >
> > On Sat, 15 Jun 2019 at 06:02, Hariprasad Kelam
> > <hariprasad.kelam@gmail.com> wrote:
> > >
> > > This patch fixes below warning
> > >
> > > drivers/firmware/efi/tpm.c:78:38: warning: passing argument 1 of
> > > ‘tpm2_calc_event_log_size’ makes pointer from integer without a cast
> > > [-Wint-conversion]
> > >
> > > Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
> >
> > I think we already have a fix queued for this, no?
> 
> It looks like I fixed this in "Don't duplicate events from the final
> event log in the TCG2 log" rather than a separate patch - I'm fine
> merging this, based on Jarkko's preferences.

Right! OK, I squashed just the fix to the earlier patch. Master and
next are updated. Can you take a peek of [1] and see if it looks
legit given all the fuzz around these changes? Then I'm confident
enough to do the 5.3 PR.

[1] git://git.infradead.org/users/jjs/linux-tpmdd.git

/Jarkko

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drivers: firmware: efi: fix gcc warning -Wint-conversion
  2019-06-20 21:37     ` Jarkko Sakkinen
@ 2019-06-20 22:00       ` Matthew Garrett
  2019-06-24 16:23         ` Jarkko Sakkinen
  0 siblings, 1 reply; 6+ messages in thread
From: Matthew Garrett @ 2019-06-20 22:00 UTC (permalink / raw)
  To: Jarkko Sakkinen
  Cc: Ard Biesheuvel, Hariprasad Kelam, tpmdd-devel, linux-efi,
	Linux Kernel Mailing List

On Thu, Jun 20, 2019 at 2:37 PM Jarkko Sakkinen
<jarkko.sakkinen@linux.intel.com> wrote:
> Right! OK, I squashed just the fix to the earlier patch. Master and
> next are updated. Can you take a peek of [1] and see if it looks
> legit given all the fuzz around these changes? Then I'm confident
> enough to do the 5.3 PR.

All looks good to me. Thanks!

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drivers: firmware: efi: fix gcc warning -Wint-conversion
  2019-06-20 22:00       ` Matthew Garrett
@ 2019-06-24 16:23         ` Jarkko Sakkinen
  0 siblings, 0 replies; 6+ messages in thread
From: Jarkko Sakkinen @ 2019-06-24 16:23 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: Ard Biesheuvel, Hariprasad Kelam, tpmdd-devel, linux-efi,
	Linux Kernel Mailing List

On Thu, 2019-06-20 at 15:00 -0700, Matthew Garrett wrote:
> On Thu, Jun 20, 2019 at 2:37 PM Jarkko Sakkinen
> <jarkko.sakkinen@linux.intel.com> wrote:
> > Right! OK, I squashed just the fix to the earlier patch. Master and
> > next are updated. Can you take a peek of [1] and see if it looks
> > legit given all the fuzz around these changes? Then I'm confident
> > enough to do the 5.3 PR.
> 
> All looks good to me. Thanks!

Thank you! I'll send the PR now.

/Jarkko


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, back to index

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-15  4:02 [PATCH] drivers: firmware: efi: fix gcc warning -Wint-conversion Hariprasad Kelam
2019-06-19  9:55 ` Ard Biesheuvel
2019-06-19 22:48   ` Matthew Garrett
2019-06-20 21:37     ` Jarkko Sakkinen
2019-06-20 22:00       ` Matthew Garrett
2019-06-24 16:23         ` Jarkko Sakkinen

Linux-EFI Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-efi/0 linux-efi/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-efi linux-efi/ https://lore.kernel.org/linux-efi \
		linux-efi@vger.kernel.org linux-efi@archiver.kernel.org
	public-inbox-index linux-efi


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-efi


AGPL code for this site: git clone https://public-inbox.org/ public-inbox