Get 'offset' variable out of the way of parameter named 'offset',
rename it to 'reg_offset'. This is very short lived change as
reg_offset is going to be soon removed.
Signed-off-by: Ilpo Järvinen <[email protected]>
---
drivers/tty/serial/8250/8250_dw.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c
index 41bf063396e4..f18975b4d2c7 100644
--- a/drivers/tty/serial/8250/8250_dw.c
+++ b/drivers/tty/serial/8250/8250_dw.c
@@ -89,7 +89,7 @@ static void dw8250_force_idle(struct uart_port *p)
static void dw8250_check_lcr(struct uart_port *p, int value)
{
- void __iomem *offset = p->membase + (UART_LCR << p->regshift);
+ void __iomem *reg_offset = p->membase + (UART_LCR << p->regshift);
int tries = 1000;
/* Make sure LCR write wasn't ignored */
@@ -103,15 +103,15 @@ static void dw8250_check_lcr(struct uart_port *p, int value)
#ifdef CONFIG_64BIT
if (p->type == PORT_OCTEON)
- __raw_writeq(value & 0xff, offset);
+ __raw_writeq(value & 0xff, reg_offset);
else
#endif
if (p->iotype == UPIO_MEM32)
- writel(value, offset);
+ writel(value, reg_offset);
else if (p->iotype == UPIO_MEM32BE)
- iowrite32be(value, offset);
+ iowrite32be(value, reg_offset);
else
- writeb(value, offset);
+ writeb(value, reg_offset);
}
/*
* FIXME: this deadlocks if port->lock is already held
--
2.30.2
On Tue, Jun 28, 2022 at 04:42:32PM +0300, Ilpo J?rvinen wrote:
> Get 'offset' variable out of the way of parameter named 'offset',
> rename it to 'reg_offset'. This is very short lived change as
> reg_offset is going to be soon removed.
I'm not sure why this change then even needed...
--
With Best Regards,
Andy Shevchenko
On Wed, 29 Jun 2022, Andy Shevchenko wrote:
> On Tue, Jun 28, 2022 at 04:42:32PM +0300, Ilpo J?rvinen wrote:
> > Get 'offset' variable out of the way of parameter named 'offset',
> > rename it to 'reg_offset'. This is very short lived change as
> > reg_offset is going to be soon removed.
>
> I'm not sure why this change then even needed...
I could either:
1) create one large patch doing many thing (2+3 or 2+3+4)
or
2) add the 'offset' parameter with some other name first and rename it
to its final name after local var 'offset' is eliminated by patch 4
or
3) rename local var 'offset' first out of the way so that I can add
'offset' parameter in patch 3 (=this patch)
If I just drop patch 2 and only do 3, it won't build because 'offset'
variable appears twice (as arg and local var).
--
i.
On Wed, Jun 29, 2022 at 9:52 AM Ilpo Järvinen
<[email protected]> wrote:
>
> On Wed, 29 Jun 2022, Andy Shevchenko wrote:
>
> > On Tue, Jun 28, 2022 at 04:42:32PM +0300, Ilpo Järvinen wrote:
> > > Get 'offset' variable out of the way of parameter named 'offset',
> > > rename it to 'reg_offset'. This is very short lived change as
a very
> > > reg_offset is going to be soon removed.
> >
> > I'm not sure why this change then even needed...
>
> I could either:
> 1) create one large patch doing many thing (2+3 or 2+3+4)
> or
> 2) add the 'offset' parameter with some other name first and rename it
> to its final name after local var 'offset' is eliminated by patch 4
> or
> 3) rename local var 'offset' first out of the way so that I can add
> 'offset' parameter in patch 3 (=this patch)
>
> If I just drop patch 2 and only do 3, it won't build because 'offset'
> variable appears twice (as arg and local var).
Now I got it, thanks. See one remark above.
--
With Best Regards,
Andy Shevchenko