On Tue, Feb 8, 2022 at 9:03 PM Andy Shevchenko <andy.shevchenko@xxxxxxxxx> wrote: > > On Tue, Feb 8, 2022 at 8:34 PM Bartosz Golaszewski <brgl@xxxxxxxx> wrote: > > > > We always assign the default device name as the chip_label in hog > > structures which makes it impossible to assign hogs to chips. Let's > > first check if a custom label was set and then copy it instead of the > > default device name. > > ... > > > + return (bank->label && (strlen(bank->label) > 0)); > > It can be simply > > return bank->label && strlen(bank->label); > > Or even w/o strlen() call: > > return bank->label && *bank->label; // or bank->label && bank->label[0] > Yeah makes sense, I will change it when applying. Bart > Either way the code LGTM, > Reviewed-by: Andy Shevchenko <andy.shevchenko@xxxxxxxxx> > > -- > With Best Regards, > Andy Shevchenko