re: md: raid 10 supports TRIM

From: Dan Carpenter <hidden>
Date: 2012-08-16 11:02:38

Hello Shaohua Li,

This is a semi-automatic email about new static checker warnings.

The patch d61b764704ca: "md: raid 10 supports TRIM" from Aug 15, 
2012, leads to the following Smatch complaint:

drivers/md/raid10.c:3510 run()
	 warn: variable dereferenced before check 'mddev->queue' (see line 3508)

drivers/md/raid10.c
  3507	
  3508		blk_queue_max_discard_sectors(mddev->queue, mddev->chunk_sectors);
                                              ^^^^^^^^^^^^
New dereference.

  3509		chunk_size = mddev->chunk_sectors << 9;
  3510		if (mddev->queue) {
                    ^^^^^^^^^^^^
Old check.

  3511			blk_queue_io_min(mddev->queue, chunk_size);
  3512			if (conf->geo.raid_disks % conf->geo.near_copies)

regards,
dan carpenter
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help