* [RFC PATCH 14/35] i2c/busses: Change PCIBIOS_SUCCESSFUL to 0 [not found] <20200713122247.10985-1-refactormyself@gmail.com> @ 2020-07-13 12:22 ` Saheed O. Bolarinwa 2020-07-17 14:58 ` Jean Delvare 2020-07-13 12:22 ` [RFC PATCH 15/35] i2c/busses: Tidy Success/Failure checks Saheed O. Bolarinwa 1 sibling, 1 reply; 6+ messages in thread From: Saheed O. Bolarinwa @ 2020-07-13 12:22 UTC (permalink / raw) To: helgaas, Jean Delvare Cc: Saheed O. Bolarinwa, bjorn, skhan, linux-pci, linux-kernel-mentees, linux-kernel, linux-i2c In reference to the PCI spec (Chapter 2), PCIBIOS* is an x86 concept. Their scope should be limited within arch/x86. Change all PCIBIOS_SUCCESSFUL to 0 Signed-off-by: "Saheed O. Bolarinwa" <refactormyself@gmail.com> --- drivers/i2c/busses/i2c-ali15x3.c | 4 ++-- drivers/i2c/busses/i2c-nforce2.c | 2 +- drivers/i2c/busses/i2c-sis5595.c | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/i2c/busses/i2c-ali15x3.c b/drivers/i2c/busses/i2c-ali15x3.c index 02185a1cfa77..359ee3e0864a 100644 --- a/drivers/i2c/busses/i2c-ali15x3.c +++ b/drivers/i2c/busses/i2c-ali15x3.c @@ -167,11 +167,11 @@ static int ali15x3_setup(struct pci_dev *ALI15X3_dev) if(force_addr) { dev_info(&ALI15X3_dev->dev, "forcing ISA address 0x%04X\n", ali15x3_smba); - if (PCIBIOS_SUCCESSFUL != pci_write_config_word(ALI15X3_dev, + if (0 != pci_write_config_word(ALI15X3_dev, SMBBA, ali15x3_smba)) goto error; - if (PCIBIOS_SUCCESSFUL != pci_read_config_word(ALI15X3_dev, + if (0 != pci_read_config_word(ALI15X3_dev, SMBBA, &a)) goto error; if ((a & ~(ALI15X3_SMB_IOSIZE - 1)) != ali15x3_smba) { diff --git a/drivers/i2c/busses/i2c-nforce2.c b/drivers/i2c/busses/i2c-nforce2.c index 777278386f58..385f4f446f36 100644 --- a/drivers/i2c/busses/i2c-nforce2.c +++ b/drivers/i2c/busses/i2c-nforce2.c @@ -328,7 +328,7 @@ static int nforce2_probe_smb(struct pci_dev *dev, int bar, int alt_reg, u16 iobase; if (pci_read_config_word(dev, alt_reg, &iobase) - != PCIBIOS_SUCCESSFUL) { + != 0) { dev_err(&dev->dev, "Error reading PCI config for %s\n", name); return -EIO; diff --git a/drivers/i2c/busses/i2c-sis5595.c b/drivers/i2c/busses/i2c-sis5595.c index c793a5c14cda..fbe3ee31eae3 100644 --- a/drivers/i2c/busses/i2c-sis5595.c +++ b/drivers/i2c/busses/i2c-sis5595.c @@ -176,10 +176,10 @@ static int sis5595_setup(struct pci_dev *SIS5595_dev) if (force_addr) { dev_info(&SIS5595_dev->dev, "forcing ISA address 0x%04X\n", sis5595_base); if (pci_write_config_word(SIS5595_dev, ACPI_BASE, sis5595_base) - != PCIBIOS_SUCCESSFUL) + != 0) goto error; if (pci_read_config_word(SIS5595_dev, ACPI_BASE, &a) - != PCIBIOS_SUCCESSFUL) + != 0) goto error; if ((a & ~(SIS5595_EXTENT - 1)) != sis5595_base) { /* doesn't work for some chips! */ @@ -189,15 +189,15 @@ static int sis5595_setup(struct pci_dev *SIS5595_dev) } if (pci_read_config_byte(SIS5595_dev, SIS5595_ENABLE_REG, &val) - != PCIBIOS_SUCCESSFUL) + != 0) goto error; if ((val & 0x80) == 0) { dev_info(&SIS5595_dev->dev, "enabling ACPI\n"); if (pci_write_config_byte(SIS5595_dev, SIS5595_ENABLE_REG, val | 0x80) - != PCIBIOS_SUCCESSFUL) + != 0) goto error; if (pci_read_config_byte(SIS5595_dev, SIS5595_ENABLE_REG, &val) - != PCIBIOS_SUCCESSFUL) + != 0) goto error; if ((val & 0x80) == 0) { /* doesn't work for some chips? */ -- 2.18.2 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [RFC PATCH 14/35] i2c/busses: Change PCIBIOS_SUCCESSFUL to 0 2020-07-13 12:22 ` [RFC PATCH 14/35] i2c/busses: Change PCIBIOS_SUCCESSFUL to 0 Saheed O. Bolarinwa @ 2020-07-17 14:58 ` Jean Delvare 2020-07-18 19:05 ` Saheed Bolarinwa 0 siblings, 1 reply; 6+ messages in thread From: Jean Delvare @ 2020-07-17 14:58 UTC (permalink / raw) To: Saheed O. Bolarinwa Cc: helgaas, bjorn, skhan, linux-pci, linux-kernel-mentees, linux-kernel, linux-i2c Hi Saheed, On Mon, 13 Jul 2020 14:22:26 +0200, Saheed O. Bolarinwa wrote: > In reference to the PCI spec (Chapter 2), PCIBIOS* is an x86 concept. > Their scope should be limited within arch/x86. Which PCI specification are you talking about here. In my "PCI Local Bus Revision 2.3" specification (March 29, 2002), chapter 2 is about Signal Definition and has nothing to do with the BIOS. > > Change all PCIBIOS_SUCCESSFUL to 0 > > Signed-off-by: "Saheed O. Bolarinwa" <refactormyself@gmail.com> > --- > drivers/i2c/busses/i2c-ali15x3.c | 4 ++-- > drivers/i2c/busses/i2c-nforce2.c | 2 +- > drivers/i2c/busses/i2c-sis5595.c | 10 +++++----- > 3 files changed, 8 insertions(+), 8 deletions(-) Hmmm. That seems to be a lot of changes to solve an essentially theoretical problem (if a problem at all). I am not familiar enough with the PCI subsystem to claim that it is fundamentally wrong, but enough to say I'm skeptical. PCI is a cross-architecture standard, and we can't possibly have the return value of core functions such as pci_write_config_word follow different conventions depending on the architecture, can we? Does pci_write_config_word() currently return PCIBIOS_SUCCESSFUL on success on x86 and 0 on success on other architectures? What about errors, do we return positive, "PCIBIOS-specific" error codes on x86 and negative, unix-like error codes on other architectures? > diff --git a/drivers/i2c/busses/i2c-ali15x3.c b/drivers/i2c/busses/i2c-ali15x3.c > index 02185a1cfa77..359ee3e0864a 100644 > --- a/drivers/i2c/busses/i2c-ali15x3.c > +++ b/drivers/i2c/busses/i2c-ali15x3.c > @@ -167,11 +167,11 @@ static int ali15x3_setup(struct pci_dev *ALI15X3_dev) > if(force_addr) { > dev_info(&ALI15X3_dev->dev, "forcing ISA address 0x%04X\n", > ali15x3_smba); > - if (PCIBIOS_SUCCESSFUL != pci_write_config_word(ALI15X3_dev, > + if (0 != pci_write_config_word(ALI15X3_dev, > SMBBA, > ali15x3_smba)) > goto error; This leaves the code horribly aligned. > - if (PCIBIOS_SUCCESSFUL != pci_read_config_word(ALI15X3_dev, > + if (0 != pci_read_config_word(ALI15X3_dev, > SMBBA, &a)) > goto error; > if ((a & ~(ALI15X3_SMB_IOSIZE - 1)) != ali15x3_smba) { > diff --git a/drivers/i2c/busses/i2c-nforce2.c b/drivers/i2c/busses/i2c-nforce2.c > index 777278386f58..385f4f446f36 100644 > --- a/drivers/i2c/busses/i2c-nforce2.c > +++ b/drivers/i2c/busses/i2c-nforce2.c > @@ -328,7 +328,7 @@ static int nforce2_probe_smb(struct pci_dev *dev, int bar, int alt_reg, > u16 iobase; > > if (pci_read_config_word(dev, alt_reg, &iobase) > - != PCIBIOS_SUCCESSFUL) { > + != 0) { > dev_err(&dev->dev, "Error reading PCI config for %s\n", > name); > return -EIO; > diff --git a/drivers/i2c/busses/i2c-sis5595.c b/drivers/i2c/busses/i2c-sis5595.c > index c793a5c14cda..fbe3ee31eae3 100644 > --- a/drivers/i2c/busses/i2c-sis5595.c > +++ b/drivers/i2c/busses/i2c-sis5595.c > @@ -176,10 +176,10 @@ static int sis5595_setup(struct pci_dev *SIS5595_dev) > if (force_addr) { > dev_info(&SIS5595_dev->dev, "forcing ISA address 0x%04X\n", sis5595_base); > if (pci_write_config_word(SIS5595_dev, ACPI_BASE, sis5595_base) > - != PCIBIOS_SUCCESSFUL) > + != 0) > goto error; > if (pci_read_config_word(SIS5595_dev, ACPI_BASE, &a) > - != PCIBIOS_SUCCESSFUL) > + != 0) > goto error; > if ((a & ~(SIS5595_EXTENT - 1)) != sis5595_base) { > /* doesn't work for some chips! */ > @@ -189,15 +189,15 @@ static int sis5595_setup(struct pci_dev *SIS5595_dev) > } > > if (pci_read_config_byte(SIS5595_dev, SIS5595_ENABLE_REG, &val) > - != PCIBIOS_SUCCESSFUL) > + != 0) > goto error; > if ((val & 0x80) == 0) { > dev_info(&SIS5595_dev->dev, "enabling ACPI\n"); > if (pci_write_config_byte(SIS5595_dev, SIS5595_ENABLE_REG, val | 0x80) > - != PCIBIOS_SUCCESSFUL) > + != 0) > goto error; > if (pci_read_config_byte(SIS5595_dev, SIS5595_ENABLE_REG, &val) > - != PCIBIOS_SUCCESSFUL) > + != 0) > goto error; > if ((val & 0x80) == 0) { > /* doesn't work for some chips? */ -- Jean Delvare SUSE L3 Support ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC PATCH 14/35] i2c/busses: Change PCIBIOS_SUCCESSFUL to 0 2020-07-17 14:58 ` Jean Delvare @ 2020-07-18 19:05 ` Saheed Bolarinwa 2020-07-22 11:06 ` Wolfram Sang 0 siblings, 1 reply; 6+ messages in thread From: Saheed Bolarinwa @ 2020-07-18 19:05 UTC (permalink / raw) To: Jean Delvare Cc: helgaas, bjorn, skhan, linux-pci, linux-kernel-mentees, linux-kernel, linux-i2c On 7/17/20 4:58 PM, Jean Delvare wrote: > Which PCI specification are you talking about here. In my "PCI Local > Bus Revision 2.3" specification (March 29, 2002), chapter 2 is about > Signal Definition and has nothing to do with the BIOS. http://read.pudn.com/downloads211/doc/comm/994029/pcifw_r3_0_updated.pdf >> Change all PCIBIOS_SUCCESSFUL to 0 >> >> Signed-off-by: "Saheed O. Bolarinwa" <refactormyself@gmail.com> >> --- >> drivers/i2c/busses/i2c-ali15x3.c | 4 ++-- >> drivers/i2c/busses/i2c-nforce2.c | 2 +- >> drivers/i2c/busses/i2c-sis5595.c | 10 +++++----- >> 3 files changed, 8 insertions(+), 8 deletions(-) > Hmmm. That seems to be a lot of changes to solve an essentially > theoretical problem (if a problem at all). I am not familiar enough > with the PCI subsystem to claim that it is fundamentally wrong, but > enough to say I'm skeptical. > > PCI is a cross-architecture standard, and we can't possibly have the > return value of core functions such as pci_write_config_word follow > different conventions depending on the architecture, can we? Does > pci_write_config_word() currently return PCIBIOS_SUCCESSFUL on success > on x86 and 0 on success on other architectures? What about errors, do > we return positive, "PCIBIOS-specific" error codes on x86 and negative, > unix-like error codes on other architectures? Unfortunately, the cover letter did not go through. I have resent it now: https://lore.kernel.org/linux-i2c/20200718184558.110942-1-refactormyself@gmail.com/T/#u Here is a discussion thread on it: https://lore.kernel.org/linux-pci/fb40545a8de8df8914df40d7d6167752c5244ce6.camel@kernel.crashing.org/T/#t >> diff --git a/drivers/i2c/busses/i2c-ali15x3.c b/drivers/i2c/busses/i2c-ali15x3.c >> index 02185a1cfa77..359ee3e0864a 100644 >> --- a/drivers/i2c/busses/i2c-ali15x3.c >> +++ b/drivers/i2c/busses/i2c-ali15x3.c >> @@ -167,11 +167,11 @@ static int ali15x3_setup(struct pci_dev *ALI15X3_dev) >> if(force_addr) { >> dev_info(&ALI15X3_dev->dev, "forcing ISA address 0x%04X\n", >> ali15x3_smba); >> - if (PCIBIOS_SUCCESSFUL != pci_write_config_word(ALI15X3_dev, >> + if (0 != pci_write_config_word(ALI15X3_dev, >> SMBBA, >> ali15x3_smba)) >> goto error; > This leaves the code horribly aligned. Sorry about that, lessons learnt. Thank you for the review. - Saheed ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC PATCH 14/35] i2c/busses: Change PCIBIOS_SUCCESSFUL to 0 2020-07-18 19:05 ` Saheed Bolarinwa @ 2020-07-22 11:06 ` Wolfram Sang 0 siblings, 0 replies; 6+ messages in thread From: Wolfram Sang @ 2020-07-22 11:06 UTC (permalink / raw) To: Saheed Bolarinwa Cc: Jean Delvare, helgaas, bjorn, skhan, linux-pci, linux-kernel-mentees, linux-kernel, linux-i2c [-- Attachment #1: Type: text/plain, Size: 187 bytes --] > Sorry about that, lessons learnt. I'll mark the I2C patches as RFC for me. If you resend them, please mention if I should pick them or if the series shall go in via some other tree. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* [RFC PATCH 15/35] i2c/busses: Tidy Success/Failure checks [not found] <20200713122247.10985-1-refactormyself@gmail.com> 2020-07-13 12:22 ` [RFC PATCH 14/35] i2c/busses: Change PCIBIOS_SUCCESSFUL to 0 Saheed O. Bolarinwa @ 2020-07-13 12:22 ` Saheed O. Bolarinwa 2020-07-17 15:11 ` Jean Delvare 1 sibling, 1 reply; 6+ messages in thread From: Saheed O. Bolarinwa @ 2020-07-13 12:22 UTC (permalink / raw) To: helgaas, Jean Delvare Cc: Saheed O. Bolarinwa, bjorn, skhan, linux-pci, linux-kernel-mentees, linux-kernel, linux-i2c Remove unnecessary check for 0. Signed-off-by: "Saheed O. Bolarinwa" <refactormyself@gmail.com> --- This patch depends on PATCH 15/35 drivers/i2c/busses/i2c-ali15x3.c | 5 ++--- drivers/i2c/busses/i2c-nforce2.c | 3 +-- drivers/i2c/busses/i2c-sis5595.c | 15 +++++---------- 3 files changed, 8 insertions(+), 15 deletions(-) diff --git a/drivers/i2c/busses/i2c-ali15x3.c b/drivers/i2c/busses/i2c-ali15x3.c index 359ee3e0864a..c9e779cc184e 100644 --- a/drivers/i2c/busses/i2c-ali15x3.c +++ b/drivers/i2c/busses/i2c-ali15x3.c @@ -167,11 +167,10 @@ static int ali15x3_setup(struct pci_dev *ALI15X3_dev) if(force_addr) { dev_info(&ALI15X3_dev->dev, "forcing ISA address 0x%04X\n", ali15x3_smba); - if (0 != pci_write_config_word(ALI15X3_dev, - SMBBA, + if (pci_write_config_word(ALI15X3_dev, SMBBA, ali15x3_smba)) goto error; - if (0 != pci_read_config_word(ALI15X3_dev, + if (pci_read_config_word(ALI15X3_dev, SMBBA, &a)) goto error; if ((a & ~(ALI15X3_SMB_IOSIZE - 1)) != ali15x3_smba) { diff --git a/drivers/i2c/busses/i2c-nforce2.c b/drivers/i2c/busses/i2c-nforce2.c index 385f4f446f36..54d2985b7aaf 100644 --- a/drivers/i2c/busses/i2c-nforce2.c +++ b/drivers/i2c/busses/i2c-nforce2.c @@ -327,8 +327,7 @@ static int nforce2_probe_smb(struct pci_dev *dev, int bar, int alt_reg, /* Older incarnations of the device used non-standard BARs */ u16 iobase; - if (pci_read_config_word(dev, alt_reg, &iobase) - != 0) { + if (pci_read_config_word(dev, alt_reg, &iobase)) { dev_err(&dev->dev, "Error reading PCI config for %s\n", name); return -EIO; diff --git a/drivers/i2c/busses/i2c-sis5595.c b/drivers/i2c/busses/i2c-sis5595.c index fbe3ee31eae3..b016f48519d3 100644 --- a/drivers/i2c/busses/i2c-sis5595.c +++ b/drivers/i2c/busses/i2c-sis5595.c @@ -175,11 +175,9 @@ static int sis5595_setup(struct pci_dev *SIS5595_dev) if (force_addr) { dev_info(&SIS5595_dev->dev, "forcing ISA address 0x%04X\n", sis5595_base); - if (pci_write_config_word(SIS5595_dev, ACPI_BASE, sis5595_base) - != 0) + if (pci_write_config_word(SIS5595_dev, ACPI_BASE, sis5595_base)) goto error; - if (pci_read_config_word(SIS5595_dev, ACPI_BASE, &a) - != 0) + if (pci_read_config_word(SIS5595_dev, ACPI_BASE, &a)) goto error; if ((a & ~(SIS5595_EXTENT - 1)) != sis5595_base) { /* doesn't work for some chips! */ @@ -188,16 +186,13 @@ static int sis5595_setup(struct pci_dev *SIS5595_dev) } } - if (pci_read_config_byte(SIS5595_dev, SIS5595_ENABLE_REG, &val) - != 0) + if (pci_read_config_byte(SIS5595_dev, SIS5595_ENABLE_REG, &val)) goto error; if ((val & 0x80) == 0) { dev_info(&SIS5595_dev->dev, "enabling ACPI\n"); - if (pci_write_config_byte(SIS5595_dev, SIS5595_ENABLE_REG, val | 0x80) - != 0) + if (pci_write_config_byte(SIS5595_dev, SIS5595_ENABLE_REG, val | 0x80)) goto error; - if (pci_read_config_byte(SIS5595_dev, SIS5595_ENABLE_REG, &val) - != 0) + if (pci_read_config_byte(SIS5595_dev, SIS5595_ENABLE_REG, &val)) goto error; if ((val & 0x80) == 0) { /* doesn't work for some chips? */ -- 2.18.2 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [RFC PATCH 15/35] i2c/busses: Tidy Success/Failure checks 2020-07-13 12:22 ` [RFC PATCH 15/35] i2c/busses: Tidy Success/Failure checks Saheed O. Bolarinwa @ 2020-07-17 15:11 ` Jean Delvare 0 siblings, 0 replies; 6+ messages in thread From: Jean Delvare @ 2020-07-17 15:11 UTC (permalink / raw) To: Saheed O. Bolarinwa Cc: helgaas, bjorn, skhan, linux-pci, linux-kernel-mentees, linux-kernel, linux-i2c On Mon, 13 Jul 2020 14:22:27 +0200, Saheed O. Bolarinwa wrote: > Signed-off-by: "Saheed O. Bolarinwa" <refactormyself@gmail.com> > --- > This patch depends on PATCH 15/35 Not possible, as this *is* patch 15/35. Not really worth mentioning anyway, as it is expected that patches in a given series may depend on any earlier patch in the same series. > > drivers/i2c/busses/i2c-ali15x3.c | 5 ++--- > drivers/i2c/busses/i2c-nforce2.c | 3 +-- > drivers/i2c/busses/i2c-sis5595.c | 15 +++++---------- > 3 files changed, 8 insertions(+), 15 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-ali15x3.c b/drivers/i2c/busses/i2c-ali15x3.c > index 359ee3e0864a..c9e779cc184e 100644 > --- a/drivers/i2c/busses/i2c-ali15x3.c > +++ b/drivers/i2c/busses/i2c-ali15x3.c > @@ -167,11 +167,10 @@ static int ali15x3_setup(struct pci_dev *ALI15X3_dev) > if(force_addr) { > dev_info(&ALI15X3_dev->dev, "forcing ISA address 0x%04X\n", > ali15x3_smba); > - if (0 != pci_write_config_word(ALI15X3_dev, > - SMBBA, > + if (pci_write_config_word(ALI15X3_dev, SMBBA, > ali15x3_smba)) > goto error; You can't possibly leave the code with such a ugly alignment and run away. The whole point of tidying patches it to have more readable code in the end, right? > - if (0 != pci_read_config_word(ALI15X3_dev, > + if (pci_read_config_word(ALI15X3_dev, > SMBBA, &a)) > goto error; > if ((a & ~(ALI15X3_SMB_IOSIZE - 1)) != ali15x3_smba) { > diff --git a/drivers/i2c/busses/i2c-nforce2.c b/drivers/i2c/busses/i2c-nforce2.c > index 385f4f446f36..54d2985b7aaf 100644 > --- a/drivers/i2c/busses/i2c-nforce2.c > +++ b/drivers/i2c/busses/i2c-nforce2.c > @@ -327,8 +327,7 @@ static int nforce2_probe_smb(struct pci_dev *dev, int bar, int alt_reg, > /* Older incarnations of the device used non-standard BARs */ > u16 iobase; > > - if (pci_read_config_word(dev, alt_reg, &iobase) > - != 0) { > + if (pci_read_config_word(dev, alt_reg, &iobase)) { > dev_err(&dev->dev, "Error reading PCI config for %s\n", > name); > return -EIO; > diff --git a/drivers/i2c/busses/i2c-sis5595.c b/drivers/i2c/busses/i2c-sis5595.c > index fbe3ee31eae3..b016f48519d3 100644 > --- a/drivers/i2c/busses/i2c-sis5595.c > +++ b/drivers/i2c/busses/i2c-sis5595.c > @@ -175,11 +175,9 @@ static int sis5595_setup(struct pci_dev *SIS5595_dev) > > if (force_addr) { > dev_info(&SIS5595_dev->dev, "forcing ISA address 0x%04X\n", sis5595_base); > - if (pci_write_config_word(SIS5595_dev, ACPI_BASE, sis5595_base) > - != 0) > + if (pci_write_config_word(SIS5595_dev, ACPI_BASE, sis5595_base)) > goto error; > - if (pci_read_config_word(SIS5595_dev, ACPI_BASE, &a) > - != 0) > + if (pci_read_config_word(SIS5595_dev, ACPI_BASE, &a)) > goto error; > if ((a & ~(SIS5595_EXTENT - 1)) != sis5595_base) { > /* doesn't work for some chips! */ > @@ -188,16 +186,13 @@ static int sis5595_setup(struct pci_dev *SIS5595_dev) > } > } > > - if (pci_read_config_byte(SIS5595_dev, SIS5595_ENABLE_REG, &val) > - != 0) > + if (pci_read_config_byte(SIS5595_dev, SIS5595_ENABLE_REG, &val)) > goto error; > if ((val & 0x80) == 0) { > dev_info(&SIS5595_dev->dev, "enabling ACPI\n"); > - if (pci_write_config_byte(SIS5595_dev, SIS5595_ENABLE_REG, val | 0x80) > - != 0) > + if (pci_write_config_byte(SIS5595_dev, SIS5595_ENABLE_REG, val | 0x80)) > goto error; > - if (pci_read_config_byte(SIS5595_dev, SIS5595_ENABLE_REG, &val) > - != 0) > + if (pci_read_config_byte(SIS5595_dev, SIS5595_ENABLE_REG, &val)) > goto error; > if ((val & 0x80) == 0) { > /* doesn't work for some chips? */ Overall I'd be happy to have a more consistent style for checking errors on PCI config registers access, so this seems to be going into the right direction. -- Jean Delvare SUSE L3 Support ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-07-22 11:06 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20200713122247.10985-1-refactormyself@gmail.com>
2020-07-13 12:22 ` [RFC PATCH 14/35] i2c/busses: Change PCIBIOS_SUCCESSFUL to 0 Saheed O. Bolarinwa
2020-07-17 14:58 ` Jean Delvare
2020-07-18 19:05 ` Saheed Bolarinwa
2020-07-22 11:06 ` Wolfram Sang
2020-07-13 12:22 ` [RFC PATCH 15/35] i2c/busses: Tidy Success/Failure checks Saheed O. Bolarinwa
2020-07-17 15:11 ` Jean Delvare
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).