Hi Mariia, > Date: 2026-11-06 20:31:53-0800 > From: Mariia Nikitash > [...] > > > @@ -255,10 +256,15 @@ static int vidioc_querycap(struct file *file, void *priv, > > > struct v4l2_capability *v) > > > { > > > struct radio_tea5777 *tea = video_drvdata(file); > > > + struct seq_buf s; > > > > > > strscpy(v->driver, tea->v4l2_dev->name, sizeof(v->driver)); > > > - strscpy(v->card, tea->card, sizeof(v->card)); > > > - strlcat(v->card, " TEA5777", sizeof(v->card)); > > > + > > > + seq_buf_init(&s, (char *)v->card, sizeof(v->card)); > > > + seq_buf_puts(&s, (const char *)tea->card); > > > + seq_buf_puts(&s, " TEA5777"); > > > + seq_buf_terminate(&s); > > > + > > > > Why are the casts needed? > > Hi Alex, > > I added the casts to make conversions from u8/__u8 to > character-pointer types expected by the seq_buf helpers explicit. I was surprised that it wasn't needed before. In theory, strscpy() should be expecting the same types, so if it wasn't needed before, it shouldn't be needed now (and conversely, if it is needed now, it would have been needed before). > > I'm also considering simplifying these two-part string constructions > using scnprintf() instead. Would this approach be preferred? I certainly prefer scnprintf() over seq_buf. :) Have a lovely day! Alex --