On 09.02.2025 18:53:43, Stefan Mätje wrote: > > > > > - return usb_bulk_msg(dev->udev, > > > > > - usb_rcvbulkpipe(dev->udev, 1), > > > > > - msg, > > > > > - sizeof(*msg), > > > > > - &actual_length, > > > > > - 1000); > > > > > + for (attempt = 0; attempt < 8 && cnt_vs == 0; ++attempt) { > > > > > > Can you create a #define for the "8" to avoid a magic number here? > > This value was found empirically. But I think I have to reconsider > the style of handling here and may need to adapt the solution. You're the expert, change it as needed. I can only comment on the coding style and its best to avoid numbers in the code. Create a define and if you think it's worth, document that it's an empirically found value. Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung Nürnberg | Phone: +49-5121-206917-129 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
Attachment:
signature.asc
Description: PGP signature