From patchwork Mon Oct 19 20:59:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 55263 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by patches.linaro.org (Postfix) with ESMTPS id 2991922F11 for ; Mon, 19 Oct 2015 21:02:33 +0000 (UTC) Received: by lbbms9 with SMTP id ms9sf50484278lbb.3 for ; Mon, 19 Oct 2015 14:02:32 -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:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=HMT7p5cFsruCv19m5Q2RrFIeSEYemSYg/c/RIfl4RrA=; b=mXmPULqSpCaorXffc0irl80CIUJcy0FQLzaLcoR3bkn0JwnHL9IhzCtaR2rlitD1Qv Z19NvDOYo5HPSGK5ihw7sh29nVkQOJ/fezrVkCBkoj/uMqwnB/9MnLK6orSJejGO5D7Y Z+yywOv5doZCeDzAWQaDB/8uQhx79GhIJx9tqF1oYQZWSXs3jY0RSmRg2sIdBPC55ujy nWaDQtUjoFcexqZWWwVCKD2gN4uy7dPWLGiIjtAT8KzkLrinIZZwA1bFBO39qKgOtwfX /V8CMjvUwCHXUx13ErnFiSTXuxof+Zojwfgu5K0W6H7NSCCSpO9NhKG5nNp6YbqGkJGA TxkA== X-Gm-Message-State: ALoCoQnxoEqoD4mt14DJNCUJ6F7CJqkTmRVupUddSpFqDGpy3zF2vTKtJiLe5IYXyIVXope/QNBZ X-Received: by 10.112.12.132 with SMTP id y4mr6991929lbb.0.1445288552165; Mon, 19 Oct 2015 14:02:32 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.143.76 with SMTP id r73ls166893lfd.6.gmail; Mon, 19 Oct 2015 14:02:31 -0700 (PDT) X-Received: by 10.112.199.137 with SMTP id jk9mr15996089lbc.86.1445288551850; Mon, 19 Oct 2015 14:02:31 -0700 (PDT) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com. [209.85.217.178]) by mx.google.com with ESMTPS id c20si24311936lfb.26.2015.10.19.14.02.31 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Oct 2015 14:02:31 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) client-ip=209.85.217.178; Received: by lbbpp2 with SMTP id pp2so129193874lbb.0 for ; Mon, 19 Oct 2015 14:02:31 -0700 (PDT) X-Received: by 10.25.145.209 with SMTP id t200mr1585161lfd.88.1445288551719; Mon, 19 Oct 2015 14:02:31 -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 w3csp1697893lbq; Mon, 19 Oct 2015 14:02:30 -0700 (PDT) X-Received: by 10.67.4.230 with SMTP id ch6mr37378094pad.11.1445288550580; Mon, 19 Oct 2015 14:02:30 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a5si55344243pbu.76.2015.10.19.14.02.30; Mon, 19 Oct 2015 14:02:30 -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 S1754696AbbJSVC3 (ORCPT + 28 others); Mon, 19 Oct 2015 17:02:29 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:33831 "EHLO mail-wi0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750878AbbJSU77 (ORCPT ); Mon, 19 Oct 2015 16:59:59 -0400 Received: by wikq8 with SMTP id q8so17397016wik.1 for ; Mon, 19 Oct 2015 13:59:58 -0700 (PDT) X-Received: by 10.181.13.16 with SMTP id eu16mr24425144wid.10.1445288398115; Mon, 19 Oct 2015 13:59:58 -0700 (PDT) Received: from mai.telefonica.net (185.Red-213-96-199.staticIP.rima-tde.net. [213.96.199.185]) by smtp.gmail.com with ESMTPSA id xt1sm42296501wjb.32.2015.10.19.13.59.57 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 19 Oct 2015 13:59:57 -0700 (PDT) From: Daniel Lezcano To: tglx@linutronix.de Cc: linux-kernel@vger.kernel.org, mingo@kernel.org, Alexey Klimov Subject: [PATCH 3/9] clocksource/drivers/em_sti: Remove unneeded memset()s Date: Mon, 19 Oct 2015 22:59:22 +0200 Message-Id: <1445288368-6440-3-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1445288368-6440-1-git-send-email-daniel.lezcano@linaro.org> References: <56255943.6060807@linaro.org> <1445288368-6440-1-git-send-email-daniel.lezcano@linaro.org> 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: daniel.lezcano@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.178 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: , From: Alexey Klimov 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 Signed-off-by: Daniel Lezcano --- 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;