2011/10/20 Michal Nazarewicz <mina86@xxxxxxxxxx>: > On Thu, 20 Oct 2011 03:01:47 -0700, Yuping Luo <lypingsh@xxxxxxxxx> wrote: >> >> @@ -2027,9 +2037,9 @@ static int do_scsi_command(struct fsg_common >> *common) >> >> case READ_6: >> i = common->cmnd[4]; >> - common->data_size_from_cmnd = (i == 0 ? 256 : i) << >> - common->curlun->blkbits; >> - reply = check_command(common, 6, DATA_DIR_TO_HOST, >> + common->data_size_from_cmnd = (i == 0 ? 256 : i); > > At this point parens are not really needed. > agree, the following is more readable common->data_size_from_cmnd = (i == 0) ? 256 : i; >> + reply = check_command_size_in_blocks(common, 6, >> + DATA_DIR_TO_HOST, >> (7<<1) | (1<<4), 1, >> "READ(6)"); >> if (reply == 0) > > -- > Best regards, _ _ > .o. | Liege of Serenely Enlightened Majesty of o' \,=./ `o > ..o | Computer Science, Michał "mina86" Nazarewicz (o o) > ooo +----<email/xmpp: mpn@xxxxxxxxxx>--------------ooO--(_)--Ooo-- > -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html