diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2022-08-18 23:01:17 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2022-08-24 22:06:15 +0200 |
commit | 8d0268585b9c07dd01b77b63913a4f31ad99239b (patch) | |
tree | a764a5aa61cae829518b2540f65affec55f632f4 /drivers/video/fbdev/sis | |
parent | fbdev: omap: Remove unnecessary print function dev_err() (diff) | |
download | linux-8d0268585b9c07dd01b77b63913a4f31ad99239b.tar.xz linux-8d0268585b9c07dd01b77b63913a4f31ad99239b.zip |
fbdev: Move fbdev drivers from strlcpy to strscpy
Follow the advice of the below link and prefer 'strscpy' in this
subsystem. Conversion is 1:1 because the return value is not used.
Generated by a coccinelle script.
Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'drivers/video/fbdev/sis')
-rw-r--r-- | drivers/video/fbdev/sis/sis_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/fbdev/sis/sis_main.c b/drivers/video/fbdev/sis/sis_main.c index d29ded67cecb..c9e77429dfa3 100644 --- a/drivers/video/fbdev/sis/sis_main.c +++ b/drivers/video/fbdev/sis/sis_main.c @@ -1872,7 +1872,7 @@ sisfb_get_fix(struct fb_fix_screeninfo *fix, int con, struct fb_info *info) memset(fix, 0, sizeof(struct fb_fix_screeninfo)); - strlcpy(fix->id, ivideo->myid, sizeof(fix->id)); + strscpy(fix->id, ivideo->myid, sizeof(fix->id)); mutex_lock(&info->mm_lock); fix->smem_start = ivideo->video_base + ivideo->video_offset; @@ -5879,7 +5879,7 @@ static int sisfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ivideo->cardnumber++; } - strlcpy(ivideo->myid, chipinfo->chip_name, sizeof(ivideo->myid)); + strscpy(ivideo->myid, chipinfo->chip_name, sizeof(ivideo->myid)); ivideo->warncount = 0; ivideo->chip_id = pdev->device; |