[media] staging/media: Use dev_ printks in go7007/go7007-fw.c
fixed below checkpatch warning. - WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then pr_debug(... to printk(KERN_DEBUG ... - WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
76705fe8e1
commit
792807140e
|
@ -382,8 +382,8 @@ static int gen_mjpeghdr_to_package(struct go7007 *go, __le16 *code, int space)
|
||||||
|
|
||||||
buf = kzalloc(4096, GFP_KERNEL);
|
buf = kzalloc(4096, GFP_KERNEL);
|
||||||
if (buf == NULL) {
|
if (buf == NULL) {
|
||||||
printk(KERN_ERR "go7007: unable to allocate 4096 bytes for "
|
dev_err(go->dev,
|
||||||
"firmware construction\n");
|
"unable to allocate 4096 bytes for firmware construction\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -652,8 +652,8 @@ static int gen_mpeg1hdr_to_package(struct go7007 *go,
|
||||||
|
|
||||||
buf = kzalloc(5120, GFP_KERNEL);
|
buf = kzalloc(5120, GFP_KERNEL);
|
||||||
if (buf == NULL) {
|
if (buf == NULL) {
|
||||||
printk(KERN_ERR "go7007: unable to allocate 5120 bytes for "
|
dev_err(go->dev,
|
||||||
"firmware construction\n");
|
"unable to allocate 5120 bytes for firmware construction\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
framelen[0] = mpeg1_frame_header(go, buf, 0, 1, PFRAME);
|
framelen[0] = mpeg1_frame_header(go, buf, 0, 1, PFRAME);
|
||||||
|
@ -839,8 +839,8 @@ static int gen_mpeg4hdr_to_package(struct go7007 *go,
|
||||||
|
|
||||||
buf = kzalloc(5120, GFP_KERNEL);
|
buf = kzalloc(5120, GFP_KERNEL);
|
||||||
if (buf == NULL) {
|
if (buf == NULL) {
|
||||||
printk(KERN_ERR "go7007: unable to allocate 5120 bytes for "
|
dev_err(go->dev,
|
||||||
"firmware construction\n");
|
"unable to allocate 5120 bytes for firmware construction\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
framelen[0] = mpeg4_frame_header(go, buf, 0, PFRAME);
|
framelen[0] = mpeg4_frame_header(go, buf, 0, PFRAME);
|
||||||
|
@ -1545,9 +1545,8 @@ static int do_special(struct go7007 *go, u16 type, __le16 *code, int space,
|
||||||
case SPECIAL_MODET:
|
case SPECIAL_MODET:
|
||||||
return modet_to_package(go, code, space);
|
return modet_to_package(go, code, space);
|
||||||
}
|
}
|
||||||
printk(KERN_ERR
|
dev_err(go->dev,
|
||||||
"go7007: firmware file contains unsupported feature %04x\n",
|
"firmware file contains unsupported feature %04x\n", type);
|
||||||
type);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1577,15 +1576,16 @@ int go7007_construct_fw_image(struct go7007 *go, u8 **fw, int *fwlen)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (request_firmware(&fw_entry, go->board_info->firmware, go->dev)) {
|
if (request_firmware(&fw_entry, go->board_info->firmware, go->dev)) {
|
||||||
printk(KERN_ERR
|
dev_err(go->dev,
|
||||||
"go7007: unable to load firmware from file \"%s\"\n",
|
"unable to load firmware from file \"%s\"\n",
|
||||||
go->board_info->firmware);
|
go->board_info->firmware);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
code = kzalloc(codespace * 2, GFP_KERNEL);
|
code = kzalloc(codespace * 2, GFP_KERNEL);
|
||||||
if (code == NULL) {
|
if (code == NULL) {
|
||||||
printk(KERN_ERR "go7007: unable to allocate %d bytes for "
|
dev_err(go->dev,
|
||||||
"firmware construction\n", codespace * 2);
|
"unable to allocate %d bytes for firmware construction\n",
|
||||||
|
codespace * 2);
|
||||||
goto fw_failed;
|
goto fw_failed;
|
||||||
}
|
}
|
||||||
src = (__le16 *)fw_entry->data;
|
src = (__le16 *)fw_entry->data;
|
||||||
|
@ -1594,9 +1594,9 @@ int go7007_construct_fw_image(struct go7007 *go, u8 **fw, int *fwlen)
|
||||||
chunk_flags = __le16_to_cpu(src[0]);
|
chunk_flags = __le16_to_cpu(src[0]);
|
||||||
chunk_len = __le16_to_cpu(src[1]);
|
chunk_len = __le16_to_cpu(src[1]);
|
||||||
if (chunk_len + 2 > srclen) {
|
if (chunk_len + 2 > srclen) {
|
||||||
printk(KERN_ERR "go7007: firmware file \"%s\" "
|
dev_err(go->dev,
|
||||||
"appears to be corrupted\n",
|
"firmware file \"%s\" appears to be corrupted\n",
|
||||||
go->board_info->firmware);
|
go->board_info->firmware);
|
||||||
goto fw_failed;
|
goto fw_failed;
|
||||||
}
|
}
|
||||||
if (chunk_flags & mode_flag) {
|
if (chunk_flags & mode_flag) {
|
||||||
|
@ -1604,17 +1604,15 @@ int go7007_construct_fw_image(struct go7007 *go, u8 **fw, int *fwlen)
|
||||||
ret = do_special(go, __le16_to_cpu(src[2]),
|
ret = do_special(go, __le16_to_cpu(src[2]),
|
||||||
&code[i], codespace - i, framelen);
|
&code[i], codespace - i, framelen);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
printk(KERN_ERR "go7007: insufficient "
|
dev_err(go->dev,
|
||||||
"memory for firmware "
|
"insufficient memory for firmware construction\n");
|
||||||
"construction\n");
|
|
||||||
goto fw_failed;
|
goto fw_failed;
|
||||||
}
|
}
|
||||||
i += ret;
|
i += ret;
|
||||||
} else {
|
} else {
|
||||||
if (codespace - i < chunk_len) {
|
if (codespace - i < chunk_len) {
|
||||||
printk(KERN_ERR "go7007: insufficient "
|
dev_err(go->dev,
|
||||||
"memory for firmware "
|
"insufficient memory for firmware construction\n");
|
||||||
"construction\n");
|
|
||||||
goto fw_failed;
|
goto fw_failed;
|
||||||
}
|
}
|
||||||
memcpy(&code[i], &src[2], chunk_len * 2);
|
memcpy(&code[i], &src[2], chunk_len * 2);
|
||||||
|
|
Loading…
Reference in a new issue