[PATCH v7 2/3] thunderbolt: Modify tb_nvm major and minor size.

Szuying Chen posted 3 patches 3 years, 7 months ago
There is a newer version of this series
[PATCH v7 2/3] thunderbolt: Modify tb_nvm major and minor size.
Posted by Szuying Chen 3 years, 7 months ago
From: Szuying Chen <Chloe_Chen@asmedia.com.tw>

The patch modify tb_nvm->major and tb_nvm->minor size to u32 that support
diffrent vendor's NVM version show.

Signed-off-by: Szuying Chen <Chloe_Chen@asmedia.com.tw>
---
Modify tb_nvm->major and tb_nvm->minor size to u32.

 drivers/thunderbolt/tb.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/thunderbolt/tb.h b/drivers/thunderbolt/tb.h
index fc32737fcde4..9cf62d5f25d2 100644
--- a/drivers/thunderbolt/tb.h
+++ b/drivers/thunderbolt/tb.h
@@ -50,8 +50,8 @@
  */
 struct tb_nvm {
 	struct device *dev;
-	u8 major;
-	u8 minor;
+	u32 major;
+	u32 minor;
 	int id;
 	struct nvmem_device *active;
 	struct nvmem_device *non_active;
--
2.34.1
Re: [PATCH v7 2/3] thunderbolt: Modify tb_nvm major and minor size.
Posted by Mario Limonciello 3 years, 7 months ago
On 8/29/22 06:10, Szuying Chen wrote:
> From: Szuying Chen <Chloe_Chen@asmedia.com.tw>
> 
> The patch modify tb_nvm->major and tb_nvm->minor size to u32 that support
> diffrent vendor's NVM version show.

s/diffrent/different/

I would suggest you explain the WHY of this patch.  I would have worded 
it something like this:

Intel's version can be stored in 2 bytes, but ASMedia's version requires 
8 bytes.  Extend the 'major' and 'minor' members of the tb_nvm structure 
to support both vendors.

> 
> Signed-off-by: Szuying Chen <Chloe_Chen@asmedia.com.tw>
> ---
> Modify tb_nvm->major and tb_nvm->minor size to u32.

The idea with the changelog below the cutline is supposed to help 
reviewers know what to focus on when reviewing from one patch to another.

In general it's best to specify what changed from which patch to which 
past the cut line.

For example if this was first patch version that introduced the change 
it should be something like:

v6->v7:
  * New patch based on suggestion by Mario


> 
>   drivers/thunderbolt/tb.h | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/thunderbolt/tb.h b/drivers/thunderbolt/tb.h
> index fc32737fcde4..9cf62d5f25d2 100644
> --- a/drivers/thunderbolt/tb.h
> +++ b/drivers/thunderbolt/tb.h
> @@ -50,8 +50,8 @@
>    */
>   struct tb_nvm {
>   	struct device *dev;
> -	u8 major;
> -	u8 minor;
> +	u32 major;
> +	u32 minor;
>   	int id;
>   	struct nvmem_device *active;
>   	struct nvmem_device *non_active;
> --
> 2.34.1
>