Skip to contentSkip to conversation

soc: loongson: Fix some issues about loongson2_guts

PATCH Applied Binbin Zhou 2 participants 4 messages Sep 1, 2023 – Sep 26, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover soc: loongson: Fix some issues about loongson2_guts

Hi All:

I noticed that there were some minor changes to loongson2_guts on the mailing list earlier, but they were put on hold because they were not cc'd to the appropriate people (Arnd & [email protected]).

I'd like to try to gather them together and resubmit them.

For patch[1], I modified the patch to use generic functions and simplify the code.

Original link:
patch[1]: https://lore.kernel.org/loongarch/[email protected]/
patch[2]: https://lore.kernel.org/loongarch/[email protected]/

Thanks.

Dongliang Mu (1):
soc: loongson: loongson2_guts: Convert to
devm_platform_ioremap_resource()

Mingtong Bao (1):
soc: loongson: loongson2_guts: Remove unneeded semicolon

 drivers/soc/loongson/loongson2_guts.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
Signature · 1 line
2.39.3
#1 lore raw

PATCH 1/2 soc: loongson: loongson2_guts: Convert to devm_platform_ioremap_resource()

From: Dongliang Mu <[email protected]>

Use devm_platform_ioremap_resource() to simplify code.

---
 drivers/soc/loongson/loongson2_guts.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/soc/loongson/loongson2_guts.c +1 -3
index bace4bc8e03b..d97c77a9a4a2 100644
@@ -94,7 +94,6 @@ static int loongson2_guts_probe(struct platform_device *pdev)
 {
 	struct device_node *root, *np = pdev->dev.of_node;
 	struct device *dev = &pdev->dev;
-	struct resource *res;
 	const struct loongson2_soc_die_attr *soc_die;
 	const char *machine;
 	u32 svr;
@@ -106,8 +105,7 @@ static int loongson2_guts_probe(struct platform_device *pdev)
 
 	guts->little_endian = of_property_read_bool(np, "little-endian");
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	guts->regs = ioremap(res->start, res->end - res->start + 1);
+	guts->regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(guts->regs))
 		return PTR_ERR(guts->regs);
 
Signature · 1 line
2.39.3
#2 lore raw

PATCH 2/2 soc: loongson: loongson2_guts: Remove unneeded semicolon

In reply to Binbin Zhou

From: Mingtong Bao <[email protected]>

No functional modification involved.

./drivers/soc/loongson/loongson2_guts.c:73:2-3: Unneeded semicolon.

---
 drivers/soc/loongson/loongson2_guts.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/loongson/loongson2_guts.c +1 -1
index d97c77a9a4a2..9a469779eea7 100644
@@ -70,7 +70,7 @@ static const struct loongson2_soc_die_attr *loongson2_soc_die_match(
 		if (matches->svr == (svr & matches->mask))
 			return matches;
 		matches++;
-	};
+	}
 
 	return NULL;
 }
Signature · 1 line
2.39.3
#3 lore raw
In reply to Binbin Zhou
This series was applied to soc/soc.git (arm/fixes) by Arnd Bergmann <[email protected]>:

Hello:

This series was applied to soc/soc.git (arm/fixes) by Arnd Bergmann <[email protected]>:

Quoted 9 lines · On Fri, 1 Sep 2023 14:25:47 +0800 you wrote:

Hi All:

I noticed that there were some minor changes to loongson2_guts on the mailing list earlier, but they were put on hold because they were not cc'd to the appropriate people (Arnd & [email protected]).

I'd like to try to gather them together and resubmit them.

[...]

Here is the summary with links:
- [1/2] soc: loongson: loongson2_guts: Convert to devm_platform_ioremap_resource()

    https://git.kernel.org/soc/soc/c/840844c26239
  - [2/2] soc: loongson: loongson2_guts: Remove unneeded semicolon
    https://git.kernel.org/soc/soc/c/e756ce123c9a

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html