From: "Jan Beulich" Subject: Re: [PATCH][linux 2.6.18] remove pointless error handling in scsiback Date: Wed, 02 Jul 2014 13:33:58 +0100 Message-ID: <53B41856020000780001F81B@mail.emea.novell.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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53B416E2020000780001F80D@mail.emea.novell.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Juergen Gross Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> 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). > 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). Jan