2021-07-08 15:26:35

by Carlos Bilbao

[permalink] [raw]
Subject: [PATCH] drivers: parisc: Follow the indentation coding standard on printks

Fix indentation of printks that start at the beginning of the line. Change this
for the right number of space characters, or tabs if the file uses them.

Signed-off-by: Carlos Bilbao <[email protected]>
---
drivers/parisc/iosapic.c | 4 ++--
drivers/parisc/sba_iommu.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/parisc/iosapic.c b/drivers/parisc/iosapic.c
index 8a3b0c3a1e92..5d27c23e6429 100644
--- a/drivers/parisc/iosapic.c
+++ b/drivers/parisc/iosapic.c
@@ -633,7 +633,7 @@ static void iosapic_unmask_irq(struct irq_data *d)
printk("\n");
}

-printk("iosapic_enable_irq(): sel ");
+ printk("iosapic_enable_irq(): sel ");
{
struct iosapic_info *isp = vi->iosapic;

@@ -642,7 +642,7 @@ printk("iosapic_enable_irq(): sel ");
printk(" %x", d1);
}
}
-printk("\n");
+ printk("\n");
#endif

/*
diff --git a/drivers/parisc/sba_iommu.c b/drivers/parisc/sba_iommu.c
index dce4cdf786cd..c3381facdfc5 100644
--- a/drivers/parisc/sba_iommu.c
+++ b/drivers/parisc/sba_iommu.c
@@ -1550,7 +1550,7 @@ static void sba_hw_init(struct sba_device *sba_dev)


#if 0
-printk("sba_hw_init(): mem_boot 0x%x 0x%x 0x%x 0x%x\n", PAGE0->mem_boot.hpa,
+ printk("sba_hw_init(): mem_boot 0x%x 0x%x 0x%x 0x%x\n", PAGE0->mem_boot.hpa,
PAGE0->mem_boot.spa, PAGE0->mem_boot.pad, PAGE0->mem_boot.cl_class);

/*
--
2.25.1





2021-07-08 16:48:26

by Joe Perches

[permalink] [raw]
Subject: Re: [PATCH] drivers: parisc: Follow the indentation coding standard on printks

On Thu, 2021-07-08 at 11:25 -0400, Carlos Bilbao wrote:
> Fix indentation of printks that start at the beginning of the line. Change this
> for the right number of space characters, or tabs if the file uses them.

These are ancient codes, but:

> diff --git a/drivers/parisc/iosapic.c b/drivers/parisc/iosapic.c
[]
> @@ -633,7 +633,7 @@ static void iosapic_unmask_irq(struct irq_data *d)
> ? printk("\n");
> ?}
> ?
>
> -printk("iosapic_enable_irq(): sel ");
> + printk("iosapic_enable_irq(): sel ");
> ?{
> ? struct iosapic_info *isp = vi->iosapic;
> ?
>
> @@ -642,7 +642,7 @@ printk("iosapic_enable_irq(): sel ");
> ? printk(" %x", d1);
> ? }
> ?}
> -printk("\n");
> + printk("\n");
> ?#endif

This is in an undefined #ifdef block and the block could be deleted.

> diff --git a/drivers/parisc/sba_iommu.c b/drivers/parisc/sba_iommu.c
[]
> @@ -1550,7 +1550,7 @@ static void sba_hw_init(struct sba_device *sba_dev)
> ?
>
> ?
>
> ?#if 0

#if 0 blocks can be removed.

> -printk("sba_hw_init(): mem_boot 0x%x 0x%x 0x%x 0x%x\n", PAGE0->mem_boot.hpa,
> + printk("sba_hw_init(): mem_boot 0x%x 0x%x 0x%x 0x%x\n", PAGE0->mem_boot.hpa,
> ? PAGE0->mem_boot.spa, PAGE0->mem_boot.pad, PAGE0->mem_boot.cl_class);
> ?
>
> ? /*


2021-07-08 17:42:20

by Carlos Bilbao

[permalink] [raw]
Subject: [PATCH net-next v2] drivers: parisc: Remove unnecessary #if blocks

Remove undefined #ifdefs and #if 0 from these two files.

Signed-off-by: Carlos Bilbao <[email protected]>
---
drivers/parisc/iosapic.c | 21 -------------
drivers/parisc/sba_iommu.c | 63 --------------------------------------
2 files changed, 84 deletions(-)

diff --git a/drivers/parisc/iosapic.c b/drivers/parisc/iosapic.c
index 8a3b0c3a1e92..5ca80beb12cf 100644
--- a/drivers/parisc/iosapic.c
+++ b/drivers/parisc/iosapic.c
@@ -624,27 +624,6 @@ static void iosapic_unmask_irq(struct irq_data *d)
iosapic_set_irt_data(vi, &d0, &d1);
iosapic_wr_irt_entry(vi, d0, d1);

-#ifdef DEBUG_IOSAPIC_IRT
-{
- u32 *t = (u32 *) ((ulong) vi->eoi_addr & ~0xffUL);
- printk("iosapic_enable_irq(): regs %p", vi->eoi_addr);
- for ( ; t < vi->eoi_addr; t++)
- printk(" %x", readl(t));
- printk("\n");
-}
-
-printk("iosapic_enable_irq(): sel ");
-{
- struct iosapic_info *isp = vi->iosapic;
-
- for (d0=0x10; d0<0x1e; d0++) {
- d1 = iosapic_read(isp->addr, d0);
- printk(" %x", d1);
- }
-}
-printk("\n");
-#endif
-
/*
* Issuing I/O SAPIC an EOI causes an interrupt IFF IRQ line is
* asserted. IRQ generally should not be asserted when a driver
diff --git a/drivers/parisc/sba_iommu.c b/drivers/parisc/sba_iommu.c
index dce4cdf786cd..98bbf40410eb 100644
--- a/drivers/parisc/sba_iommu.c
+++ b/drivers/parisc/sba_iommu.c
@@ -623,13 +623,6 @@ sba_mark_invalid(struct ioc *ioc, dma_addr_t iova, size_t byte_cnt)

if (byte_cnt > IOVP_SIZE)
{
-#if 0
- unsigned long entries_per_cacheline = ioc_needs_fdc ?
- L1_CACHE_ALIGN(((unsigned long) pdir_ptr))
- - (unsigned long) pdir_ptr;
- : 262144;
-#endif
-
/* set "size" field for PCOM */
iovp |= get_order(byte_cnt) + PAGE_SHIFT;

@@ -637,11 +630,6 @@ sba_mark_invalid(struct ioc *ioc, dma_addr_t iova, size_t byte_cnt)
/* clear I/O Pdir entry "valid" bit first */
((u8 *) pdir_ptr)[7] = 0;
asm_io_fdc(pdir_ptr);
- if (ioc_needs_fdc) {
-#if 0
- entries_per_cacheline = L1_CACHE_SHIFT - 3;
-#endif
- }
pdir_ptr++;
byte_cnt -= IOVP_SIZE;
} while (byte_cnt > IOVP_SIZE);
@@ -1081,36 +1069,6 @@ static const struct dma_map_ops sba_ops = {
.free_pages = dma_common_free_pages,
};

-
-/**************************************************************************
-**
-** SBA PAT PDC support
-**
-** o call pdc_pat_cell_module()
-** o store ranges in PCI "resource" structures
-**
-**************************************************************************/
-
-static void
-sba_get_pat_resources(struct sba_device *sba_dev)
-{
-#if 0
-/*
-** TODO/REVISIT/FIXME: support for directed ranges requires calls to
-** PAT PDC to program the SBA/LBA directed range registers...this
-** burden may fall on the LBA code since it directly supports the
-** PCI subsystem. It's not clear yet. - ggg
-*/
-PAT_MOD(mod)->mod_info.mod_pages = PAT_GET_MOD_PAGES(temp);
- FIXME : ???
-PAT_MOD(mod)->mod_info.dvi = PAT_GET_DVI(temp);
- Tells where the dvi bits are located in the address.
-PAT_MOD(mod)->mod_info.ioc = PAT_GET_IOC(temp);
- FIXME : ???
-#endif
-}
-
-
/**************************************************************
*
* Initialization and claim
@@ -1548,26 +1506,6 @@ static void sba_hw_init(struct sba_device *sba_dev)

}

-
-#if 0
-printk("sba_hw_init(): mem_boot 0x%x 0x%x 0x%x 0x%x\n", PAGE0->mem_boot.hpa,
- PAGE0->mem_boot.spa, PAGE0->mem_boot.pad, PAGE0->mem_boot.cl_class);
-
- /*
- ** Need to deal with DMA from LAN.
- ** Maybe use page zero boot device as a handle to talk
- ** to PDC about which device to shutdown.
- **
- ** Netbooting, j6k v5.0 firmware says:
- ** mem_boot hpa 0xf4008000 sba 0x0 pad 0x0 cl_class 0x1002
- ** ARGH! invalid class.
- */
- if ((PAGE0->mem_boot.cl_class != CL_RANDOM)
- && (PAGE0->mem_boot.cl_class != CL_SEQU)) {
- pdc_io_reset();
- }
-#endif
-
if (!IS_PLUTO(sba_dev->dev)) {
ioc_ctl = READ_REG(sba_dev->sba_hpa+IOC_CTRL);
DBG_INIT("%s() hpa 0x%lx ioc_ctl 0x%Lx ->",
@@ -1948,7 +1886,6 @@ static int __init sba_driver_callback(struct parisc_device *dev)
sba_dev->name = dev->name;
sba_dev->sba_hpa = sba_addr;

- sba_get_pat_resources(sba_dev);
sba_hw_init(sba_dev);
sba_common_init(sba_dev);

--
2.25.1



2021-07-08 18:04:50

by Andrew Lunn

[permalink] [raw]
Subject: Re: [PATCH net-next v2] drivers: parisc: Remove unnecessary #if blocks

On Thu, Jul 08, 2021 at 01:40:54PM -0400, Carlos Bilbao wrote:
> Remove undefined #ifdefs and #if 0 from these two files.

Hi Carlos

This is not a network driver, so putting net-next in the subject is
not useful.

Also, at the moment, we are in the merge window. It is unlikely that
any maintainer will accept your patches until the merge window closes,
which should be this weekend. You can whoever still send patches, but
please mark them RFC, and send them just to the appropriate list, not
the maintainer.

Andrew

2021-07-08 18:14:21

by Carlos Bilbao

[permalink] [raw]
Subject: Re: [PATCH net-next v2] drivers: parisc: Remove unnecessary #if blocks

Hello Andrew, following your suggestions I will just abandon this and resubmit next week with proper Subjects, etc.

> On Jul 8, 2021, at 2:04 PM, Andrew Lunn <[email protected]> wrote:
>
> On Thu, Jul 08, 2021 at 01:40:54PM -0400, Carlos Bilbao wrote:
>> Remove undefined #ifdefs and #if 0 from these two files.
>
> Hi Carlos
>
> This is not a network driver, so putting net-next in the subject is
> not useful.
>
> Also, at the moment, we are in the merge window. It is unlikely that
> any maintainer will accept your patches until the merge window closes,
> which should be this weekend. You can whoever still send patches, but
> please mark them RFC, and send them just to the appropriate list, not
> the maintainer.
>
> Andrew