From patchwork Mon Mar 26 12:51:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 7465 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 5ACA223E12 for ; Mon, 26 Mar 2012 12:51:31 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 23446A188A0 for ; Mon, 26 Mar 2012 12:51:31 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id e36so10845518iag.11 for ; Mon, 26 Mar 2012 05:51:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=y3llerxvmJR3TbnF9mpPytoTE+HPSdGJcqMaxc61vLo=; b=pwXIo4QlVYgyT80sWTWTnsFUEBnvpCYtrdQKCgNq0tukvapv33UlxYFMKWrgEF7Riy CmKgGYSkfbBjNKVNTpplXjoUY8jyjklX+0z6uCdCDOzGoOe50zh1SLBYrNtitJ7GlGYK KiRqTMBJ1PLthQDU1cRNtTyyC3rcPwAhIh7Y5QEmSpM+duz6oPXNwg0zzazwAzGLP2LW V4fQNWaa3vaVk2URl7Y2Nbd1pg/gZnqdSfp6croFyqXyIUYvBOO40TzJdWb9TIXSfW/k 2EewBwHVkPmLNQflI96QZbj60vzY7++RYL+xIJaCQGLKhiecykHxOoObmsG2U8HDK3w3 SDug== Received: by 10.50.46.195 with SMTP id x3mr5497922igm.54.1332766290931; Mon, 26 Mar 2012 05:51:30 -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.231.5.205 with SMTP id 13csp18467ibw; Mon, 26 Mar 2012 05:51:30 -0700 (PDT) Received: by 10.180.107.164 with SMTP id hd4mr18181832wib.18.1332766288729; Mon, 26 Mar 2012 05:51:28 -0700 (PDT) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by mx.google.com with ESMTPS id bz16si15369967wib.25.2012.03.26.05.51.28 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 26 Mar 2012 05:51:28 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.50 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=74.125.82.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.50 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) smtp.mail=daniel.lezcano@linaro.org Received: by wgbds12 with SMTP id ds12so3792848wgb.31 for ; Mon, 26 Mar 2012 05:51:28 -0700 (PDT) Received: by 10.216.134.205 with SMTP id s55mr12277005wei.100.1332766288203; Mon, 26 Mar 2012 05:51:28 -0700 (PDT) Received: from localhost.localdomain (AToulouse-159-1-37-30.w92-134.abo.wanadoo.fr. [92.134.76.30]) by mx.google.com with ESMTPS id b3sm40713855wib.4.2012.03.26.05.51.26 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 26 Mar 2012 05:51:27 -0700 (PDT) From: Daniel Lezcano To: lenb@kernel.org Cc: linaro-dev@lists.linaro.org, patches@linaro.org, linux-pm@lists.linux-foundation.org Subject: [PATCH 2/3] cpuidle: remove useless array definition in cpuidle_structure Date: Mon, 26 Mar 2012 14:51:27 +0200 Message-Id: <1332766288-30412-2-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1332766288-30412-1-git-send-email-daniel.lezcano@linaro.org> References: <1332766288-30412-1-git-send-email-daniel.lezcano@linaro.org> X-Gm-Message-State: ALoCoQkgbFOIGHr1LSBqosSQLZIqLxg/Waqb6Qj2Ll9PBq3cE+/ixAV6lfN06W+h6pVE5+xIdYLs 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 Acked-by: Deepthi Dharwar Tested-by: Deepthi Dharwar --- include/linux/cpuidle.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index ca4e498..f7f1d90 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h @@ -120,7 +120,7 @@ static inline int cpuidle_get_last_residency(struct cpuidle_device *dev) ****************************/ struct cpuidle_driver { - char name[CPUIDLE_NAME_LEN]; + const char *name; struct module *owner; unsigned int power_specified:1;