Re: [PATCH 00/10] Fix alignment issues in staging/ccree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 3, 2017 at 3:28 PM, Simon Sandström <simon@xxxxxxxxxx> wrote:
> On Mon, Jul 03, 2017 at 10:19:31AM +0300, Gilad Ben-Yossef wrote:
>> but for the few cases where its a complex expression that can be
>> broken down like this one:
>>
>> WARNING: line over 80 characters
>> #93: FILE: drivers/staging/ccree/ssi_buffer_mgr.c:437:
>> +     (AES_BLOCK_SIZE + areq_ctx->ccm_hdr_size),
>>
>> It would be great if you fix those.
>
> Do you mean to fix them by just breaking the line after the ternary
> operator? Is that OK according to the code style rules?

Yes, it is.

>
> If not, then the two warnings in ssi_aead_handle_config_buf can be
> fixed by simply having a local variable:
>
> const unsigned int buflen = AES_BLOCK_SIZE + areq_ctx->ccm_hdr_size;
>
> but I'm not sure if the same can be done in
> ssi_buffer_mgr_map_hash_request_update for (update_data_len - *curr_buf_cnt)
> as it's not always the case that update_data_len is greater than
> *curr_buf_cnt. Even if it's safe to always calculate it I'm not
> entierly sure what to call the variable.

No need not. I simply meant to break this:

 (update_data_len - *curr_buf_cnt)

To this:

 (update_data_len -
   *curr_buf_cnt)

Assuming it made sense.

> Other then those two functions I don't think that there are any more
> lines that can be fixed without renaming functions / variables or
> by rewriting them to decrease the indentation depth, as you wrote.

No, not in this patch.

Thanks!
Gilad

-- 
Gilad Ben-Yossef
Chief Coffee Drinker

"If you take a class in large-scale robotics, can you end up in a
situation where the homework eats your dog?"
 -- Jean-Baptiste Queru




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux