Patch "of: address: Remove duplicated functions" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    of: address: Remove duplicated functions

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     of-address-remove-duplicated-functions.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit fccccf70fc3626e9ba04199a02b3b3bcf75b751d
Author: Herve Codina <herve.codina@xxxxxxxxxxx>
Date:   Tue Oct 17 13:02:17 2023 +0200

    of: address: Remove duplicated functions
    
    [ Upstream commit 3eb030c60835668997d5763b1a0c7938faf169f6 ]
    
    The recently added of_bus_default_flags_translate() performs the exact
    same operation as of_bus_pci_translate() and of_bus_isa_translate().
    
    Avoid duplicated code replacing both of_bus_pci_translate() and
    of_bus_isa_translate() with of_bus_default_flags_translate().
    
    Signed-off-by: Herve Codina <herve.codina@xxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20231017110221.189299-3-herve.codina@xxxxxxxxxxx
    Signed-off-by: Rob Herring <robh@xxxxxxxxxx>
    Stable-dep-of: 7f05e20b989a ("of: address: Preserve the flags portion on 1:1 dma-ranges mapping")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/of/address.c b/drivers/of/address.c
index dfd05cb2b2fc..cfe5a11b620a 100644
--- a/drivers/of/address.c
+++ b/drivers/of/address.c
@@ -217,10 +217,6 @@ static u64 of_bus_pci_map(__be32 *addr, const __be32 *range, int na, int ns,
 	return da - cp;
 }
 
-static int of_bus_pci_translate(__be32 *addr, u64 offset, int na)
-{
-	return of_bus_default_translate(addr + 1, offset, na - 1);
-}
 #endif /* CONFIG_PCI */
 
 /*
@@ -344,11 +340,6 @@ static u64 of_bus_isa_map(__be32 *addr, const __be32 *range, int na, int ns,
 	return da - cp;
 }
 
-static int of_bus_isa_translate(__be32 *addr, u64 offset, int na)
-{
-	return of_bus_default_translate(addr + 1, offset, na - 1);
-}
-
 static unsigned int of_bus_isa_get_flags(const __be32 *addr)
 {
 	unsigned int flags = 0;
@@ -379,7 +370,7 @@ static struct of_bus of_busses[] = {
 		.match = of_bus_pci_match,
 		.count_cells = of_bus_pci_count_cells,
 		.map = of_bus_pci_map,
-		.translate = of_bus_pci_translate,
+		.translate = of_bus_default_flags_translate,
 		.has_flags = true,
 		.get_flags = of_bus_pci_get_flags,
 	},
@@ -391,7 +382,7 @@ static struct of_bus of_busses[] = {
 		.match = of_bus_isa_match,
 		.count_cells = of_bus_isa_count_cells,
 		.map = of_bus_isa_map,
-		.translate = of_bus_isa_translate,
+		.translate = of_bus_default_flags_translate,
 		.has_flags = true,
 		.get_flags = of_bus_isa_get_flags,
 	},




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux