Message ID | 1408573078-9320-6-git-send-email-mark.einon@gmail.com |
---|---|
State | Changes Requested, archived |
Delegated to: | David Miller |
Headers | show |
On Wed, Aug 20, 2014 at 7:17 PM, Mark Einon <mark.einon@gmail.com> wrote: > do { > pci_read_config_dword(pdev, > - LBCIF_DATA_REGISTER, &val); > + LBCIF_DATA_REGISTER, > + &val); This seems to be an unrelated change. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, Aug 20, 2014 at 07:22:54PM -0300, Fabio Estevam wrote: > On Wed, Aug 20, 2014 at 7:17 PM, Mark Einon <mark.einon@gmail.com> wrote: > > > do { > > pci_read_config_dword(pdev, > > - LBCIF_DATA_REGISTER, &val); > > + LBCIF_DATA_REGISTER, > > + &val); > > This seems to be an unrelated change. Hi Fabio, thanks for the review. It's a space alignment of parameters to go with the previous change, to keep wrapping consistent in the file: - while (i2c_wack) { + while (1) { if (pci_write_config_byte(pdev, LBCIF_CONTROL_REGISTER, - LBCIF_CONTROL_LBCIF_ENABLE)) + LBCIF_CONTROL_LBCIF_ENABLE)) So what are you saying - are you just commenting, document it, put it in a seperate patch? Cheers, Mark -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Mark, On Thu, Aug 21, 2014 at 6:18 AM, Mark Einon <mark.einon@gmail.com> wrote: > > Hi Fabio, thanks for the review. > > It's a space alignment of parameters to go with the previous change, to > keep wrapping consistent in the file: > > - while (i2c_wack) { > + while (1) { > if (pci_write_config_byte(pdev, LBCIF_CONTROL_REGISTER, > - LBCIF_CONTROL_LBCIF_ENABLE)) > + LBCIF_CONTROL_LBCIF_ENABLE)) > > So what are you saying - are you just commenting, document it, put it > in a seperate patch? Yes, it would be better if this part was part of a separate patch. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Aug 21, 2014 at 09:06:40AM -0300, Fabio Estevam wrote: > Hi Mark, > > On Thu, Aug 21, 2014 at 6:18 AM, Mark Einon <mark.einon@gmail.com> wrote: > > > > > Hi Fabio, thanks for the review. > > > > It's a space alignment of parameters to go with the previous change, to > > keep wrapping consistent in the file: > > > > - while (i2c_wack) { > > + while (1) { > > if (pci_write_config_byte(pdev, LBCIF_CONTROL_REGISTER, > > - LBCIF_CONTROL_LBCIF_ENABLE)) > > + LBCIF_CONTROL_LBCIF_ENABLE)) > > > > So what are you saying - are you just commenting, document it, put it > > in a seperate patch? > > Yes, it would be better if this part was part of a separate patch. Ok, I'll remove the indenting changes and sned them in a future patch. I'll submit a revised v2 of this one. Cheers, Mark -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index fc18e8d..551b250 100644 --- a/drivers/staging/et131x/et131x.c +++ b/drivers/staging/et131x/et131x.c @@ -573,7 +573,6 @@ static int eeprom_write(struct et131x_adapter *adapter, u32 addr, u8 data) int index = 0; int retries; int err = 0; - int i2c_wack = 0; int writeok = 0; u32 status; u32 val = 0; @@ -599,8 +598,6 @@ static int eeprom_write(struct et131x_adapter *adapter, u32 addr, u8 data) LBCIF_CONTROL_LBCIF_ENABLE | LBCIF_CONTROL_I2C_WRITE)) return -EIO; - i2c_wack = 1; - /* Prepare EEPROM address for Step 3 */ for (retries = 0; retries < MAX_NUM_WRITE_RETRIES; retries++) { @@ -656,9 +653,9 @@ static int eeprom_write(struct et131x_adapter *adapter, u32 addr, u8 data) */ udelay(10); - while (i2c_wack) { + while (1) { if (pci_write_config_byte(pdev, LBCIF_CONTROL_REGISTER, - LBCIF_CONTROL_LBCIF_ENABLE)) + LBCIF_CONTROL_LBCIF_ENABLE)) writeok = 0; /* Do read until internal ACK_ERROR goes away meaning write @@ -670,7 +667,8 @@ static int eeprom_write(struct et131x_adapter *adapter, u32 addr, u8 data) addr); do { pci_read_config_dword(pdev, - LBCIF_DATA_REGISTER, &val); + LBCIF_DATA_REGISTER, + &val); } while ((val & 0x00010000) == 0); } while (val & 0x00040000);
i2c_wack is only used to implement a while(1) loop, so let's remove it. Signed-off-by: Mark Einon <mark.einon@gmail.com> --- drivers/staging/et131x/et131x.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)