Re: [PATCH v2 04/19] net/xsc: add xsc device init and uninit

2024-09-11 Thread WanRenyong
On 2024/9/11 11:47, Stephen Hemminger wrote: > On Wed, 11 Sep 2024 10:07:25 +0800 > "WanRenyong" wrote: > >> + >> +sprintf(path, "%s/device/uevent", dev_path); > better to use snprintf for safety OK,  will fix it in next version. >> +while (fgets(line, sizeof(line), file) == line) { >> +

Re: [PATCH v2 04/19] net/xsc: add xsc device init and uninit

2024-09-10 Thread Stephen Hemminger
On Wed, 11 Sep 2024 10:07:25 +0800 "WanRenyong" wrote: > + > + sprintf(path, "%s/device/uevent", dev_path); better to use snprintf for safety > + while (fgets(line, sizeof(line), file) == line) { > + size_t len = strlen(line); > + > + /* Truncate long lines. */ >

[PATCH v2 04/19] net/xsc: add xsc device init and uninit

2024-09-10 Thread WanRenyong
XSC device is a concept of low level device used to manage hardware resource and to interact with firmware. Signed-off-by: WanRenyong --- v2: * fix compilation error caused by missing dependency --- drivers/net/xsc/meson.build | 20 + drivers/net/xsc/xsc_defs.h | 23 + drivers/net