Re: [PATCH 07/14] ide-cd: clear sense buffer before issuing requestsense

From: Tejun Heo
Date: Thu Mar 26 2009 - 03:26:13 EST


Hello,

Borislav Petkov wrote:
> Hmm, not quite. If its info->sense_data, then 18 is not correct. Rather,
> sizeof(struct request_sense) would be more likely the proper length. So,
> actually, it would be more like:
>
> unsigned sense_len = 18;
>
> if (sense == NULL) {
> sense = &info->sense_data;
> sense_len = sizeof(struct request_sense);
> }
>
> memset(sense, 0, sense_len);

Okay, will update as such. Thanks.

--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/