Re: [PATCH 6/8] crypto: rsa - update accoring to akcipher API changes

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

 



On 09/09/2015 09:35 AM, Stephan Mueller wrote:
>> +	if (sg_is_last(req->dst)) {
>> >+		ret = mpi_read_buffer(c, sg_virt(req->dst), dst_len,
>> >+				      &req->out_len, &sign);
>> >+	} else {
>> >+		void *ptr = kmalloc(dst_len, GFP_KERNEL);
>> >+
>> >+		if (!ptr)
>> >+			goto err_free_m;
>> >+
>> >+		ret = mpi_read_buffer(c, ptr, dst_len, &req->out_len, &sign);
>> >+		scatterwalk_map_and_copy(ptr, req->dst, 0, dst_len, 1);
>> >+		kfree(ptr);
> Just a question: this code is present 4 times, can that be put into a separate 
> inline?
> 

I have put it like this because it is easier to read.
All 4 functions use different variable names according to the spec.
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



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

  Powered by Linux