From patchwork Thu Sep 10 00:38:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Klimov X-Patchwork-Id: 53359 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by patches.linaro.org (Postfix) with ESMTPS id 8EA6422B05 for ; Thu, 10 Sep 2015 00:38:39 +0000 (UTC) Received: by lbbti1 with SMTP id ti1sf8601866lbb.3 for ; Wed, 09 Sep 2015 17:38:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=iQQkHxt7taqNi+WSu5xB6Mv2FeyHYIw6A02cD6AekVY=; b=V6gk6+QsHCmcgSSioWseqesZzNM+PEYJcfn7yMSuX/wVMQM8JMoyQ7O2pxy1UIsEVv 9v9lxxrmYOLJtHbU5IxtF8jNk8XCVJ72MfHUoay18zIu2u6oPwtRSkmWCYOsgDt3BbD3 AVwHkCBp6O0RP7N6lhYMKWcddbcmvbGDNqF3ErqESlL9cunODjGTM3dmGtgXYGc2uvqv u9bYfYesSqHLGqSWs2Sacaxy8S1xNeXNUuUQGvpXeTHUsh1mVN4d2BG2JJeD6GYGdu0H dkq8yGJh7B/JyJ0G2WlSHcvXx/vg6v2UQtWgKKPeWvfGzJO7RnDmimTlK/BgURC3BPLT wdSg== X-Gm-Message-State: ALoCoQllzdTzcoeRSHXj1rCZ4TjuhoVzMKFt7ZAcfi1mno0U+Vu0SCbuubSgbCjwWHJa6/Psy4qy X-Received: by 10.152.22.101 with SMTP id c5mr4467763laf.0.1441845518452; Wed, 09 Sep 2015 17:38:38 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.43.229 with SMTP id z5ls130529lal.8.gmail; Wed, 09 Sep 2015 17:38:38 -0700 (PDT) X-Received: by 10.152.36.41 with SMTP id n9mr32277439laj.65.1441845518239; Wed, 09 Sep 2015 17:38:38 -0700 (PDT) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com. [209.85.217.169]) by mx.google.com with ESMTPS id p6si6947319lag.109.2015.09.09.17.38.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Sep 2015 17:38:38 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) client-ip=209.85.217.169; Received: by lbbmp1 with SMTP id mp1so14773327lbb.1 for ; Wed, 09 Sep 2015 17:38:38 -0700 (PDT) X-Received: by 10.152.18.164 with SMTP id x4mr32988522lad.35.1441845518140; Wed, 09 Sep 2015 17:38:38 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp638237lbq; Wed, 9 Sep 2015 17:38:37 -0700 (PDT) X-Received: by 10.66.246.228 with SMTP id xz4mr68302876pac.46.1441845517099; Wed, 09 Sep 2015 17:38:37 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id if5si10787843pbb.200.2015.09.09.17.38.36; Wed, 09 Sep 2015 17:38:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753045AbbIJAie (ORCPT + 28 others); Wed, 9 Sep 2015 20:38:34 -0400 Received: from mail-la0-f52.google.com ([209.85.215.52]:35904 "EHLO mail-la0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752283AbbIJAic (ORCPT ); Wed, 9 Sep 2015 20:38:32 -0400 Received: by lanb10 with SMTP id b10so17521703lan.3 for ; Wed, 09 Sep 2015 17:38:30 -0700 (PDT) X-Received: by 10.152.36.7 with SMTP id m7mr31545141laj.87.1441845510136; Wed, 09 Sep 2015 17:38:30 -0700 (PDT) Received: from localhost.localdomain ([46.39.50.164]) by smtp.gmail.com with ESMTPSA id b5sm2209090laa.34.2015.09.09.17.38.28 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 09 Sep 2015 17:38:29 -0700 (PDT) From: Alexey Klimov To: linux-kernel@vger.kernel.org, daniel.lezcano@linaro.org Cc: tglx@linutronix.de, klimov.linux@gmail.com, ysato@users.sourceforge.jp, uclinux-h8-devel@lists.sourceforge.jp, yury.norov@gmail.com, Alexey Klimov Subject: [PATCH 1/3] clocksource: em_sti: remove unneeded memset()s Date: Thu, 10 Sep 2015 03:38:19 +0300 Message-Id: <1441845501-10197-1-git-send-email-alexey.klimov@linaro.org> X-Mailer: git-send-email 2.1.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: alexey.klimov@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Memory for cs and ced fields in struct em_sti_priv is allocated by devm_kzalloc() in the beginning of em_sti_probe() so they don't need to be zeroed one more time in em_sti_register_clocksource() and in em_sti_register_clockevent(). Signed-off-by: Alexey Klimov --- drivers/clocksource/em_sti.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/clocksource/em_sti.c b/drivers/clocksource/em_sti.c index 7a97a34..19bb179 100644 --- a/drivers/clocksource/em_sti.c +++ b/drivers/clocksource/em_sti.c @@ -228,7 +228,6 @@ static int em_sti_register_clocksource(struct em_sti_priv *p) { struct clocksource *cs = &p->cs; - memset(cs, 0, sizeof(*cs)); cs->name = dev_name(&p->pdev->dev); cs->rating = 200; cs->read = em_sti_clocksource_read; @@ -285,7 +284,6 @@ static void em_sti_register_clockevent(struct em_sti_priv *p) { struct clock_event_device *ced = &p->ced; - memset(ced, 0, sizeof(*ced)); ced->name = dev_name(&p->pdev->dev); ced->features = CLOCK_EVT_FEAT_ONESHOT; ced->rating = 200;