diff mbox series

hw/scsi/megasas: Remove pointless parenthesis

Message ID 20201011195001.3219730-1-f4bug@amsat.org
State Accepted
Commit ba1da4a7f10c4be8831ece6c8a9af54cfc9b559a
Headers show
Series hw/scsi/megasas: Remove pointless parenthesis | expand

Commit Message

Philippe Mathieu-Daudé Oct. 11, 2020, 7:50 p.m. UTC
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/scsi/megasas.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Laurent Vivier Feb. 13, 2021, 10:56 p.m. UTC | #1
Le 11/10/2020 à 21:50, Philippe Mathieu-Daudé a écrit :
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> ---

>  hw/scsi/megasas.c | 4 ++--

>  1 file changed, 2 insertions(+), 2 deletions(-)

> 

> diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c

> index e24c12d7eed..d57402c9b09 100644

> --- a/hw/scsi/megasas.c

> +++ b/hw/scsi/megasas.c

> @@ -2384,8 +2384,8 @@ static void megasas_scsi_realize(PCIDevice *dev, Error **errp)

>      if (!s->sas_addr) {

>          s->sas_addr = ((NAA_LOCALLY_ASSIGNED_ID << 24) |

>                         IEEE_COMPANY_LOCALLY_ASSIGNED) << 36;

> -        s->sas_addr |= (pci_dev_bus_num(dev) << 16);

> -        s->sas_addr |= (PCI_SLOT(dev->devfn) << 8);

> +        s->sas_addr |= pci_dev_bus_num(dev) << 16;

> +        s->sas_addr |= PCI_SLOT(dev->devfn) << 8;

>          s->sas_addr |= PCI_FUNC(dev->devfn);

>      }

>      if (!s->hba_serial) {

> 


Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Laurent Vivier Feb. 13, 2021, 11:13 p.m. UTC | #2
Le 11/10/2020 à 21:50, Philippe Mathieu-Daudé a écrit :
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> ---

>  hw/scsi/megasas.c | 4 ++--

>  1 file changed, 2 insertions(+), 2 deletions(-)

> 

> diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c

> index e24c12d7eed..d57402c9b09 100644

> --- a/hw/scsi/megasas.c

> +++ b/hw/scsi/megasas.c

> @@ -2384,8 +2384,8 @@ static void megasas_scsi_realize(PCIDevice *dev, Error **errp)

>      if (!s->sas_addr) {

>          s->sas_addr = ((NAA_LOCALLY_ASSIGNED_ID << 24) |

>                         IEEE_COMPANY_LOCALLY_ASSIGNED) << 36;

> -        s->sas_addr |= (pci_dev_bus_num(dev) << 16);

> -        s->sas_addr |= (PCI_SLOT(dev->devfn) << 8);

> +        s->sas_addr |= pci_dev_bus_num(dev) << 16;

> +        s->sas_addr |= PCI_SLOT(dev->devfn) << 8;

>          s->sas_addr |= PCI_FUNC(dev->devfn);

>      }

>      if (!s->hba_serial) {

> 


Applied to my trivial-patches branch.

Thanks,
Laurent
diff mbox series

Patch

diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c
index e24c12d7eed..d57402c9b09 100644
--- a/hw/scsi/megasas.c
+++ b/hw/scsi/megasas.c
@@ -2384,8 +2384,8 @@  static void megasas_scsi_realize(PCIDevice *dev, Error **errp)
     if (!s->sas_addr) {
         s->sas_addr = ((NAA_LOCALLY_ASSIGNED_ID << 24) |
                        IEEE_COMPANY_LOCALLY_ASSIGNED) << 36;
-        s->sas_addr |= (pci_dev_bus_num(dev) << 16);
-        s->sas_addr |= (PCI_SLOT(dev->devfn) << 8);
+        s->sas_addr |= pci_dev_bus_num(dev) << 16;
+        s->sas_addr |= PCI_SLOT(dev->devfn) << 8;
         s->sas_addr |= PCI_FUNC(dev->devfn);
     }
     if (!s->hba_serial) {