From patchwork Thu Nov 3 21:44:53 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob X-Patchwork-Id: 4932 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 500EA23E06 for ; Thu, 3 Nov 2011 21:51:25 +0000 (UTC) Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52]) by fiordland.canonical.com (Postfix) with ESMTP id 3E335A18002 for ; Thu, 3 Nov 2011 21:51:25 +0000 (UTC) Received: by faan26 with SMTP id n26so2965451faa.11 for ; Thu, 03 Nov 2011 14:51:25 -0700 (PDT) Received: by 10.152.104.206 with SMTP id gg14mr100031lab.41.1320357085011; Thu, 03 Nov 2011 14:51:25 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.14.103 with SMTP id o7cs104673lac; Thu, 3 Nov 2011 14:51:24 -0700 (PDT) Received: by 10.236.173.199 with SMTP id v47mr16114154yhl.11.1320356931684; Thu, 03 Nov 2011 14:48:51 -0700 (PDT) Received: from mail-gx0-f178.google.com (mail-gx0-f178.google.com [209.85.161.178]) by mx.google.com with ESMTPS id d47si8706867yhn.56.2011.11.03.14.48.50 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 03 Nov 2011 14:48:51 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.161.178 is neither permitted nor denied by best guess record for domain of rob.lee@linaro.org) client-ip=209.85.161.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.161.178 is neither permitted nor denied by best guess record for domain of rob.lee@linaro.org) smtp.mail=rob.lee@linaro.org Received: by ggnh1 with SMTP id h1so2009745ggn.37 for ; Thu, 03 Nov 2011 14:48:50 -0700 (PDT) Received: by 10.150.227.21 with SMTP id z21mr4041675ybg.54.1320356695270; Thu, 03 Nov 2011 14:44:55 -0700 (PDT) Received: from localhost.localdomain ([71.46.235.243]) by mx.google.com with ESMTPS id l27sm20792484ani.21.2011.11.03.14.44.54 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 03 Nov 2011 14:44:54 -0700 (PDT) From: Robert Lee To: rjw@sisk.pl Cc: len.brown@intel.com, hpa@linux.intel.com, daniel.lezcano@linaro.org, amit.kucheria@linaro.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, patches@linaro.org Subject: [PATCH] pm: remove useless array definition in cpuidle_structure Date: Thu, 3 Nov 2011 17:44:53 -0400 Message-Id: <1320356693-18982-1-git-send-email-rob.lee@linaro.org> X-Mailer: git-send-email 1.7.4.1 From: Daniel Lezcano All the modules name are ro-data, it is never copied to the array. eg. static struct cpuidle_driver intel_idle_driver = { .name = "intel_idle", .owner = THIS_MODULE, }; It safe to assign the pointer of this ro-data to a const char *. By this way we save 12 bytes. Signed-off-by: Daniel Lezcano Signed-off-by: Robert Lee Tested-by: Deepthi Dharwar Reviewed-by: Deepthi Dharwar --- include/linux/cpuidle.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index b51629e..16f9dce 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h @@ -117,8 +117,8 @@ static inline int cpuidle_get_last_residency(struct cpuidle_device *dev) ****************************/ struct cpuidle_driver { - char name[CPUIDLE_NAME_LEN]; - struct module *owner; + const char *name; + struct module *owner; }; #ifdef CONFIG_CPU_IDLE