Skip to contentSkip to conversation

platform/x86/intel/ifs: Remove unnecessary ret init

PATCH In review Ilpo Järvinen 2 participants 5 messages Jan 25, 2024 – Jan 31, 2024

Subsystems (2)
lore
Share & tools
lore

Ilpo Järvinen

author maintainer
#0 lore raw

PATCH 1/1 platform/x86/intel/ifs: Remove unnecessary ret init

ret variable is assigned unconditionally in ifs_load_firmware(), thus remove the unnecessary initialization of it.

---
 drivers/platform/x86/intel/ifs/load.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/intel/ifs/load.c +1 -1
index a1ee1a74fc3c..03e49b836a6b 100644
@@ -383,7 +383,7 @@ int ifs_load_firmware(struct device *dev)
 	unsigned int expected_size;
 	const struct firmware *fw;
 	char scan_path[64];
-	int ret = -EINVAL;
+	int ret;
 
 	snprintf(scan_path, sizeof(scan_path), "intel/ifs_%d/%02x-%02x-%02x-%02x.scan",
 		 test->test_num, boot_cpu_data.x86, boot_cpu_data.x86_model,
Signature · 1 line
2.39.2
#1 lore raw

Hi Ilpo

thanks for looking into it.

Quoted 13 lines · Ilpo Järvinen

ret variable is assigned unconditionally in ifs_load_firmware(), thus remove the unnecessary initialization of it.

---
 drivers/platform/x86/intel/ifs/load.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/intel/ifs/load.c +0 -0
index a1ee1a74fc3c..03e49b836a6b 100644

drivers/platform/x86/intel/ifs/load.c int ifs_load_firmware(struct device *dev) · line 387

Quoted 6 lines
drivers/platform/x86/intel/ifs/load.c +1 -1
@@ -383,7 +383,7 @@ int ifs_load_firmware(struct device *dev)
 	unsigned int expected_size;
 	const struct firmware *fw;
 	char scan_path[64];
-	int ret = -EINVAL;
+	int ret;
 

Looks reasonable to me.

I can keep this as a separate cleanup patch, or merge the change in this patch.

What ever Hans/You prefer.

Cheers,
Ashok

author maintainer
#2 lore raw
Quoted 27 lines · Ashok Raj

Hi Ilpo

thanks for looking into it.

Quoted 13 lines · Ilpo Järvinen

ret variable is assigned unconditionally in ifs_load_firmware(), thus remove the unnecessary initialization of it.

---
 drivers/platform/x86/intel/ifs/load.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/intel/ifs/load.c +0 -0
index a1ee1a74fc3c..03e49b836a6b 100644

drivers/platform/x86/intel/ifs/load.c int ifs_load_firmware(struct device *dev) · line 387

Quoted 6 lines
drivers/platform/x86/intel/ifs/load.c +1 -1
@@ -383,7 +383,7 @@ int ifs_load_firmware(struct device *dev)
 	unsigned int expected_size;
 	const struct firmware *fw;
 	char scan_path[64];
-	int ret = -EINVAL;
+	int ret;
 

Looks reasonable to me.

Quoted 4 lines

I can keep this as a separate cleanup patch, or merge the change in this patch.

What ever Hans/You prefer.

Hi,

I was thinking of merging it myself into pdx86 review-ilpo -> next after allowing it sit on the queue a day or two. IMO, doesn't need to be more complicated than the usual process kernel process with patches, it would just take extra time from all the more there are middlemens handling the patch (after all this is just a trivial cleanup which I noticed while reviewing the patches you sent and since it didn't conflict the series, I just sent the obvious cleanup).

But that's assuming you don't have anything conflicting beyond those patches which you sent? If that's the case, it would be better for you to take care of it so just let me and I won't merge it myself until it comes back.

Signature · 1 line
 i.
Reviewed-by
#3 lore raw
Quoted 2 lines · Ilpo Järvinen

On Thu, 25 Jan 2024, Ashok Raj wrote:

[snip]

Quoted 11 lines

Hi,

I was thinking of merging it myself into pdx86 review-ilpo -> next after allowing it sit on the queue a day or two. IMO, doesn't need to be more complicated than the usual process kernel process with patches, it would just take extra time from all the more there are middlemens handling the patch (after all this is just a trivial cleanup which I noticed while reviewing the patches you sent and since it didn't conflict the series, I just sent the obvious cleanup).

Quoted 4 lines

But that's assuming you don't have anything conflicting beyond those patches which you sent? If that's the case, it would be better for you to take care of it so just let me and I won't merge it myself until it comes back.

I don't have anything beyond this that conflicts with this change.

Feel free to add

author maintainer
#4 lore raw
In reply to Ilpo Järvinen
Quoted 4 lines · Ilpo Järvinen

ret variable is assigned unconditionally in ifs_load_firmware(), thus remove the unnecessary initialization of it.

Thank you for your contribution, it has been applied to my local review-ilpo branch. Note it will show up in the public platform-drivers-x86/review-ilpo branch only once I've pushed my local branch there, which might take a while.

The list of commits applied:
[1/1] platform/x86/intel/ifs: Remove unnecessary ret init

      commit: 682c259a849610c7864cc75d52415c782c78653a

--
i.