From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?J=FCrgen_Gro=DF?= Subject: Re: [PATCH][linux 2.6.18] remove pointless error handling in scsiback Date: Wed, 02 Jul 2014 14:38:12 +0200 Message-ID: <53B3FD34.2000401@suse.com> References: <1404285980-10817-1-git-send-email-jgross@suse.com> <53B40FC2020000780001F774@mail.emea.novell.com> <53B3F75B.10805@suse.com> <53B416E2020000780001F80D@mail.emea.novell.com> <53B41856020000780001F81B@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53B41856020000780001F81B@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 07/02/2014 02:33 PM, Jan Beulich wrote: >>>> On 02.07.14 at 14:27, wrote: >>>>> On 02.07.14 at 14:13, wrote: >>> On 07/02/2014 01:57 PM, Jan Beulich wrote: >>>> @@ -229,8 +230,8 @@ static void __report_luns(pending_req_t >>>> unsigned int req_bufflen = 0; >>>> unsigned int actual_len = 0; >>>> unsigned int retry_cnt = 0; >>> >>> When you are cleaning up local variables, IMHO you could remove above 3 >>> unneeded initializations, too. >> >> Certainly not retry_cnt, but perhaps you meant (apart from the other >> two visible here) alloc_luns (immediately prior to the first context line). Sorry, yes. >> Yes, I guess I'll do that. > > And indeed very useful to have this done, as it resulted in me spotting > that alloc_len was of type unsigned char, i.e. setting us up for memory > corruption as soon as the total buffer size needed would exceed 255 > bytes. Fixed at once (and I take it that this doesn't invalidate your > Reviewed-by). In this case covered by "In any case" :-) Juergen