“708cff32b1f8b9cf6da2c1a4a5d8458fea6eea0a”上不存在“git@gitcode.net:paddlepaddle/Paddle.git”
提交 7c0c0b5b 编写于 作者: C Christophe Jaillet 提交者: Jens Axboe

drivers/block/pktcdvd.c: avoid useless memset

Avoid the 'memset(...,0, ...)' before calling 'init_cdrom_command' because
this function already does it.
Signed-off-by: NChristophe Jaillet <jaillet.christophe@wanadoo.fr>
Acked-by: NPeter Osterlund <petero2@telia.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
上级 fce53847
...@@ -2080,7 +2080,6 @@ static noinline_for_stack int pkt_write_caching(struct pktcdvd_device *pd, ...@@ -2080,7 +2080,6 @@ static noinline_for_stack int pkt_write_caching(struct pktcdvd_device *pd,
unsigned char buf[64]; unsigned char buf[64];
int ret; int ret;
memset(buf, 0, sizeof(buf));
init_cdrom_command(&cgc, buf, sizeof(buf), CGC_DATA_READ); init_cdrom_command(&cgc, buf, sizeof(buf), CGC_DATA_READ);
cgc.sense = &sense; cgc.sense = &sense;
cgc.buflen = pd->mode_offset + 12; cgc.buflen = pd->mode_offset + 12;
...@@ -2127,7 +2126,6 @@ static noinline_for_stack int pkt_get_max_speed(struct pktcdvd_device *pd, ...@@ -2127,7 +2126,6 @@ static noinline_for_stack int pkt_get_max_speed(struct pktcdvd_device *pd,
unsigned char *cap_buf; unsigned char *cap_buf;
int ret, offset; int ret, offset;
memset(buf, 0, sizeof(buf));
cap_buf = &buf[sizeof(struct mode_page_header) + pd->mode_offset]; cap_buf = &buf[sizeof(struct mode_page_header) + pd->mode_offset];
init_cdrom_command(&cgc, buf, sizeof(buf), CGC_DATA_UNKNOWN); init_cdrom_command(&cgc, buf, sizeof(buf), CGC_DATA_UNKNOWN);
cgc.sense = &sense; cgc.sense = &sense;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册