On Tue, Jul 04, 2023 at 02:55:02PM +0100, Dan Scally wrote: > On 30/06/2023 16:45, Andy Shevchenko wrote: > > On Fri, Jun 30, 2023 at 2:07 PM Hans de Goede <hdegoede@xxxxxxxxxx> wrote: (Can you remove unneeded context when replying to the messages, please?) ... > > > + if (!acpi_match_device_ids(adev, dual_lane_sensors)) > > > + lanes = 2; > > > + else > > > + lanes = 1; > > Can we use positive conditional? > > > > if (acpi_match_device_ids(adev, dual_lane_sensors)) > > lanes = 1; > > else > > lanes = 2; > > Or perhaps "if (acpi_match_device_ids(adev, dual_lane_sensors) == 0)"? Unfortunately this will be more confusing. The above mentioned API returns the error code or 0 on success. ret = acpi_match_device_ids(adev, dual_lane_sensors); if (ret) lanes = 1; else lanes = 2; probably is the best to have semantics of returned code more or less easy to get. -- With Best Regards, Andy Shevchenko