Message ID | 20200819112716.59074-1-mika.westerberg@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/2] thunderbolt: Disable ports that are not implemented | expand |
> - * @disabled: Disabled by eeprom > + * @disabled: Disabled by eeprom or enabled, but not implemented I'm not a native speaker, so I'm not sure about it, but maybe the comma here is superfluous and just confuses the reader. To me it looks like it means "(disabled || enabled) && !implemented" instead of "disabled || (enabled && !implemented)". Any opinion?
On Wed, Aug 19, 2020 at 02:54:39PM +0300, Yehezkel Bernat wrote: > > - * @disabled: Disabled by eeprom > > + * @disabled: Disabled by eeprom or enabled, but not implemented > > I'm not a native speaker, so I'm not sure about it, but maybe the comma here is > superfluous and just confuses the reader. To me it looks like it means > "(disabled > || enabled) && !implemented" instead of "disabled || (enabled && !implemented)". > Any opinion? For me (also non-native speaker) I don't see a difference but sure I can remove it :)
On 8/19/2020 6:15 PM, Mika Westerberg wrote: > On Wed, Aug 19, 2020 at 02:54:39PM +0300, Yehezkel Bernat wrote: >>> - * @disabled: Disabled by eeprom >>> + * @disabled: Disabled by eeprom or enabled, but not implemented >> >> I'm not a native speaker, so I'm not sure about it, but maybe the comma here is >> superfluous and just confuses the reader. To me it looks like it means >> "(disabled >> || enabled) && !implemented" instead of "disabled || (enabled && !implemented)". >> Any opinion? > > For me (also non-native speaker) I don't see a difference but sure I can > remove it :) > I meant the second - "disabled || (enabled && !implemented)" (also non-native speaker). If the comma confuses the reader please remove it. Regards Nikunj
On Thu, Aug 20, 2020 at 05:31:08PM +0530, Nikunj A. Dadhania wrote: > On 8/19/2020 6:15 PM, Mika Westerberg wrote: > > On Wed, Aug 19, 2020 at 02:54:39PM +0300, Yehezkel Bernat wrote: > > > > - * @disabled: Disabled by eeprom > > > > + * @disabled: Disabled by eeprom or enabled, but not implemented > > > > > > I'm not a native speaker, so I'm not sure about it, but maybe the comma here is > > > superfluous and just confuses the reader. To me it looks like it means > > > "(disabled > > > || enabled) && !implemented" instead of "disabled || (enabled && !implemented)". >> Any opinion? > > > > For me (also non-native speaker) I don't see a difference but sure I can > > remove it :) > > > > I meant the second - "disabled || (enabled && !implemented)" > (also non-native speaker). If the comma confuses the reader please remove > it. Removed comma from the comment and applied to fixes, thanks!
diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c index 712395f518b8..698c52775eec 100644 --- a/drivers/thunderbolt/switch.c +++ b/drivers/thunderbolt/switch.c @@ -684,6 +684,7 @@ static int tb_init_port(struct tb_port *port) if (res == -ENODEV) { tb_dbg(port->sw->tb, " Port %d: not implemented\n", port->port); + port->disabled = true; return 0; } return res; diff --git a/drivers/thunderbolt/tb.h b/drivers/thunderbolt/tb.h index a413d55b5f8b..df08f6d7aaa0 100644 --- a/drivers/thunderbolt/tb.h +++ b/drivers/thunderbolt/tb.h @@ -186,7 +186,7 @@ struct tb_switch { * @cap_adap: Offset of the adapter specific capability (%0 if not present) * @cap_usb4: Offset to the USB4 port capability (%0 if not present) * @port: Port number on switch - * @disabled: Disabled by eeprom + * @disabled: Disabled by eeprom or enabled, but not implemented * @bonded: true if the port is bonded (two lanes combined as one) * @dual_link_port: If the switch is connected using two ports, points * to the other port.