* [PATCH] pm_smbus: rename variable to avoid shadowing
@ 2023-09-25 14:47 Paolo Bonzini
2023-09-26 12:46 ` Corey Minyard
0 siblings, 1 reply; 2+ messages in thread
From: Paolo Bonzini @ 2023-09-25 14:47 UTC (permalink / raw)
To: qemu-devel; +Cc: armbru
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/i2c/pm_smbus.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/i2c/pm_smbus.c b/hw/i2c/pm_smbus.c
index 9ad6a47739b..4e1b8a5182d 100644
--- a/hw/i2c/pm_smbus.c
+++ b/hw/i2c/pm_smbus.c
@@ -279,7 +279,7 @@ static void smb_ioport_writeb(void *opaque, hwaddr addr, uint64_t val,
if (!read && s->smb_index == s->smb_data0) {
uint8_t prot = (s->smb_ctl >> 2) & 0x07;
uint8_t cmd = s->smb_cmd;
- uint8_t addr = s->smb_addr >> 1;
+ uint8_t smb_addr = s->smb_addr >> 1;
int ret;
if (prot == PROT_I2C_BLOCK_READ) {
@@ -287,7 +287,7 @@ static void smb_ioport_writeb(void *opaque, hwaddr addr, uint64_t val,
goto out;
}
- ret = smbus_write_block(s->smbus, addr, cmd, s->smb_data,
+ ret = smbus_write_block(s->smbus, smb_addr, cmd, s->smb_data,
s->smb_data0, !s->i2c_enable);
if (ret < 0) {
s->smb_stat |= STS_DEV_ERR;
--
2.41.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] pm_smbus: rename variable to avoid shadowing
2023-09-25 14:47 [PATCH] pm_smbus: rename variable to avoid shadowing Paolo Bonzini
@ 2023-09-26 12:46 ` Corey Minyard
0 siblings, 0 replies; 2+ messages in thread
From: Corey Minyard @ 2023-09-26 12:46 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel, armbru
On Mon, Sep 25, 2023 at 04:47:39PM +0200, Paolo Bonzini wrote:
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> hw/i2c/pm_smbus.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
This looks ok to me.
Acked-by: Corey Minyard <cminyard@mvista.com>
>
> diff --git a/hw/i2c/pm_smbus.c b/hw/i2c/pm_smbus.c
> index 9ad6a47739b..4e1b8a5182d 100644
> --- a/hw/i2c/pm_smbus.c
> +++ b/hw/i2c/pm_smbus.c
> @@ -279,7 +279,7 @@ static void smb_ioport_writeb(void *opaque, hwaddr addr, uint64_t val,
> if (!read && s->smb_index == s->smb_data0) {
> uint8_t prot = (s->smb_ctl >> 2) & 0x07;
> uint8_t cmd = s->smb_cmd;
> - uint8_t addr = s->smb_addr >> 1;
> + uint8_t smb_addr = s->smb_addr >> 1;
> int ret;
>
> if (prot == PROT_I2C_BLOCK_READ) {
> @@ -287,7 +287,7 @@ static void smb_ioport_writeb(void *opaque, hwaddr addr, uint64_t val,
> goto out;
> }
>
> - ret = smbus_write_block(s->smbus, addr, cmd, s->smb_data,
> + ret = smbus_write_block(s->smbus, smb_addr, cmd, s->smb_data,
> s->smb_data0, !s->i2c_enable);
> if (ret < 0) {
> s->smb_stat |= STS_DEV_ERR;
> --
> 2.41.0
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-09-26 12:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-25 14:47 [PATCH] pm_smbus: rename variable to avoid shadowing Paolo Bonzini
2023-09-26 12:46 ` Corey Minyard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).