Message ID | 55D5DC97.1040209@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, Aug 20, 2015 at 03:56:39PM +0200, Corentin LABBE wrote: > > Thanks for the report, strange that I do not have that warning. > todo is always initialized, since oleft and ileft are always > 0 at start. > But setting todo to 0 is a simple fix. > The following patch will suppress the warning. Nack. Please do not fix spurious uninitialised warnings in this way. Not only is this pointless but if someone introduced a real uninitialised bug later on we'd never catch it because of this. Cheers,
diff --git a/drivers/crypto/sunxi-ss/sun4i-ss-cipher.c b/drivers/crypto/sunxi-ss/sun4i-ss-cipher.c index e070c31..9299914 100644 --- a/drivers/crypto/sunxi-ss/sun4i-ss-cipher.c +++ b/drivers/crypto/sunxi-ss/sun4i-ss-cipher.c @@ -32,7 +32,7 @@ static int sun4i_ss_opti_poll(struct ablkcipher_request *areq) int i, err = 0; unsigned int ileft = areq->nbytes; unsigned int oleft = areq->nbytes; - unsigned int todo; + unsigned int todo = 0; struct sg_mapping_iter mi, mo; unsigned int oi, oo; /* offset for in and out */ @@ -141,7 +141,7 @@ static int sun4i_ss_cipher_poll(struct ablkcipher_request *areq) int i, err = 0; unsigned int ileft = areq->nbytes; unsigned int oleft = areq->nbytes; - unsigned int todo; + unsigned int todo = 0; struct sg_mapping_iter mi, mo; unsigned int oi, oo; /* offset for in and out */ char buf[4 * SS_RX_MAX];/* buffer for linearize SG src */