diff mbox series

lightnvm: remove minor version check for 2.0

Message ID 20180803090237.2022-1-mb@lightnvm.io (mailing list archive)
State New, archived
Headers show
Series lightnvm: remove minor version check for 2.0 | expand

Commit Message

Matias Bjorling Aug. 3, 2018, 9:02 a.m. UTC
A minor version number increase should not break backwards
compatibility.

Fixes: 3cb98f84d368b ("lightnvm: add minor version to generic geometry")
Signed-off-by: Matias Bjørling <mb@lightnvm.io>
---
 drivers/nvme/host/lightnvm.c | 6 ------
 1 file changed, 6 deletions(-)

Comments

Javier Gonzalez Aug. 3, 2018, 12:07 p.m. UTC | #1
> On 3 Aug 2018, at 11.02, Matias Bjørling <mb@lightnvm.io> wrote:
> 
> A minor version number increase should not break backwards
> compatibility.
> 
> Fixes: 3cb98f84d368b ("lightnvm: add minor version to generic geometry")
> Signed-off-by: Matias Bjørling <mb@lightnvm.io>
> ---
> drivers/nvme/host/lightnvm.c | 6 ------
> 1 file changed, 6 deletions(-)
> 
> diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c
> index d9e4cccd5b66..a156fe3ca7d3 100644
> --- a/drivers/nvme/host/lightnvm.c
> +++ b/drivers/nvme/host/lightnvm.c
> @@ -414,12 +414,6 @@ static int nvme_nvm_setup_20(struct nvme_nvm_id20 *id,
> 	/* Set compacted version for upper layers */
> 	geo->version = NVM_OCSSD_SPEC_20;
> 
> -	if (!(geo->major_ver_id == 2 && geo->minor_ver_id == 0)) {
> -		pr_err("nvm: OCSSD version not supported (v%d.%d)\n",
> -				geo->major_ver_id, geo->minor_ver_id);
> -		return -EINVAL;
> -	}
> -
> 	geo->num_ch = le16_to_cpu(id->num_grp);
> 	geo->num_lun = le16_to_cpu(id->num_pu);
> 	geo->all_luns = geo->num_ch * geo->num_lun;
> --
> 2.11.0

Looks good to me.

Reviewed-by: Javier González <javier@cnexlabs.com>
Matias Bjorling Aug. 5, 2018, 8:29 a.m. UTC | #2
On 8/3/18 2:07 PM, Javier Gonzalez wrote:
>> On 3 Aug 2018, at 11.02, Matias Bjørling <mb@lightnvm.io> wrote:
>>
>> A minor version number increase should not break backwards
>> compatibility.
>>
>> Fixes: 3cb98f84d368b ("lightnvm: add minor version to generic geometry")
>> Signed-off-by: Matias Bjørling <mb@lightnvm.io>
>> ---
>> drivers/nvme/host/lightnvm.c | 6 ------
>> 1 file changed, 6 deletions(-)
>>
>> diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c
>> index d9e4cccd5b66..a156fe3ca7d3 100644
>> --- a/drivers/nvme/host/lightnvm.c
>> +++ b/drivers/nvme/host/lightnvm.c
>> @@ -414,12 +414,6 @@ static int nvme_nvm_setup_20(struct nvme_nvm_id20 *id,
>> 	/* Set compacted version for upper layers */
>> 	geo->version = NVM_OCSSD_SPEC_20;
>>
>> -	if (!(geo->major_ver_id == 2 && geo->minor_ver_id == 0)) {
>> -		pr_err("nvm: OCSSD version not supported (v%d.%d)\n",
>> -				geo->major_ver_id, geo->minor_ver_id);
>> -		return -EINVAL;
>> -	}
>> -
>> 	geo->num_ch = le16_to_cpu(id->num_grp);
>> 	geo->num_lun = le16_to_cpu(id->num_pu);
>> 	geo->all_luns = geo->num_ch * geo->num_lun;
>> --
>> 2.11.0
> 
> Looks good to me.
> 
> Reviewed-by: Javier González <javier@cnexlabs.com>
> 

Hi Jens,

Would it be possible to pick this one up for 4.19?

Thank you!
Jens Axboe Aug. 5, 2018, 2:26 p.m. UTC | #3
On 8/5/18 2:29 AM, Matias Bjørling wrote:
> On 8/3/18 2:07 PM, Javier Gonzalez wrote:
>>> On 3 Aug 2018, at 11.02, Matias Bjørling <mb@lightnvm.io> wrote:
>>>
>>> A minor version number increase should not break backwards
>>> compatibility.
>>>
>>> Fixes: 3cb98f84d368b ("lightnvm: add minor version to generic geometry")
>>> Signed-off-by: Matias Bjørling <mb@lightnvm.io>
>>> ---
>>> drivers/nvme/host/lightnvm.c | 6 ------
>>> 1 file changed, 6 deletions(-)
>>>
>>> diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c
>>> index d9e4cccd5b66..a156fe3ca7d3 100644
>>> --- a/drivers/nvme/host/lightnvm.c
>>> +++ b/drivers/nvme/host/lightnvm.c
>>> @@ -414,12 +414,6 @@ static int nvme_nvm_setup_20(struct nvme_nvm_id20 *id,
>>> 	/* Set compacted version for upper layers */
>>> 	geo->version = NVM_OCSSD_SPEC_20;
>>>
>>> -	if (!(geo->major_ver_id == 2 && geo->minor_ver_id == 0)) {
>>> -		pr_err("nvm: OCSSD version not supported (v%d.%d)\n",
>>> -				geo->major_ver_id, geo->minor_ver_id);
>>> -		return -EINVAL;
>>> -	}
>>> -
>>> 	geo->num_ch = le16_to_cpu(id->num_grp);
>>> 	geo->num_lun = le16_to_cpu(id->num_pu);
>>> 	geo->all_luns = geo->num_ch * geo->num_lun;
>>> --
>>> 2.11.0
>>
>> Looks good to me.
>>
>> Reviewed-by: Javier González <javier@cnexlabs.com>
>>
> 
> Hi Jens,
> 
> Would it be possible to pick this one up for 4.19?

Done.
diff mbox series

Patch

diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c
index d9e4cccd5b66..a156fe3ca7d3 100644
--- a/drivers/nvme/host/lightnvm.c
+++ b/drivers/nvme/host/lightnvm.c
@@ -414,12 +414,6 @@  static int nvme_nvm_setup_20(struct nvme_nvm_id20 *id,
 	/* Set compacted version for upper layers */
 	geo->version = NVM_OCSSD_SPEC_20;
 
-	if (!(geo->major_ver_id == 2 && geo->minor_ver_id == 0)) {
-		pr_err("nvm: OCSSD version not supported (v%d.%d)\n",
-				geo->major_ver_id, geo->minor_ver_id);
-		return -EINVAL;
-	}
-
 	geo->num_ch = le16_to_cpu(id->num_grp);
 	geo->num_lun = le16_to_cpu(id->num_pu);
 	geo->all_luns = geo->num_ch * geo->num_lun;