Linux Modules
 help / color / mirror / Atom feed
From: Luis Chamberlain <mcgrof@kernel.org>
To: Lucas De Marchi <lucas.de.marchi@gmail.com>
Cc: linux-modules@vger.kernel.org
Subject: Re: [PATCH 1/5] libkmod: Do not inititialize file->memory on open
Date: Tue, 6 Jun 2023 11:24:19 -0700	[thread overview]
Message-ID: <ZH950x7YoKajEj9V@bombadil.infradead.org> (raw)
In-Reply-To: <20230601224001.23397-2-lucas.de.marchi@gmail.com>

On Thu, Jun 01, 2023 at 03:39:57PM -0700, Lucas De Marchi wrote:
> diff --git a/libkmod/libkmod-file.c b/libkmod/libkmod-file.c
> index b6a8cc9..1449c41 100644
> --- a/libkmod/libkmod-file.c
> +++ b/libkmod/libkmod-file.c
> @@ -421,6 +421,7 @@ struct kmod_elf *kmod_file_get_elf(struct kmod_file *file)
>  	if (file->elf)
>  		return file->elf;
>  
> +	kmod_file_load_contents(file);
>  	file->elf = kmod_elf_new(file->memory, file->size);
>  	return file->elf;
>  }

<-- snip -->

> @@ -491,6 +492,14 @@ error:
>  	return file;
>  }
>  
> +int kmod_file_load_contents(struct kmod_file *file)
> +{
> +	if (file->memory)
> +		return 0;
> +
> +	return file->ops->load(file);
> +}

Should be void if we are not really going to be using the return
value when we use this routine?

  Luis

  reply	other threads:[~2023-06-06 18:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-01 22:39 [PATCH 0/5] libkmod: Use kernel decompression support Lucas De Marchi
2023-06-01 22:39 ` [PATCH 1/5] libkmod: Do not inititialize file->memory on open Lucas De Marchi
2023-06-06 18:24   ` Luis Chamberlain [this message]
2023-06-01 22:39 ` [PATCH 2/5] libkmod: Extract finit_module vs init_module paths Lucas De Marchi
2023-06-06 18:27   ` Luis Chamberlain
2023-06-01 22:39 ` [PATCH 3/5] libkmod: Keep track of compression type Lucas De Marchi
2023-06-06 18:28   ` Luis Chamberlain
2023-06-01 22:40 ` [PATCH 4/5] libkmod: Keep track of in-kernel compression support Lucas De Marchi
2023-06-06 18:29   ` Luis Chamberlain
2023-06-06 18:30   ` Luis Chamberlain
2023-06-01 22:40 ` [PATCH 5/5] libkmod: Use kernel decompression when available Lucas De Marchi
2023-06-06 18:38   ` Luis Chamberlain
2023-06-06 19:01     ` Lucas De Marchi
2023-07-24 13:28 ` [PATCH 0/5] libkmod: Use kernel decompression support Lucas De Marchi

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=ZH950x7YoKajEj9V@bombadil.infradead.org \
    --to=mcgrof@kernel.org \
    --cc=linux-modules@vger.kernel.org \
    --cc=lucas.de.marchi@gmail.com \
    /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