mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 10:20:17 -04:00
media: av7110: coding style fixes: sizeof
This patch fixes the following checkpatch warnings: WARNING:SIZEOF_PARENTHESIS: sizeof d should be sizeof(d) WARNING:SIZEOF_PARENTHESIS: sizeof f->fmt.sliced should be sizeof(f->fmt.sliced) WARNING:CONST_STRUCT: struct dvb_frontend_ops should normally be const CHECK:ALLOC_SIZEOF_STRUCT: Prefer kzalloc(sizeof(*av7110)...) over kzalloc(sizeof(struct av7110)...) Signed-off-by: Stefan Herdler <herdler@nurfuerspam.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
This commit is contained in:
committed by
Hans Verkuil
parent
3c08dc38e3
commit
e7b9b556aa
@@ -2437,7 +2437,7 @@ static int av7110_attach(struct saa7146_dev *dev,
|
||||
}
|
||||
|
||||
/* prepare the av7110 device struct */
|
||||
av7110 = kzalloc(sizeof(struct av7110), GFP_KERNEL);
|
||||
av7110 = kzalloc(sizeof(*av7110), GFP_KERNEL);
|
||||
if (!av7110) {
|
||||
dprintk(1, "out of memory\n");
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -557,7 +557,7 @@ static int vidioc_g_fmt_sliced_vbi_out(struct file *file, void *fh,
|
||||
dprintk(2, "VIDIOC_G_FMT:\n");
|
||||
if (FW_VERSION(av7110->arm_app) < 0x2623)
|
||||
return -EINVAL;
|
||||
memset(&f->fmt.sliced, 0, sizeof f->fmt.sliced);
|
||||
memset(&f->fmt.sliced, 0, sizeof(f->fmt.sliced));
|
||||
if (av7110->wssMode) {
|
||||
f->fmt.sliced.service_set = V4L2_SLICED_WSS_625;
|
||||
f->fmt.sliced.service_lines[0][23] = V4L2_SLICED_WSS_625;
|
||||
@@ -618,7 +618,7 @@ static ssize_t av7110_vbi_write(struct file *file, const char __user *data, size
|
||||
int rc;
|
||||
|
||||
dprintk(2, "%s\n", __func__);
|
||||
if (FW_VERSION(av7110->arm_app) < 0x2623 || !av7110->wssMode || count != sizeof d)
|
||||
if (FW_VERSION(av7110->arm_app) < 0x2623 || !av7110->wssMode || count != sizeof(d))
|
||||
return -EINVAL;
|
||||
if (copy_from_user(&d, data, count))
|
||||
return -EFAULT;
|
||||
|
||||
Reference in New Issue
Block a user