Re: [PATCH] thunderbolt: thunderbolt: add vendor's NVM formats

From: Greg KH
Date: Wed Aug 10 2022 - 06:41:53 EST


On Wed, Aug 10, 2022 at 06:17:43PM +0800, Szuying Chen wrote:
> The patch add tb_nvm_quirks() contain an array that has functions
> pointers to tb_nvm_vendor_apply().
> And tb_nvm_vendor_apply() that recognize supported vendor works in one
> of the following cases:
> Case NvmUpgradeSuppport: enable nvm's attribute by setting
> no_nvm_upgrade flag to create nvm_authenticate file node.
> Case NvmAdd:add active/non-active NVM devices.
> Case NvmWrite:update firmware to non-ative NVM device.
>
> Signed-off-by: Szuying Chen <chensiying21@xxxxxxxxx>
> ---
> drivers/thunderbolt/nvm.c | 59 ++++++++++++++----------------------
> drivers/thunderbolt/switch.c | 19 +++++++-----
> drivers/thunderbolt/tb.h | 18 +++++++----
> 3 files changed, 46 insertions(+), 50 deletions(-)
>
> diff --git a/drivers/thunderbolt/nvm.c b/drivers/thunderbolt/nvm.c
> index d5f283889da8..2aae8b3fa5dc 100644
> --- a/drivers/thunderbolt/nvm.c
> +++ b/drivers/thunderbolt/nvm.c
> @@ -14,6 +14,7 @@
> #include "tb.h"
>
> static DEFINE_IDA(nvm_ida);
> +
> static int tb_switch_nvm_read(void *priv, unsigned int offset, void *val,
> size_t bytes)
> {
> @@ -22,7 +23,6 @@ static int tb_switch_nvm_read(void *priv, unsigned int offset, void *val,
> int ret;
>
> pm_runtime_get_sync(&sw->dev);
> -
> if (!mutex_trylock(&sw->tb->lock)) {
> ret = restart_syscall();
> goto out;

These are odd whitespace changes that you do not discuss in your
changelog, which means we can't take this. Also, whitespace cleanups
should be in a separate commit.

thanks,

greg k-h