From patchwork Fri Oct 4 16:02:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roy Franz X-Patchwork-Id: 20833 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f71.google.com (mail-qe0-f71.google.com [209.85.128.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id F09FB2395E for ; Fri, 4 Oct 2013 16:02:33 +0000 (UTC) Received: by mail-qe0-f71.google.com with SMTP id a11sf8455328qen.2 for ; Fri, 04 Oct 2013 09:02:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=kqGVW/lRMNOz5oEpgbo5Wstjz/6tNBN89e1fXWZO+Rw=; b=Ag7orGkoWnKs5RN7zEoXfzSRF9qPfX3CBYz4iPK47Fx5NJrOmkwP/VfNs/jhhkv/en FqaDQRJ67woE1uY3agJqGlBm1nX76xqqAi22IJ/rY+puc2UOLOQx6Iiuz9TD4rLthTcJ 52kg34Mhessf9C6fm+EyOoOHemstgcPpKipUModqaeLWLcl3Xyq8P8rwAA6FLlu3EBRz mP9MfBNEJLqurr6bcqYGqczry58PD1JSO7P/hlKFenhqzGTxd+ryjqFRU9R5+CCZ/7VF EnKWRBs1kZxW/UYqgwBsSk6qhe92jCCRNswDdWlEDNzFZzq7QGwxyFGwywE3VfRSTtjn z55Q== X-Received: by 10.236.53.70 with SMTP id f46mr12619431yhc.17.1380902553419; Fri, 04 Oct 2013 09:02:33 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.70.228 with SMTP id p4ls1333999qeu.43.gmail; Fri, 04 Oct 2013 09:02:33 -0700 (PDT) X-Received: by 10.52.26.69 with SMTP id j5mr10895077vdg.21.1380902553275; Fri, 04 Oct 2013 09:02:33 -0700 (PDT) Received: from mail-vb0-f44.google.com (mail-vb0-f44.google.com [209.85.212.44]) by mx.google.com with ESMTPS id zw7si3495694vec.150.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 04 Oct 2013 09:02:33 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.44 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.44; Received: by mail-vb0-f44.google.com with SMTP id e13so2454049vbg.3 for ; Fri, 04 Oct 2013 09:02:33 -0700 (PDT) X-Gm-Message-State: ALoCoQmJ1Tq7Uo7Sk0G4XzUqz6NNa1SGIGZ/nlZ8f8PCJ1N5Lut4beGX5Vo2Lz4+Y/+Rn4ZKoWux X-Received: by 10.58.50.97 with SMTP id b1mr505842veo.32.1380902553149; Fri, 04 Oct 2013 09:02:33 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp51052vcz; Fri, 4 Oct 2013 09:02:32 -0700 (PDT) X-Received: by 10.229.75.9 with SMTP id w9mr18841950qcj.0.1380902552303; Fri, 04 Oct 2013 09:02:32 -0700 (PDT) Received: from mail-qc0-f176.google.com (mail-qc0-f176.google.com [209.85.216.176]) by mx.google.com with ESMTPS id x3si5867466qed.68.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 04 Oct 2013 09:02:32 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.216.176 is neither permitted nor denied by best guess record for domain of roy.franz@linaro.org) client-ip=209.85.216.176; Received: by mail-qc0-f176.google.com with SMTP id t7so2889666qcv.7 for ; Fri, 04 Oct 2013 09:02:32 -0700 (PDT) X-Received: by 10.49.131.39 with SMTP id oj7mr11909817qeb.40.1380902551978; Fri, 04 Oct 2013 09:02:31 -0700 (PDT) Received: from rfranz-t520.caveonetworks.com (static-108-20-23-67.bstnma.fios.verizon.net. [108.20.23.67]) by mx.google.com with ESMTPSA id x8sm30214121qam.2.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 04 Oct 2013 09:02:31 -0700 (PDT) From: Roy Franz To: mingo@kernel.org, linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org, matt.fleming@intel.com, hpa@zytor.com Cc: msalter@redhat.com, patches@linaro.org, Roy Franz Subject: [PATCH] Remove redundant and incorrect memset() Date: Fri, 4 Oct 2013 09:02:46 -0700 Message-Id: <1380902566-30867-1-git-send-email-roy.franz@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <20131003131054.GB27835@gmail.com> References: <20131003131054.GB27835@gmail.com> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: roy.franz@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.44 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Remove a redundant memset() call from efi_relocate_kernel() that was clearing memory that would be used by BSS in non-compressed images loaded with this function. This clear was redundant with the clearing done in the image itself, and also implemented incorrectly with a 0 length. Signed-off-by: Roy Franz Acked-by: Mark Salter --- drivers/firmware/efi/efi-stub-helper.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/firmware/efi/efi-stub-helper.c b/drivers/firmware/efi/efi-stub-helper.c index cc0581d..b6bffbf 100644 --- a/drivers/firmware/efi/efi-stub-helper.c +++ b/drivers/firmware/efi/efi-stub-helper.c @@ -567,8 +567,6 @@ static efi_status_t efi_relocate_kernel(efi_system_table_t *sys_table_arg, * have been allocated by UEFI, so we can safely use memcpy. */ memcpy((void *)new_addr, (void *)cur_image_addr, image_size); - /* Zero any extra space we may have allocated for BSS. */ - memset((void *)(new_addr + image_size), alloc_size - image_size, 0); /* Return the new address of the relocated image. */ *image_addr = new_addr;