mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vladimir Zapolskiy <vz@mleia.com>
To: Kamil Konieczny <k.konieczny@partner.samsung.com>,
	linux-crypto@vger.kernel.org
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 2/2] crypto: s5p-sss: Add HASH support for Exynos
Date: Wed, 25 Oct 2017 07:32:46 +0300	[thread overview]
Message-ID: <12d1674b-c1a0-6a9b-644e-e0a40fbb4457@mleia.com> (raw)
In-Reply-To: <875af8c4-b2d5-2d24-962d-9e4db4652eee@partner.samsung.com>

Hi Kamil,

I'll just answer to your question, all the comments from you are accepted,
please send a new version with the minor fixes, hopefully the change will
be included into v4.15-rc.

On 10/24/2017 02:27 PM, Kamil Konieczny wrote:
> Hi Vladimir,
> 
> Thank you for review, I will apply almost all of your remarks,
> see answers below.
> 
> On 22.10.2017 12:18, Vladimir Zapolskiy wrote:
>> Hi Kamil,
>>
>> thank you for updates, I have just a few more comments.
>>

[snip]

>>> +/**
>>> + * s5p_hash_import - import hash state
>>> + * @req:	AHASH request
>>> + * @in:		buffer with state to be imported from
>>> + */
>>> +static int s5p_hash_import(struct ahash_request *req, const void *in)
>>> +{
>>> +	struct s5p_hash_reqctx *ctx = ahash_request_ctx(req);
>>> +	struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
>>> +	struct s5p_hash_ctx *tctx = crypto_ahash_ctx(tfm);
>>> +	const struct s5p_hash_reqctx *ctx_in = in;
>>> +
>>> +	memcpy(ctx, in, sizeof(*ctx) + BUFLEN);
>>> +	if (ctx_in->bufcnt < 0 || ctx_in->bufcnt > BUFLEN) {
>>
>> Now "ctx_in->bufcnt < 0" condition can be removed, moreover it
>> will eliminate a warning reproted by the compiler:
>>
>> drivers/crypto/s5p-sss.c:1748:21: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
>>   if (ctx_in->bufcnt < 0 || ctx_in->bufcnt > BUFLEN) {
>>                      ^
> 
> You are right, I will drop first condition. BTW what compiler options are you using ?
> This one was not reported by my compilation process.
> 

Regularly I specify 'make C=1 W=1' options to build a kernel with changes,
some of the new reported warnings are false positives, but in general it
makes sense to check the output to catch potential issues like this one.

--
With best wishes,
Vladimir

      reply	other threads:[~2017-10-25  4:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20171017112845eucas1p2f760753a372a15eafba4fd3368520eb0@eucas1p2.samsung.com>
2017-10-17 11:28 ` [PATCH v7 0/2] " Kamil Konieczny
     [not found]   ` <CGME20171017112845eucas1p2cd73bf6b6e97ada996c7693639e5a037@eucas1p2.samsung.com>
2017-10-17 11:28     ` [PATCH v7 1/2] crypto: s5p-sss: change spaces into tabs in defines Kamil Konieczny
2017-10-19  9:47       ` Krzysztof Kozlowski
2017-10-22 10:18       ` Vladimir Zapolskiy
2017-10-24 10:19         ` Kamil Konieczny
2017-10-25  4:21           ` Vladimir Zapolskiy
     [not found]   ` <CGME20171017112846eucas1p17185d93eb5f837643c880357b3a8053b@eucas1p1.samsung.com>
2017-10-17 11:28     ` [PATCH v7 2/2] crypto: s5p-sss: Add HASH support for Exynos Kamil Konieczny
2017-10-19  9:48       ` Krzysztof Kozlowski
2017-10-22 10:18       ` Vladimir Zapolskiy
2017-10-24 11:27         ` Kamil Konieczny
2017-10-25  4:32           ` Vladimir Zapolskiy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=12d1674b-c1a0-6a9b-644e-e0a40fbb4457@mleia.com \
    --to=vz@mleia.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=k.konieczny@partner.samsung.com \
    --cc=krzk@kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®