From patchwork Fri Aug 18 19:49:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 110438 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp1344424qge; Fri, 18 Aug 2017 12:51:03 -0700 (PDT) X-Received: by 10.98.80.131 with SMTP id g3mr10100165pfj.156.1503085863295; Fri, 18 Aug 2017 12:51:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503085863; cv=none; d=google.com; s=arc-20160816; b=Gp+tXtC+gdQJuBjTXeTHi6+6oFlum657o72M34CGJYduhotjtU3dVts6b6dR1EeeRN v7iWRWypGXmaNRwjHl6/w8HqbWpYfpHHx1WaQR11iuC7Y/q7lFeDTflkoH+x6ucnUu8J v/JzF27R5ue2ISQ+jn5I7OCddxpOvX4FPFuK8r8iOJiCCaa5+EsNFoIAzO7gmEdT+SPt JJpF1BkvQrZk3iiRG4qUX827RL/Y/EyCZdqUYl61Qn0NBPis/pyHMN/MlV2ChLyIgfZ+ b2+jcMSIbXKCMpsu5600qBPbgBYwiyDObBuOgedVKn44pEhasj4vhWokqKjh6QuskuMU gIwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=vlrnyPvPxWI4+kVBid+z0TgzUAOKUfr/qV4PigDa7aA=; b=dikQqYLuNaDPcKbirM1OtXo1mi9OHv5qhgNjZmiSGy8TH3EyWp188UMPGYoJSMWC61 2ekE9IQA/2GEb7yRploP44032/JcUTw7sXInrhzsVtFJJMQ7xP0LqdWzudXNcVxJLGQB 7FgrrdCUZmgvWb9BDkBYlo8/12ztrX2PJKknFcHlFcXnTKjjsBnDfXCIKPB7krNpSP83 tLyxM/vE2ji3HRypxmzT1Dwm4loShy5UrVuqEeNkNI88cxYx8wlxIx++iObAFuzEo6gr aFtvkuKgYuo4jrSVsN7PNx7jU94Ej4RxuNTEmc/ef46+XzQgZL20a5KBll9Wd+Yd5Zdy B6KA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=RoO+Tamd; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q8si3899020pgc.114.2017.08.18.12.51.03; Fri, 18 Aug 2017 12:51:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=RoO+Tamd; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752670AbdHRTvB (ORCPT + 2 others); Fri, 18 Aug 2017 15:51:01 -0400 Received: from mail-wm0-f44.google.com ([74.125.82.44]:36853 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752597AbdHRTuf (ORCPT ); Fri, 18 Aug 2017 15:50:35 -0400 Received: by mail-wm0-f44.google.com with SMTP id t201so7255934wmt.1 for ; Fri, 18 Aug 2017 12:50:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=mV31Jz1Tj5z5UiuLEOx8fI5GQ+0kCau1NbNKAbw8d/s=; b=RoO+TamdQdT2SS0WfxnWEsV0Fm2u34MXk0u4UVjcPpEE/20ifkqDkrvCMVz8TWA4V0 EUA72SdPBfhrsdSlc3QUpgmi3jXyvo9hUFILfXrtq7wEI/jegRSwKYkdJTq2UBifJ1WK L6MTJEM4fxpCTcYoNfpMhs0wpQ96LwbTSFwmE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=mV31Jz1Tj5z5UiuLEOx8fI5GQ+0kCau1NbNKAbw8d/s=; b=CMGw8HN+6QDDIqGcdvZUCHX2al/hp0MxLA2UlD3aQNkI8BVP7T8F2kldBRyrKJMcZ+ kUPo/d1TltoNm1N170BMOEb4QPNyBmWkwifW4K1l0TXscKglmgau9sdO0txgrIgld673 qbMAiTj7YFTi9U/fTYTzFXSJxFgnEE7i1l2CltgyuTQOD66fjlVPT7JSZsvokAjkHnzM kTS9cIGA2M5WMImxB3B6gh1H7XjIHFWhSwq5lPGH0hMbufvnq+0GI9ZL53mssvsf1quG uUV4aAOqjJiwQAxYWa/gJ7ka5yPnI0rEoXYjTT4BnImVhJSl6NxePLQAVr2skgZ/yqde izZQ== X-Gm-Message-State: AHYfb5gJJf2KVB/tVlUga7yr98wgyXtPIs0xUQXHxbnvkiJEHF/B0WWM 3lA8zq8bMhf8vGZQS5vUPg== X-Received: by 10.28.229.149 with SMTP id c143mr1961458wmh.76.1503085833823; Fri, 18 Aug 2017 12:50:33 -0700 (PDT) Received: from localhost.localdomain ([154.146.161.128]) by smtp.gmail.com with ESMTPSA id k29sm5571168wrk.56.2017.08.18.12.50.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Aug 2017 12:50:33 -0700 (PDT) From: Ard Biesheuvel To: linux-efi@vger.kernel.org, Ingo Molnar , Thomas Gleixner , "H . Peter Anvin" Cc: Arvind Yadav , Ard Biesheuvel , linux-kernel@vger.kernel.org, Matt Fleming Subject: [PATCH 13/14] firmware: efi: constify attribute_group structures. Date: Fri, 18 Aug 2017 20:49:46 +0100 Message-Id: <20170818194947.19347-14-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170818194947.19347-1-ard.biesheuvel@linaro.org> References: <20170818194947.19347-1-ard.biesheuvel@linaro.org> Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org From: Arvind Yadav attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Cc: Matt Fleming Signed-off-by: Ard Biesheuvel --- drivers/firmware/efi/efi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe linux-efi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c index 045d6d311bde..6519be44387c 100644 --- a/drivers/firmware/efi/efi.c +++ b/drivers/firmware/efi/efi.c @@ -179,7 +179,7 @@ static umode_t efi_attr_is_visible(struct kobject *kobj, return attr->mode; } -static struct attribute_group efi_subsys_attr_group = { +static const struct attribute_group efi_subsys_attr_group = { .attrs = efi_subsys_attrs, .is_visible = efi_attr_is_visible, };