mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-03 17:40:04 +00:00
powerpc/pseries/iommu: Fix set but not used values
The commitb7d6bf4fdd
("powerpc/pseries/pci: Remove obsolete SW invalidate") left 2 variables unused. arch/powerpc/platforms/pseries/iommu.c:108:17: warning: variable 'tces' set but not used __be64 *tcep, *tces; ^~~~ arch/powerpc/platforms/pseries/iommu.c:132:17: warning: variable 'tces' set but not used __be64 *tcep, *tces; ^~~~ Also, the commit68c0449ea1
("powerpc/pseries/iommu: Use memory@ nodes in max RAM address calculation") set "ranges" in ddw_memory_hotplug_max() but never use it. arch/powerpc/platforms/pseries/iommu.c: In function 'ddw_memory_hotplug_max': arch/powerpc/platforms/pseries/iommu.c:948:7: warning: variable 'ranges' set but not used int ranges, n_mem_addr_cells, n_mem_size_cells, len; ^~~~~~ Signed-off-by: Qian Cai <cai@lca.pw> Reviewed-by: Mukesh Ojha <mojha@codeaurora.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
parent
bff25143da
commit
c05f57fdc3
1 changed files with 5 additions and 8 deletions
|
@ -105,7 +105,7 @@ static int tce_build_pSeries(struct iommu_table *tbl, long index,
|
|||
unsigned long attrs)
|
||||
{
|
||||
u64 proto_tce;
|
||||
__be64 *tcep, *tces;
|
||||
__be64 *tcep;
|
||||
u64 rpn;
|
||||
|
||||
proto_tce = TCE_PCI_READ; // Read allowed
|
||||
|
@ -113,7 +113,7 @@ static int tce_build_pSeries(struct iommu_table *tbl, long index,
|
|||
if (direction != DMA_TO_DEVICE)
|
||||
proto_tce |= TCE_PCI_WRITE;
|
||||
|
||||
tces = tcep = ((__be64 *)tbl->it_base) + index;
|
||||
tcep = ((__be64 *)tbl->it_base) + index;
|
||||
|
||||
while (npages--) {
|
||||
/* can't move this out since we might cross MEMBLOCK boundary */
|
||||
|
@ -129,9 +129,9 @@ static int tce_build_pSeries(struct iommu_table *tbl, long index,
|
|||
|
||||
static void tce_free_pSeries(struct iommu_table *tbl, long index, long npages)
|
||||
{
|
||||
__be64 *tcep, *tces;
|
||||
__be64 *tcep;
|
||||
|
||||
tces = tcep = ((__be64 *)tbl->it_base) + index;
|
||||
tcep = ((__be64 *)tbl->it_base) + index;
|
||||
|
||||
while (npages--)
|
||||
*(tcep++) = 0;
|
||||
|
@ -945,7 +945,7 @@ static phys_addr_t ddw_memory_hotplug_max(void)
|
|||
|
||||
for_each_node_by_type(memory, "memory") {
|
||||
unsigned long start, size;
|
||||
int ranges, n_mem_addr_cells, n_mem_size_cells, len;
|
||||
int n_mem_addr_cells, n_mem_size_cells, len;
|
||||
const __be32 *memcell_buf;
|
||||
|
||||
memcell_buf = of_get_property(memory, "reg", &len);
|
||||
|
@ -955,9 +955,6 @@ static phys_addr_t ddw_memory_hotplug_max(void)
|
|||
n_mem_addr_cells = of_n_addr_cells(memory);
|
||||
n_mem_size_cells = of_n_size_cells(memory);
|
||||
|
||||
/* ranges in cell */
|
||||
ranges = (len >> 2) / (n_mem_addr_cells + n_mem_size_cells);
|
||||
|
||||
start = of_read_number(memcell_buf, n_mem_addr_cells);
|
||||
memcell_buf += n_mem_addr_cells;
|
||||
size = of_read_number(memcell_buf, n_mem_size_cells);
|
||||
|
|
Loading…
Reference in a new issue