From patchwork Fri Apr 4 06:35:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 27739 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f199.google.com (mail-ve0-f199.google.com [209.85.128.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6A2EF2036E for ; Fri, 4 Apr 2014 06:42:28 +0000 (UTC) Received: by mail-ve0-f199.google.com with SMTP id jy13sf4762817veb.2 for ; Thu, 03 Apr 2014 23:42:27 -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: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=9x3k3gH2i55aqUmNQb80XA8PlYIrO7mST0k9TcztwdY=; b=Jv8R2i6qlQO1z3kwz8IrBfdJpvxeVw0dv7RBbLvpvmDTwSaBqNr9i6ufOzsSJ3TNgP oDnIYl2vY2VLrDxWxuf1/VF2oK6ftUZO+dgOtXxptZEYJY95FRaxDcBdWjkjoDWsLVff ZzU3RVuGOqGgysK6e6U0NlQ4leNTs03wUyocHO/9QX9SO+qsVLOWW50SMTIZXl9MzXF4 a93rpOosNDnt6WdYESdMOsDeTx6tfRH2mzjyBdEW1fl0bpQ6vTXuveNlMAmiz2Auntj1 47K+dixvJM0FHZw0aLq6WwKtyRW10z7UZXgfp3Gu6TvBxhwc5svJYWXlOycHUdRa4fXy qsEg== X-Gm-Message-State: ALoCoQmlvjgXPDyR8IzG3sgYNMrVuoySht8F+Mgjm4ex7zwdHL8S4BWKcNYJXKQ2oIblTg/mUNfj X-Received: by 10.58.198.3 with SMTP id iy3mr2586918vec.39.1396593747738; Thu, 03 Apr 2014 23:42:27 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.49.112 with SMTP id p103ls922673qga.41.gmail; Thu, 03 Apr 2014 23:42:27 -0700 (PDT) X-Received: by 10.58.105.105 with SMTP id gl9mr3541682veb.3.1396593747643; Thu, 03 Apr 2014 23:42:27 -0700 (PDT) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by mx.google.com with ESMTPS id dl6si623623veb.181.2014.04.03.23.42.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 03 Apr 2014 23:42:27 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.176; Received: by mail-ve0-f176.google.com with SMTP id db11so1091594veb.7 for ; Thu, 03 Apr 2014 23:42:27 -0700 (PDT) X-Received: by 10.52.0.193 with SMTP id 1mr9878500vdg.0.1396593747554; Thu, 03 Apr 2014 23:42:27 -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.220.12.8 with SMTP id v8csp89268vcv; Thu, 3 Apr 2014 23:42:27 -0700 (PDT) X-Received: by 10.66.164.70 with SMTP id yo6mr12853293pab.85.1396593746678; Thu, 03 Apr 2014 23:42:26 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id xt7si4198997pab.20.2014.04.03.23.42.25; Thu, 03 Apr 2014 23:42:25 -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 S1752446AbaDDGlK (ORCPT + 27 others); Fri, 4 Apr 2014 02:41:10 -0400 Received: from mail-wg0-f46.google.com ([74.125.82.46]:64525 "EHLO mail-wg0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752122AbaDDGk3 (ORCPT ); Fri, 4 Apr 2014 02:40:29 -0400 Received: by mail-wg0-f46.google.com with SMTP id b13so2910498wgh.17 for ; Thu, 03 Apr 2014 23:40:28 -0700 (PDT) X-Received: by 10.194.89.40 with SMTP id bl8mr1198447wjb.90.1396593628564; Thu, 03 Apr 2014 23:40:28 -0700 (PDT) Received: from localhost ([213.122.173.131]) by mx.google.com with ESMTPSA id g13sm9834093wjn.15.2014.04.03.23.40.25 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 03 Apr 2014 23:40:27 -0700 (PDT) From: Viresh Kumar To: tglx@linutronix.de Cc: linaro-kernel@lists.linaro.org, fweisbec@gmail.com, linaro-networking@linaro.org, Arvind.Chauhan@arm.com, linux-kernel@vger.kernel.org, Viresh Kumar Subject: [PATCH V2 07/36] hrtimer: replace sizeof(struct hrtimer) with sizeof(*timer) Date: Fri, 4 Apr 2014 12:05:50 +0530 Message-Id: <67b891e708df0147862e9107c6d920c9b9e9065b.1396592516.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: 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: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.176 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 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: , Linux coding guidelines says: The preferred form for passing a size of a struct is the following: p = kmalloc(sizeof(*p), ...); But __hrtimer_init() wasn't following that. Fix it. Signed-off-by: Viresh Kumar --- kernel/hrtimer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index f6b1968..db580ab 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c @@ -1166,7 +1166,7 @@ static void __hrtimer_init(struct hrtimer *timer, clockid_t clock_id, struct hrtimer_cpu_base *cpu_base; int base; - memset(timer, 0, sizeof(struct hrtimer)); + memset(timer, 0, sizeof(*timer)); cpu_base = &__raw_get_cpu_var(hrtimer_bases);