From: Russ Weight <russell.h.weight@intel.com>
To: mcgrof@kernel.org, rafael@kernel.org, linux-kernel@vger.kernel.org
Cc: trix@redhat.com, lgoncalv@redhat.com, yilun.xu@intel.com,
hao.wu@intel.com, matthew.gerlach@linux.intel.com,
basheer.ahmed.muddebihal@intel.com, tianfei.zhang@intel.com,
Russ Weight <russell.h.weight@intel.com>
Subject: [PATCH v3 1/8] firmware_loader: Clear data and size in fw_free_paged_buf
Date: Mon, 18 Apr 2022 15:37:46 -0700 [thread overview]
Message-ID: <20220418223753.639058-2-russell.h.weight@intel.com> (raw)
In-Reply-To: <20220418223753.639058-1-russell.h.weight@intel.com>
The fw_free_paged_buf() function resets the paged buffer information in
the fw_priv data structure. Additionally, clear the data and size members
of fw_priv in order to facilitate the reuse of fw_priv. This is being
done in preparation for enabling userspace to initiate multiple firmware
uploads using this sysfs interface.
Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Russ Weight <russell.h.weight@intel.com>
---
v1:
- No change from RFC patch
v2:
- No change
v3:
- Added Reviewed-by tag
---
drivers/base/firmware_loader/main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/base/firmware_loader/main.c b/drivers/base/firmware_loader/main.c
index 94d1789a233e..2cc11d93753a 100644
--- a/drivers/base/firmware_loader/main.c
+++ b/drivers/base/firmware_loader/main.c
@@ -253,6 +253,8 @@ void fw_free_paged_buf(struct fw_priv *fw_priv)
fw_priv->pages = NULL;
fw_priv->page_array_size = 0;
fw_priv->nr_pages = 0;
+ fw_priv->data = NULL;
+ fw_priv->size = 0;
}
int fw_grow_paged_buf(struct fw_priv *fw_priv, int pages_needed)
--
2.25.1
next prev parent reply other threads:[~2022-04-18 22:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-18 22:37 [PATCH v3 0/8] Extend FW framework for user FW uploads Russ Weight
2022-04-18 22:37 ` Russ Weight [this message]
2022-04-18 22:37 ` [PATCH v3 2/8] firmware_loader: Check fw_state_is_done in loading_store Russ Weight
2022-04-18 22:37 ` [PATCH v3 3/8] firmware_loader: Split sysfs support from fallback Russ Weight
2022-04-19 0:41 ` kernel test robot
2022-04-18 22:37 ` [PATCH v3 4/8] firmware_loader: Add firmware-upload support Russ Weight
2022-04-19 15:23 ` kernel test robot
2022-04-18 22:37 ` [PATCH v3 5/8] firmware_loader: Add sysfs nodes to monitor fw_upload Russ Weight
2022-04-18 22:37 ` [PATCH v3 6/8] test_firmware: Add test support for firmware upload Russ Weight
2022-04-18 22:37 ` [PATCH v3 7/8] test_firmware: Error injection " Russ Weight
2022-04-18 22:37 ` [PATCH v3 8/8] selftests: firmware: Add firmware upload selftests Russ Weight
2022-04-19 8:44 ` [PATCH v3 0/8] Extend FW framework for user FW uploads Zhang, Tianfei
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=20220418223753.639058-2-russell.h.weight@intel.com \
--to=russell.h.weight@intel.com \
--cc=basheer.ahmed.muddebihal@intel.com \
--cc=hao.wu@intel.com \
--cc=lgoncalv@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew.gerlach@linux.intel.com \
--cc=mcgrof@kernel.org \
--cc=rafael@kernel.org \
--cc=tianfei.zhang@intel.com \
--cc=trix@redhat.com \
--cc=yilun.xu@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.