Re: [PATCH 08/32] ide-tape: remove struct idetape_capabilities_page_t

Bartlomiej Zolnierkiewicz
2008-01-27T19:34:16Z

On Sunday 27 January 2008, Borislav Petkov wrote:
> From: Borislav Petkov <bbpetkov@yahoo.de>
>
> All those 2-byte values denoting the different capabilities are being written to
> the local copy of the caps buffer without being converted to big endian for
> simplicity of usage and shorter code later. Also, we add some comments stating
> which are the fields of the caps page in question in order to alleviate the
> cryptic pointer casting exercises as in e.g. idetape_get_mode_sense_results().
>
> There should be no functional changes resulting from this patch.
>
> Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>

applied

> ---
> drivers/ide/ide-tape.c | 143 +++++++++++++++++++-----------------------------
> 1 files changed, 57 insertions(+), 86 deletions(-)

[...]

> - tape->capabilities = *capabilities; /* Save us a copy */
> - if (capabilities->blk512)
> + memcpy(&tape->caps, caps, 20);
> + if (!!(caps[7] & 0x02))
> tape->tape_block_size = 512;
> - else if (capabilities->blk1024)
> + else if (!!(caps[7] & 0x04))
> tape->tape_block_size = 1024;
> +

I removed needless "!!" and extra newline while merging the patch.