lkml.org 
[lkml]   [2008]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 08/32] ide-tape: remove struct idetape_capabilities_page_t
Date
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.


\
 
 \ /
  Last update: 2008-01-27 20:37    [W:0.202 / U:1.908 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site