Skip to content

Commit

Permalink
ps3av: Use __func__ instead of __FUNCTION__
Browse files Browse the repository at this point in the history
ps3av: Replace GNU extension `__FUNCTION__' by C99 `__func__'

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Geert Uytterhoeven authored and Linus Torvalds committed May 5, 2007
1 parent d778c9a commit 253f04e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 33 deletions.
42 changes: 20 additions & 22 deletions drivers/ps3/ps3av.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ static int ps3av_parse_event_packet(const struct ps3av_reply_hdr *hdr)
else
printk(KERN_ERR
"%s: failed event packet, cid:%08x size:%d\n",
__FUNCTION__, hdr->cid, hdr->size);
__func__, hdr->cid, hdr->size);
return 1; /* receive event packet */
}
return 0;
Expand All @@ -198,7 +198,7 @@ static int ps3av_send_cmd_pkt(const struct ps3av_send_hdr *send_buf,
if (res < 0) {
dev_dbg(&ps3av_dev.core,
"%s: ps3av_vuart_write() failed (result=%d)\n",
__FUNCTION__, res);
__func__, res);
return res;
}

Expand All @@ -211,7 +211,7 @@ static int ps3av_send_cmd_pkt(const struct ps3av_send_hdr *send_buf,
if (res != PS3AV_HDR_SIZE) {
dev_dbg(&ps3av_dev.core,
"%s: ps3av_vuart_read() failed (result=%d)\n",
__FUNCTION__, res);
__func__, res);
return res;
}

Expand All @@ -221,7 +221,7 @@ static int ps3av_send_cmd_pkt(const struct ps3av_send_hdr *send_buf,
if (res < 0) {
dev_dbg(&ps3av_dev.core,
"%s: ps3av_vuart_read() failed (result=%d)\n",
__FUNCTION__, res);
__func__, res);
return res;
}
res += PS3AV_HDR_SIZE; /* total len */
Expand All @@ -231,7 +231,7 @@ static int ps3av_send_cmd_pkt(const struct ps3av_send_hdr *send_buf,

if ((cmd | PS3AV_REPLY_BIT) != recv_buf->cid) {
dev_dbg(&ps3av_dev.core, "%s: reply err (result=%x)\n",
__FUNCTION__, recv_buf->cid);
__func__, recv_buf->cid);
return -EINVAL;
}

Expand Down Expand Up @@ -293,7 +293,7 @@ int ps3av_do_pkt(u32 cid, u16 send_len, size_t usr_buf_size,
if (res < 0) {
printk(KERN_ERR
"%s: ps3av_send_cmd_pkt() failed (result=%d)\n",
__FUNCTION__, res);
__func__, res);
goto err;
}

Expand All @@ -302,7 +302,7 @@ int ps3av_do_pkt(u32 cid, u16 send_len, size_t usr_buf_size,
usr_buf_size);
if (res < 0) {
printk(KERN_ERR "%s: put_return_status() failed (result=%d)\n",
__FUNCTION__, res);
__func__, res);
goto err;
}

Expand All @@ -311,7 +311,7 @@ int ps3av_do_pkt(u32 cid, u16 send_len, size_t usr_buf_size,

err:
mutex_unlock(&ps3av.mutex);
printk(KERN_ERR "%s: failed cid:%x res:%d\n", __FUNCTION__, cid, res);
printk(KERN_ERR "%s: failed cid:%x res:%d\n", __func__, cid, res);
return res;
}

Expand Down Expand Up @@ -522,7 +522,7 @@ static void ps3av_set_videomode_cont(u32 id, u32 old_id)
if (res == PS3AV_STATUS_NO_SYNC_HEAD)
printk(KERN_WARNING
"%s: Command failed. Please try your request again. \n",
__FUNCTION__);
__func__);
else if (res)
dev_dbg(&ps3av_dev.core, "ps3av_cmd_avb_param failed\n");

Expand Down Expand Up @@ -715,8 +715,7 @@ int ps3av_set_video_mode(u32 id, int boot)

size = ARRAY_SIZE(video_mode_table);
if ((id & PS3AV_MODE_MASK) > size - 1 || id < 0) {
dev_dbg(&ps3av_dev.core, "%s: error id :%d\n", __FUNCTION__,
id);
dev_dbg(&ps3av_dev.core, "%s: error id :%d\n", __func__, id);
return -EINVAL;
}

Expand All @@ -725,8 +724,7 @@ int ps3av_set_video_mode(u32 id, int boot)
if ((id & PS3AV_MODE_MASK) == 0) {
id = ps3av_auto_videomode(&ps3av.av_hw_conf, boot);
if (id < 1) {
printk(KERN_ERR "%s: invalid id :%d\n", __FUNCTION__,
id);
printk(KERN_ERR "%s: invalid id :%d\n", __func__, id);
return -EINVAL;
}
id |= option;
Expand Down Expand Up @@ -786,7 +784,7 @@ int ps3av_get_scanmode(int id)
id = id & PS3AV_MODE_MASK;
size = ARRAY_SIZE(video_mode_table);
if (id > size - 1 || id < 0) {
printk(KERN_ERR "%s: invalid mode %d\n", __FUNCTION__, id);
printk(KERN_ERR "%s: invalid mode %d\n", __func__, id);
return -EINVAL;
}
return video_mode_table[id].interlace;
Expand All @@ -801,7 +799,7 @@ int ps3av_get_refresh_rate(int id)
id = id & PS3AV_MODE_MASK;
size = ARRAY_SIZE(video_mode_table);
if (id > size - 1 || id < 0) {
printk(KERN_ERR "%s: invalid mode %d\n", __FUNCTION__, id);
printk(KERN_ERR "%s: invalid mode %d\n", __func__, id);
return -EINVAL;
}
return video_mode_table[id].freq;
Expand All @@ -817,7 +815,7 @@ int ps3av_video_mode2res(u32 id, u32 *xres, u32 *yres)
id = id & PS3AV_MODE_MASK;
size = ARRAY_SIZE(video_mode_table);
if (id > size - 1 || id < 0) {
printk(KERN_ERR "%s: invalid mode %d\n", __FUNCTION__, id);
printk(KERN_ERR "%s: invalid mode %d\n", __func__, id);
return -EINVAL;
}
*xres = video_mode_table[id].x;
Expand Down Expand Up @@ -853,7 +851,7 @@ int ps3av_dev_open(void)
status = lv1_gpu_open(0);
if (status) {
printk(KERN_ERR "%s: lv1_gpu_open failed %d\n",
__FUNCTION__, status);
__func__, status);
ps3av.open_count--;
}
}
Expand All @@ -870,13 +868,13 @@ int ps3av_dev_close(void)

mutex_lock(&ps3av.mutex);
if (ps3av.open_count <= 0) {
printk(KERN_ERR "%s: GPU already closed\n", __FUNCTION__);
printk(KERN_ERR "%s: GPU already closed\n", __func__);
status = -1;
} else if (!--ps3av.open_count) {
status = lv1_gpu_close();
if (status)
printk(KERN_WARNING "%s: lv1_gpu_close failed %d\n",
__FUNCTION__, status);
__func__, status);
}
mutex_unlock(&ps3av.mutex);

Expand Down Expand Up @@ -926,7 +924,7 @@ static int ps3av_probe(struct ps3_vuart_port_device *dev)
/* init avsetting modules */
res = ps3av_cmd_init();
if (res < 0)
printk(KERN_ERR "%s: ps3av_cmd_init failed %d\n", __FUNCTION__,
printk(KERN_ERR "%s: ps3av_cmd_init failed %d\n", __func__,
res);

ps3av_get_hw_conf(&ps3av);
Expand Down Expand Up @@ -978,15 +976,15 @@ static int ps3av_module_init(void)
if (error) {
printk(KERN_ERR
"%s: ps3_vuart_port_driver_register failed %d\n",
__FUNCTION__, error);
__func__, error);
return error;
}

error = ps3_vuart_port_device_register(&ps3av_dev);
if (error)
printk(KERN_ERR
"%s: ps3_vuart_port_device_register failed %d\n",
__FUNCTION__, error);
__func__, error);

return error;
}
Expand Down
20 changes: 9 additions & 11 deletions drivers/ps3/ps3av_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ u32 ps3av_cmd_set_video_mode(void *p, u32 head, int video_vid, int video_fmt,
video_mode->video_order = ps3av_video_fmt_table[video_fmt].order;

pr_debug("%s: video_mode:vid:%x width:%d height:%d pitch:%d out_format:%d format:%x order:%x\n",
__FUNCTION__, video_vid, video_mode->width, video_mode->height,
__func__, video_vid, video_mode->width, video_mode->height,
video_mode->pitch, video_mode->video_out_format,
video_mode->video_format, video_mode->video_order);
return sizeof(*video_mode);
Expand Down Expand Up @@ -477,7 +477,7 @@ static u8 ps3av_cnv_mclk(u32 fs)
if (ps3av_cnv_mclk_table[i].fs == fs)
return ps3av_cnv_mclk_table[i].mclk;

printk(KERN_ERR "%s failed, fs:%x\n", __FUNCTION__, fs);
printk(KERN_ERR "%s failed, fs:%x\n", __func__, fs);
return 0;
}

Expand Down Expand Up @@ -526,13 +526,12 @@ static void ps3av_cnv_ns(u8 *ns, u32 fs, u32 video_vid)
d = 4;
break;
default:
printk(KERN_ERR "%s failed, vid:%x\n", __FUNCTION__,
video_vid);
printk(KERN_ERR "%s failed, vid:%x\n", __func__, video_vid);
break;
}

if (fs < PS3AV_CMD_AUDIO_FS_44K || fs > PS3AV_CMD_AUDIO_FS_192K)
printk(KERN_ERR "%s failed, fs:%x\n", __FUNCTION__, fs);
printk(KERN_ERR "%s failed, fs:%x\n", __func__, fs);
else
ns_val = ps3av_ns_table[PS3AV_CMD_AUDIO_FS_44K-BASE][d];

Expand All @@ -555,8 +554,7 @@ static u8 ps3av_cnv_enable(u32 source, const u8 *enable)
ret = ((p[0] << 4) + (p[1] << 5) + (p[2] << 6) + (p[3] << 7)) |
0x01;
} else
printk(KERN_ERR "%s failed, source:%x\n", __FUNCTION__,
source);
printk(KERN_ERR "%s failed, source:%x\n", __func__, source);
return ret;
}

Expand Down Expand Up @@ -585,7 +583,7 @@ static u8 ps3av_cnv_inputlen(u32 word_bits)
ret = PS3AV_CMD_AV_INPUTLEN_24;
break;
default:
printk(KERN_ERR "%s failed, word_bits:%x\n", __FUNCTION__,
printk(KERN_ERR "%s failed, word_bits:%x\n", __func__,
word_bits);
break;
}
Expand All @@ -595,7 +593,7 @@ static u8 ps3av_cnv_inputlen(u32 word_bits)
static u8 ps3av_cnv_layout(u32 num_of_ch)
{
if (num_of_ch > PS3AV_CMD_AUDIO_NUM_OF_CH_8) {
printk(KERN_ERR "%s failed, num_of_ch:%x\n", __FUNCTION__,
printk(KERN_ERR "%s failed, num_of_ch:%x\n", __func__,
num_of_ch);
return 0;
}
Expand Down Expand Up @@ -864,7 +862,7 @@ int ps3av_cmd_avb_param(struct ps3av_pkt_avb_param *avb, u32 send_len)

res = get_status(avb);
if (res)
pr_debug("%s: PS3AV_CID_AVB_PARAM: failed %x\n", __FUNCTION__,
pr_debug("%s: PS3AV_CID_AVB_PARAM: failed %x\n", __func__,
res);

out:
Expand Down Expand Up @@ -1013,7 +1011,7 @@ int ps3av_vuart_read(struct ps3_vuart_port_device *dev, void *buf,
return size;
if (error != -EAGAIN) {
printk(KERN_ERR "%s: ps3_vuart_read failed %d\n",
__FUNCTION__, error);
__func__, error);
return error;
}
msleep(POLLING_INTERVAL);
Expand Down

0 comments on commit 253f04e

Please sign in to comment.