From patchwork Wed May 13 21:43:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 11547329 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 20BCB90 for ; Wed, 13 May 2020 21:46:48 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CBF892078C for ; Wed, 13 May 2020 21:46:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="B6ufszp7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CBF892078C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 865626E0C2; Wed, 13 May 2020 21:46:42 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2C3626E0C2 for ; Wed, 13 May 2020 21:46:41 +0000 (UTC) Received: by mail-wr1-x442.google.com with SMTP id l17so1338599wrr.4 for ; Wed, 13 May 2020 14:46:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jW05YIYcf1GNolkjiyr0mICfCVmFkBpfqxOEcp+jfSE=; b=B6ufszp741BrL+8jST20P2NOnKbKE/LNB0r5wtKJFYTRDlckV/y9gXmjPYv7DSytm5 N3AMbtHVrYFTCSwCiaDlyXrW9z+p7l1w7/eCeTbBxTMtWGRX/SMolhOP8VQuYczT9DkW CHxeTsCHlwc5lCyzBPRZ+M31ujfjBfGSgHqx/27EQC1XXYkWNnbps5HfIjw+hKDNFXxN vWzEDj7eVxbdYYTapTC0qlRtAKivLG64U/FR6pXzZpuchoBxHQ3c4SiBUSL+C8ypStQB 5zCBc5kn2VvrXWVcZpwx3hfjvSfAo0EhObsX7ynqyraCai9yJALEmKdL3D464SExMah7 6OvQ== 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:mime-version :content-transfer-encoding; bh=jW05YIYcf1GNolkjiyr0mICfCVmFkBpfqxOEcp+jfSE=; b=FYy+hPeBMsExcjDCHZ0GcM9U60bkdBbLDqcDlDgOjA7V2yM4QwteyvKrPSUU1tTNFx hno+UW5XbrTLFT3NXr9IRBC5PfkA82jXgd33aIiRNel4xyq4cHbQ2lBvem22zf+iA+xw +VDqFvdo9HRbg12cqh2B5DJdLuj2EW7ph6Q7DSbxz6woLFzsrADkqGC0PPv8cB9SVtV5 xQ0BEsmV9W+sLHifKT/SM4ac0b6j2dNcm5Ma3tg9PWnlOOWjQKoNuJvPUVH3rPSTYVgB As4t2zGRx6V7FZ3OZPotA4m/sbCehX0ccRMrwAqm+i5W4gbSYnTS+xf4WfFE06nk5xsb yg8g== X-Gm-Message-State: AOAM530e1n4FaOTLrVJ8t12X9N4nCse3suE0dDuWKLx7Vt8lL2Lr8Wjn O/V5SfJ8eQdc+XmeGlGqUWzFiAkD X-Google-Smtp-Source: ABdhPJw3w2J0RzaICCUDrZ+Ja4zE6bbo3lH35G0biusV3jmscCSLw1DMkpvIdJ8Bwau8RbnHiAwd8A== X-Received: by 2002:adf:f605:: with SMTP id t5mr1519029wrp.354.1589406398407; Wed, 13 May 2020 14:46:38 -0700 (PDT) Received: from localhost.localdomain (cpc91192-cmbg18-2-0-cust374.5-4.cable.virginm.net. [80.6.113.119]) by smtp.gmail.com with ESMTPSA id m23sm1699734wmg.45.2020.05.13.14.46.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 14:46:37 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH 01/11] tty/sysrq: alpha: export and use __sysrq_get_key_op() Date: Wed, 13 May 2020 22:43:41 +0100 Message-Id: <20200513214351.2138580-1-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Greg Kroah-Hartman , linux-alpha@vger.kernel.org, emil.l.velikov@gmail.com, linux-kernel@vger.kernel.org, Ivan Kokshaysky , Jiri Slaby , Matt Turner , Richard Henderson Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Export a pointer to the sysrq_get_key_op(). This way we can cleanly unregister it, instead of the current solutions of modifuing it inplace. Since __sysrq_get_key_op() is no longer used externally, let's make it a static function. This patch will allow us to limit access to each and every sysrq op and constify the sysrq handling. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-kernel@vger.kernel.org Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: linux-alpha@vger.kernel.org Signed-off-by: Emil Velikov --- Please keep me in the CC list, as I'm not subscribed to the list. IMHO it would be better if this gets merged this via the tty tree. --- arch/alpha/kernel/setup.c | 13 +++++++++++-- drivers/tty/sysrq.c | 4 +++- include/linux/sysrq.h | 2 +- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c index f19aa577354b..dd7f770f23cf 100644 --- a/arch/alpha/kernel/setup.c +++ b/arch/alpha/kernel/setup.c @@ -430,6 +430,15 @@ register_cpus(void) arch_initcall(register_cpus); +#ifdef CONFIG_MAGIC_SYSRQ +static struct sysrq_key_op srm_sysrq_reboot_op = { + .handler = machine_halt, + .help_msg = "reboot(b)", + .action_msg = "Resetting", + .enable_mask = SYSRQ_ENABLE_BOOT, +}; +#endif + void __init setup_arch(char **cmdline_p) { @@ -550,8 +559,8 @@ setup_arch(char **cmdline_p) /* If we're using SRM, make sysrq-b halt back to the prom, not auto-reboot. */ if (alpha_using_srm) { - struct sysrq_key_op *op = __sysrq_get_key_op('b'); - op->handler = (void *) machine_halt; + unregister_sysrq_key('b', __sysrq_reboot_op); + register_sysrq_key('b', &srm_sysrq_reboot_op); } #endif diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c index 0dc3878794fd..1741134cabca 100644 --- a/drivers/tty/sysrq.c +++ b/drivers/tty/sysrq.c @@ -172,6 +172,8 @@ static struct sysrq_key_op sysrq_reboot_op = { .enable_mask = SYSRQ_ENABLE_BOOT, }; +struct sysrq_key_op *__sysrq_reboot_op = &sysrq_reboot_op; + static void sysrq_handle_sync(int key) { emergency_sync(); @@ -516,7 +518,7 @@ static int sysrq_key_table_key2index(int key) /* * get and put functions for the table, exposed to modules. */ -struct sysrq_key_op *__sysrq_get_key_op(int key) +static struct sysrq_key_op *__sysrq_get_key_op(int key) { struct sysrq_key_op *op_p = NULL; int i; diff --git a/include/linux/sysrq.h b/include/linux/sysrq.h index 8e159e16850f..9b51f98e5f60 100644 --- a/include/linux/sysrq.h +++ b/include/linux/sysrq.h @@ -47,7 +47,7 @@ void handle_sysrq(int key); void __handle_sysrq(int key, bool check_mask); int register_sysrq_key(int key, struct sysrq_key_op *op); int unregister_sysrq_key(int key, struct sysrq_key_op *op); -struct sysrq_key_op *__sysrq_get_key_op(int key); +extern struct sysrq_key_op *__sysrq_reboot_op; int sysrq_toggle_support(int enable_mask); int sysrq_mask(void); From patchwork Wed May 13 21:43:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 11547331 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 307E990 for ; Wed, 13 May 2020 21:46:52 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DAC902054F for ; Wed, 13 May 2020 21:46:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YX+eZmJt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DAC902054F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3FF406EA83; Wed, 13 May 2020 21:46:44 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2FFD96EA82 for ; Wed, 13 May 2020 21:46:41 +0000 (UTC) Received: by mail-wr1-x441.google.com with SMTP id s8so1301893wrt.9 for ; Wed, 13 May 2020 14:46:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TfKn8VDcbN12HHO4rXlAfam9urpoqlI4Ytdxq1C4er8=; b=YX+eZmJtV4n3vqvaSCnL7AuNTFlrtKlqRafgBuSigEZKXsW+NK+DNJbb7BbuIjS3pm UBvPnyl7T2oQAggoEMo9CYG4MdZdfzeHBml46xZ5RdbSnsA7Rl5FR7ZxWd0br9x6dmIp 19WTGxm1exy9NejR5dDowkUcwRnH+4cRo8bxihjFrz+weg9zEmmXFUjBRZThDvNjuIuK +NsHnt9IlA7/0QRhor5ulzq6fs1NSwga1ULEcm3jzpVfwyBCBTSlxRSR+aLzXqiwKJzM skT8YLZnpCzNRUKza/ORfg60JOnxdJQL4vfhC0aEDZfGSfk9xqxK/eDhPdOjhyrALwmZ 1aXg== 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:mime-version:content-transfer-encoding; bh=TfKn8VDcbN12HHO4rXlAfam9urpoqlI4Ytdxq1C4er8=; b=p84UyfTkVRyNU8m+jZqeh9TItIIbiZUEub8pdmeNHqit/2aHeRm1/9mJ4sei+pGEw2 Q1l43/6b86LHrFXXUCCP9uHAfn46PPG9LUnrClDROWYypizFbG3nWgp4+nHprPj+yl9X mi0JiuNMSPdwtKAdtfiZdV1cvAFUGpu29m9qyM+tZYNfuwoWKyEQTBqs5+xZ3ERJvkwQ rHB/Td/K9/8//iQf0/Q1TtrERZtU/I7z96xMm3VkJiswaLn4tRnn8+zbrkVf3YV1T0dh d5cUJbvsiM5YBkGl9oHC0CDMSJrNo+HmhzEoAXImhgorA1PGh6LwouJd4wkxwx43M9zn M23A== X-Gm-Message-State: AOAM5328ZDjNeNj1EaWhZOBxDRjKAF5/k+j5nCscUN0HUSP0aNi3/TaB uESWczhmjK/9fymaeOqBGGsNeBtz X-Google-Smtp-Source: ABdhPJz5QtC3MqV1tUOgmZ0m63gShlNKlmwamCmHNJa/WJ6WUNdM7QuFVw8HcPb9XwxDlNRS/VQUlQ== X-Received: by 2002:a5d:4b04:: with SMTP id v4mr1633224wrq.182.1589406399558; Wed, 13 May 2020 14:46:39 -0700 (PDT) Received: from localhost.localdomain (cpc91192-cmbg18-2-0-cust374.5-4.cable.virginm.net. [80.6.113.119]) by smtp.gmail.com with ESMTPSA id m23sm1699734wmg.45.2020.05.13.14.46.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 14:46:39 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH 02/11] tty/sysrq: constify the sysrq API Date: Wed, 13 May 2020 22:43:42 +0100 Message-Id: <20200513214351.2138580-2-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200513214351.2138580-1-emil.l.velikov@gmail.com> References: <20200513214351.2138580-1-emil.l.velikov@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Greg Kroah-Hartman , emil.l.velikov@gmail.com, linux-kernel@vger.kernel.org, Jiri Slaby Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The user is not supposed to thinker with the underlying sysrq_key_op. Make that explicit by adding a handful of const notations. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-kernel@vger.kernel.org Signed-off-by: Emil Velikov --- Please keep me in the CC list, as I'm not subscribed to the list. IMHO it would be better if this gets merged this via the tty tree. --- Documentation/admin-guide/sysrq.rst | 10 +++++----- drivers/tty/sysrq.c | 16 ++++++++-------- include/linux/sysrq.h | 16 ++++++++-------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Documentation/admin-guide/sysrq.rst b/Documentation/admin-guide/sysrq.rst index a46209f4636c..e6424d8c5846 100644 --- a/Documentation/admin-guide/sysrq.rst +++ b/Documentation/admin-guide/sysrq.rst @@ -231,13 +231,13 @@ prints help, and C) an action_msg string, that will print right before your handler is called. Your handler must conform to the prototype in 'sysrq.h'. After the ``sysrq_key_op`` is created, you can call the kernel function -``register_sysrq_key(int key, struct sysrq_key_op *op_p);`` this will +``register_sysrq_key(int key, const struct sysrq_key_op *op_p);`` this will register the operation pointed to by ``op_p`` at table key 'key', if that slot in the table is blank. At module unload time, you must call -the function ``unregister_sysrq_key(int key, struct sysrq_key_op *op_p)``, which -will remove the key op pointed to by 'op_p' from the key 'key', if and only if -it is currently registered in that slot. This is in case the slot has been -overwritten since you registered it. +the function ``unregister_sysrq_key(int key, const struct sysrq_key_op *op_p)``, +which will remove the key op pointed to by 'op_p' from the key 'key', if and +only if it is currently registered in that slot. This is in case the slot has +been overwritten since you registered it. The Magic SysRQ system works by registering key operations against a key op lookup table, which is defined in 'drivers/tty/sysrq.c'. This key table has diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c index 1741134cabca..091c64a3cef0 100644 --- a/drivers/tty/sysrq.c +++ b/drivers/tty/sysrq.c @@ -518,9 +518,9 @@ static int sysrq_key_table_key2index(int key) /* * get and put functions for the table, exposed to modules. */ -static struct sysrq_key_op *__sysrq_get_key_op(int key) +static const struct sysrq_key_op *__sysrq_get_key_op(int key) { - struct sysrq_key_op *op_p = NULL; + const struct sysrq_key_op *op_p = NULL; int i; i = sysrq_key_table_key2index(key); @@ -530,7 +530,7 @@ static struct sysrq_key_op *__sysrq_get_key_op(int key) return op_p; } -static void __sysrq_put_key_op(int key, struct sysrq_key_op *op_p) +static void __sysrq_put_key_op(int key, const struct sysrq_key_op *op_p) { int i = sysrq_key_table_key2index(key); @@ -540,7 +540,7 @@ static void __sysrq_put_key_op(int key, struct sysrq_key_op *op_p) void __handle_sysrq(int key, bool check_mask) { - struct sysrq_key_op *op_p; + const struct sysrq_key_op *op_p; int orig_log_level; int orig_suppress_printk; int i; @@ -1063,8 +1063,8 @@ int sysrq_toggle_support(int enable_mask) } EXPORT_SYMBOL_GPL(sysrq_toggle_support); -static int __sysrq_swap_key_ops(int key, struct sysrq_key_op *insert_op_p, - struct sysrq_key_op *remove_op_p) +static int __sysrq_swap_key_ops(int key, const struct sysrq_key_op *insert_op_p, + const struct sysrq_key_op *remove_op_p) { int retval; @@ -1087,13 +1087,13 @@ static int __sysrq_swap_key_ops(int key, struct sysrq_key_op *insert_op_p, return retval; } -int register_sysrq_key(int key, struct sysrq_key_op *op_p) +int register_sysrq_key(int key, const struct sysrq_key_op *op_p) { return __sysrq_swap_key_ops(key, op_p, NULL); } EXPORT_SYMBOL(register_sysrq_key); -int unregister_sysrq_key(int key, struct sysrq_key_op *op_p) +int unregister_sysrq_key(int key, const struct sysrq_key_op *op_p) { return __sysrq_swap_key_ops(key, NULL, op_p); } diff --git a/include/linux/sysrq.h b/include/linux/sysrq.h index 9b51f98e5f60..479028391c08 100644 --- a/include/linux/sysrq.h +++ b/include/linux/sysrq.h @@ -30,10 +30,10 @@ #define SYSRQ_ENABLE_RTNICE 0x0100 struct sysrq_key_op { - void (*handler)(int); - char *help_msg; - char *action_msg; - int enable_mask; + void (* const handler)(int); + const char * const help_msg; + const char * const action_msg; + const int enable_mask; }; #ifdef CONFIG_MAGIC_SYSRQ @@ -45,8 +45,8 @@ struct sysrq_key_op { void handle_sysrq(int key); void __handle_sysrq(int key, bool check_mask); -int register_sysrq_key(int key, struct sysrq_key_op *op); -int unregister_sysrq_key(int key, struct sysrq_key_op *op); +int register_sysrq_key(int key, const struct sysrq_key_op *op); +int unregister_sysrq_key(int key, const struct sysrq_key_op *op); extern struct sysrq_key_op *__sysrq_reboot_op; int sysrq_toggle_support(int enable_mask); @@ -62,12 +62,12 @@ static inline void __handle_sysrq(int key, bool check_mask) { } -static inline int register_sysrq_key(int key, struct sysrq_key_op *op) +static inline int register_sysrq_key(int key, const struct sysrq_key_op *op) { return -EINVAL; } -static inline int unregister_sysrq_key(int key, struct sysrq_key_op *op) +static inline int unregister_sysrq_key(int key, const struct sysrq_key_op *op) { return -EINVAL; } From patchwork Wed May 13 21:43:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 11547333 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C53A790 for ; Wed, 13 May 2020 21:46:54 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 77965207BA for ; Wed, 13 May 2020 21:46:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="u6nApRWv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 77965207BA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E3F856EA82; Wed, 13 May 2020 21:46:45 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by gabe.freedesktop.org (Postfix) with ESMTPS id 574CA6E0C2 for ; Wed, 13 May 2020 21:46:42 +0000 (UTC) Received: by mail-wr1-x444.google.com with SMTP id y16so1346944wrs.3 for ; Wed, 13 May 2020 14:46:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=V5e2yBBjg+EwlqyNC0zOA3/qvhI00DKgKtd35XQEuV4=; b=u6nApRWvUlxkoFToMR9zh7MFuN2eypUcrfAV2LVJ5j17sJkEVNJzaqkCTBZaeNEbhs kPmcPgyNHSx50I5+pDYuL3xlnrfudpumlKzR1/VJbpehjwDRghtoIPeW825VinMDCTLb BRrJtkDC4r4LipKrcYWciwka0Tt5BIEIyBrZRomIG6Q/tpTIwedu1cMg7JVgRhJhV+FH 6iLMXXp01Mp+pVp168jUQG/7eok3rbtdodg9+RGRWLbFs0RAsZlISwR9g15PHv5z20vu xOoWaacA12KBS8GNymmWH2wlpShiwnEVih79MvEjxqpexBJ29zKI1KfnJ16WUWfhoXpP HUFw== 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:mime-version:content-transfer-encoding; bh=V5e2yBBjg+EwlqyNC0zOA3/qvhI00DKgKtd35XQEuV4=; b=DdgKsXAOxD0dVGkAqULeOF7f9/RQ/SQdud1Uzc5fj95xAc8na6GfBZf4fp5cEIQ6+S phlPBcML2TBCbSlY5lAyef+29MSHNFywlgnMpLXRkDfYiQ/DhIudmZh+Lm+BGLJo7rn6 Hd1nNzKug0XjwLbmvn82DAAw99E8m2fboC1Cc4OCs+E6Wr3ZF9UdVBGNS8hPwHgQdmDf W0gnHXFOSWv1mNEx+CAvkA7U0YQB0TRp00M7uNXVpUsl8Ma+1W2cc3k4FoX+E65nBN31 SRH/8GYjwkC7A5H4v83nkexYMAT5Ev1pkWGjI/fAFWZ0EPOrZeCQBza7Qbyk6lWNnhIM r6WQ== X-Gm-Message-State: AOAM5316qf5fTX9XgIlas8vPsNDnpbCQa5sTVLoV/PGNLHyHR4qN5tCg 4fEZYp1yj7jUUGIlF2PzvV5g4E7l X-Google-Smtp-Source: ABdhPJz12roq4TaoNTi96whZswnrScljpc8xFO3UJxp1whOek2Uw1YdqobjGFDzXBifp7yRRB7np1w== X-Received: by 2002:adf:e28c:: with SMTP id v12mr1675009wri.157.1589406400638; Wed, 13 May 2020 14:46:40 -0700 (PDT) Received: from localhost.localdomain (cpc91192-cmbg18-2-0-cust374.5-4.cable.virginm.net. [80.6.113.119]) by smtp.gmail.com with ESMTPSA id m23sm1699734wmg.45.2020.05.13.14.46.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 14:46:40 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH 03/11] tty/sysrq: constify the the sysrq_key_op(s) Date: Wed, 13 May 2020 22:43:43 +0100 Message-Id: <20200513214351.2138580-3-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200513214351.2138580-1-emil.l.velikov@gmail.com> References: <20200513214351.2138580-1-emil.l.velikov@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Greg Kroah-Hartman , emil.l.velikov@gmail.com, linux-kernel@vger.kernel.org, Jiri Slaby Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" All the users threat them as immutable - annotate them as such. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-kernel@vger.kernel.org Signed-off-by: Emil Velikov --- Please keep me in the CC list, as I'm not subscribed to the list. IMHO it would be better if this gets merged this via the tty tree. --- drivers/tty/sysrq.c | 52 +++++++++++++++++++++---------------------- include/linux/sysrq.h | 2 +- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c index 091c64a3cef0..477cdc1e9cf3 100644 --- a/drivers/tty/sysrq.c +++ b/drivers/tty/sysrq.c @@ -106,7 +106,7 @@ static void sysrq_handle_loglevel(int key) pr_info("Loglevel set to %d\n", i); console_loglevel = i; } -static struct sysrq_key_op sysrq_loglevel_op = { +static const struct sysrq_key_op sysrq_loglevel_op = { .handler = sysrq_handle_loglevel, .help_msg = "loglevel(0-9)", .action_msg = "Changing Loglevel", @@ -119,14 +119,14 @@ static void sysrq_handle_SAK(int key) struct work_struct *SAK_work = &vc_cons[fg_console].SAK_work; schedule_work(SAK_work); } -static struct sysrq_key_op sysrq_SAK_op = { +static const struct sysrq_key_op sysrq_SAK_op = { .handler = sysrq_handle_SAK, .help_msg = "sak(k)", .action_msg = "SAK", .enable_mask = SYSRQ_ENABLE_KEYBOARD, }; #else -#define sysrq_SAK_op (*(struct sysrq_key_op *)NULL) +#define sysrq_SAK_op (*(const struct sysrq_key_op *)NULL) #endif #ifdef CONFIG_VT @@ -135,14 +135,14 @@ static void sysrq_handle_unraw(int key) vt_reset_unicode(fg_console); } -static struct sysrq_key_op sysrq_unraw_op = { +static const struct sysrq_key_op sysrq_unraw_op = { .handler = sysrq_handle_unraw, .help_msg = "unraw(r)", .action_msg = "Keyboard mode set to system default", .enable_mask = SYSRQ_ENABLE_KEYBOARD, }; #else -#define sysrq_unraw_op (*(struct sysrq_key_op *)NULL) +#define sysrq_unraw_op (*(const struct sysrq_key_op *)NULL) #endif /* CONFIG_VT */ static void sysrq_handle_crash(int key) @@ -152,7 +152,7 @@ static void sysrq_handle_crash(int key) panic("sysrq triggered crash\n"); } -static struct sysrq_key_op sysrq_crash_op = { +static const struct sysrq_key_op sysrq_crash_op = { .handler = sysrq_handle_crash, .help_msg = "crash(c)", .action_msg = "Trigger a crash", @@ -165,20 +165,20 @@ static void sysrq_handle_reboot(int key) local_irq_enable(); emergency_restart(); } -static struct sysrq_key_op sysrq_reboot_op = { +static const struct sysrq_key_op sysrq_reboot_op = { .handler = sysrq_handle_reboot, .help_msg = "reboot(b)", .action_msg = "Resetting", .enable_mask = SYSRQ_ENABLE_BOOT, }; -struct sysrq_key_op *__sysrq_reboot_op = &sysrq_reboot_op; +const struct sysrq_key_op *__sysrq_reboot_op = &sysrq_reboot_op; static void sysrq_handle_sync(int key) { emergency_sync(); } -static struct sysrq_key_op sysrq_sync_op = { +static const struct sysrq_key_op sysrq_sync_op = { .handler = sysrq_handle_sync, .help_msg = "sync(s)", .action_msg = "Emergency Sync", @@ -190,7 +190,7 @@ static void sysrq_handle_show_timers(int key) sysrq_timer_list_show(); } -static struct sysrq_key_op sysrq_show_timers_op = { +static const struct sysrq_key_op sysrq_show_timers_op = { .handler = sysrq_handle_show_timers, .help_msg = "show-all-timers(q)", .action_msg = "Show clockevent devices & pending hrtimers (no others)", @@ -200,7 +200,7 @@ static void sysrq_handle_mountro(int key) { emergency_remount(); } -static struct sysrq_key_op sysrq_mountro_op = { +static const struct sysrq_key_op sysrq_mountro_op = { .handler = sysrq_handle_mountro, .help_msg = "unmount(u)", .action_msg = "Emergency Remount R/O", @@ -213,13 +213,13 @@ static void sysrq_handle_showlocks(int key) debug_show_all_locks(); } -static struct sysrq_key_op sysrq_showlocks_op = { +static const struct sysrq_key_op sysrq_showlocks_op = { .handler = sysrq_handle_showlocks, .help_msg = "show-all-locks(d)", .action_msg = "Show Locks Held", }; #else -#define sysrq_showlocks_op (*(struct sysrq_key_op *)NULL) +#define sysrq_showlocks_op (*(const struct sysrq_key_op *)NULL) #endif #ifdef CONFIG_SMP @@ -266,7 +266,7 @@ static void sysrq_handle_showallcpus(int key) } } -static struct sysrq_key_op sysrq_showallcpus_op = { +static const struct sysrq_key_op sysrq_showallcpus_op = { .handler = sysrq_handle_showallcpus, .help_msg = "show-backtrace-all-active-cpus(l)", .action_msg = "Show backtrace of all active CPUs", @@ -284,7 +284,7 @@ static void sysrq_handle_showregs(int key) show_regs(regs); perf_event_print_debug(); } -static struct sysrq_key_op sysrq_showregs_op = { +static const struct sysrq_key_op sysrq_showregs_op = { .handler = sysrq_handle_showregs, .help_msg = "show-registers(p)", .action_msg = "Show Regs", @@ -296,7 +296,7 @@ static void sysrq_handle_showstate(int key) show_state(); show_workqueue_state(); } -static struct sysrq_key_op sysrq_showstate_op = { +static const struct sysrq_key_op sysrq_showstate_op = { .handler = sysrq_handle_showstate, .help_msg = "show-task-states(t)", .action_msg = "Show State", @@ -307,7 +307,7 @@ static void sysrq_handle_showstate_blocked(int key) { show_state_filter(TASK_UNINTERRUPTIBLE); } -static struct sysrq_key_op sysrq_showstate_blocked_op = { +static const struct sysrq_key_op sysrq_showstate_blocked_op = { .handler = sysrq_handle_showstate_blocked, .help_msg = "show-blocked-tasks(w)", .action_msg = "Show Blocked State", @@ -321,21 +321,21 @@ static void sysrq_ftrace_dump(int key) { ftrace_dump(DUMP_ALL); } -static struct sysrq_key_op sysrq_ftrace_dump_op = { +static const struct sysrq_key_op sysrq_ftrace_dump_op = { .handler = sysrq_ftrace_dump, .help_msg = "dump-ftrace-buffer(z)", .action_msg = "Dump ftrace buffer", .enable_mask = SYSRQ_ENABLE_DUMP, }; #else -#define sysrq_ftrace_dump_op (*(struct sysrq_key_op *)NULL) +#define sysrq_ftrace_dump_op (*(const struct sysrq_key_op *)NULL) #endif static void sysrq_handle_showmem(int key) { show_mem(0, NULL); } -static struct sysrq_key_op sysrq_showmem_op = { +static const struct sysrq_key_op sysrq_showmem_op = { .handler = sysrq_handle_showmem, .help_msg = "show-memory-usage(m)", .action_msg = "Show Memory", @@ -366,7 +366,7 @@ static void sysrq_handle_term(int key) send_sig_all(SIGTERM); console_loglevel = CONSOLE_LOGLEVEL_DEBUG; } -static struct sysrq_key_op sysrq_term_op = { +static const struct sysrq_key_op sysrq_term_op = { .handler = sysrq_handle_term, .help_msg = "terminate-all-tasks(e)", .action_msg = "Terminate All Tasks", @@ -396,7 +396,7 @@ static void sysrq_handle_moom(int key) { schedule_work(&moom_work); } -static struct sysrq_key_op sysrq_moom_op = { +static const struct sysrq_key_op sysrq_moom_op = { .handler = sysrq_handle_moom, .help_msg = "memory-full-oom-kill(f)", .action_msg = "Manual OOM execution", @@ -408,7 +408,7 @@ static void sysrq_handle_thaw(int key) { emergency_thaw_all(); } -static struct sysrq_key_op sysrq_thaw_op = { +static const struct sysrq_key_op sysrq_thaw_op = { .handler = sysrq_handle_thaw, .help_msg = "thaw-filesystems(j)", .action_msg = "Emergency Thaw of all frozen filesystems", @@ -421,7 +421,7 @@ static void sysrq_handle_kill(int key) send_sig_all(SIGKILL); console_loglevel = CONSOLE_LOGLEVEL_DEBUG; } -static struct sysrq_key_op sysrq_kill_op = { +static const struct sysrq_key_op sysrq_kill_op = { .handler = sysrq_handle_kill, .help_msg = "kill-all-tasks(i)", .action_msg = "Kill All Tasks", @@ -432,7 +432,7 @@ static void sysrq_handle_unrt(int key) { normalize_rt_tasks(); } -static struct sysrq_key_op sysrq_unrt_op = { +static const struct sysrq_key_op sysrq_unrt_op = { .handler = sysrq_handle_unrt, .help_msg = "nice-all-RT-tasks(n)", .action_msg = "Nice All RT Tasks", @@ -442,7 +442,7 @@ static struct sysrq_key_op sysrq_unrt_op = { /* Key Operations table and lock */ static DEFINE_SPINLOCK(sysrq_key_table_lock); -static struct sysrq_key_op *sysrq_key_table[36] = { +static const struct sysrq_key_op *sysrq_key_table[36] = { &sysrq_loglevel_op, /* 0 */ &sysrq_loglevel_op, /* 1 */ &sysrq_loglevel_op, /* 2 */ diff --git a/include/linux/sysrq.h b/include/linux/sysrq.h index 479028391c08..3a582ec7a2f1 100644 --- a/include/linux/sysrq.h +++ b/include/linux/sysrq.h @@ -47,7 +47,7 @@ void handle_sysrq(int key); void __handle_sysrq(int key, bool check_mask); int register_sysrq_key(int key, const struct sysrq_key_op *op); int unregister_sysrq_key(int key, const struct sysrq_key_op *op); -extern struct sysrq_key_op *__sysrq_reboot_op; +extern const struct sysrq_key_op *__sysrq_reboot_op; int sysrq_toggle_support(int enable_mask); int sysrq_mask(void); From patchwork Wed May 13 21:43:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 11547337 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6B387618 for ; Wed, 13 May 2020 21:46:57 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 21B0D20693 for ; Wed, 13 May 2020 21:46:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="J9f+VXD3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 21B0D20693 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 088106EA8C; Wed, 13 May 2020 21:46:46 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5D08F6EA86 for ; Wed, 13 May 2020 21:46:44 +0000 (UTC) Received: by mail-wm1-x341.google.com with SMTP id g12so30206713wmh.3 for ; Wed, 13 May 2020 14:46:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1ZhpfY5SsXwRMXVq8oG2SQckFQ1KlcXnx8okrJoqKCA=; b=J9f+VXD35N9xl7mX+0T+f83yVVR/BgYM8RMEZCYaz1RSjI+MkVij2f44TNmQ9iGE86 6etFqrZUffKYP1M1wze/ps4CpisiMrwWTnMSr2L2m5nhNa5DdRhGtiWzYXGCcH4SCHOR 6bCmg4p+pF7wkc1n7vujJNPXgs88iP/adct8b8CQYCOEt+lQFy8tdVg3kvLTiy1MZ6jP f3tO1rfpK8afd0A1SGtKTrY4qsre9OxjLK3sQ7TXtxEP9Sff2EyVlkXtvXZteu5nRCWR lo+fGAss0/qYhP8AefeSr+vcsIXkj77mG7qPVT6Roqq2qA6M+07ju8yV/+hXTmOmBSQa zFnQ== 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:mime-version:content-transfer-encoding; bh=1ZhpfY5SsXwRMXVq8oG2SQckFQ1KlcXnx8okrJoqKCA=; b=PRI111PVMwOuc+L1mRUxHj4z5MFPoR3SSMmmnWgNHbDTc/mVI1p7v4J01PnxLMhgy8 vcpigKwe0mOtRIFveCASJ4DJGj47cWIaqBXA0EBJ4n0MnMidgJ3jNNGTuwUKlFv78NsQ oHjJm5kt+oUaAfodJHkKeNQGyJ5J3zoiIS9pL8b16uB93Hq35UoO+tlni8l5EMuTizii 7yBo4/iEQrmOQ3jusAzmF3mD1BY2aH8Gj5wKUaHl0LdwCmrKSObO7dU4pGwlWn6Jef1K AbRbN0DbFmA22O0MqXO+mzJXaPDS0gN/Bwf7LLAh9gBFRu5x8/IyvECyaR/US+HIakzc R6lw== X-Gm-Message-State: AGi0PuYFUE0KMcEmjBcM9reZR7AWMXjVyEM9SsC3fvD9TzDt8VTEC7u/ fTtQtwp4s+Z5MioZ3VDPraX11dh5 X-Google-Smtp-Source: APiQypIZ4r5SZkRDB6NXjJjmJhzn7tVrsiIl9AH/93M3gz7vnmZP+aNiDzxAEY/+SIIWvDX/w43OYQ== X-Received: by 2002:a1c:f012:: with SMTP id a18mr43223777wmb.116.1589406401788; Wed, 13 May 2020 14:46:41 -0700 (PDT) Received: from localhost.localdomain (cpc91192-cmbg18-2-0-cust374.5-4.cable.virginm.net. [80.6.113.119]) by smtp.gmail.com with ESMTPSA id m23sm1699734wmg.45.2020.05.13.14.46.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 14:46:41 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH 04/11] alpha: constify sysrq_key_op Date: Wed, 13 May 2020 22:43:44 +0100 Message-Id: <20200513214351.2138580-4-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200513214351.2138580-1-emil.l.velikov@gmail.com> References: <20200513214351.2138580-1-emil.l.velikov@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Greg Kroah-Hartman , linux-alpha@vger.kernel.org, emil.l.velikov@gmail.com, linux-kernel@vger.kernel.org, Ivan Kokshaysky , Jiri Slaby , Matt Turner , Richard Henderson Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" With earlier commits, the API no longer discards the const-ness of the sysrq_key_op. As such we can add the notation. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-kernel@vger.kernel.org Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: linux-alpha@vger.kernel.org Signed-off-by: Emil Velikov --- Please keep me in the CC list, as I'm not subscribed to the list. IMHO it would be better if this gets merged this via the tty tree. --- arch/alpha/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c index dd7f770f23cf..6fa802c495b4 100644 --- a/arch/alpha/kernel/setup.c +++ b/arch/alpha/kernel/setup.c @@ -431,7 +431,7 @@ register_cpus(void) arch_initcall(register_cpus); #ifdef CONFIG_MAGIC_SYSRQ -static struct sysrq_key_op srm_sysrq_reboot_op = { +static const struct sysrq_key_op srm_sysrq_reboot_op = { .handler = machine_halt, .help_msg = "reboot(b)", .action_msg = "Resetting", From patchwork Wed May 13 21:43:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 11547341 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5025A90 for ; Wed, 13 May 2020 21:47:01 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 06A45206F5 for ; Wed, 13 May 2020 21:47:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XiuECaHu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 06A45206F5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 14E576EA86; Wed, 13 May 2020 21:46:49 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by gabe.freedesktop.org (Postfix) with ESMTPS id 706E46EA8A for ; Wed, 13 May 2020 21:46:44 +0000 (UTC) Received: by mail-wm1-x344.google.com with SMTP id m24so18532809wml.2 for ; Wed, 13 May 2020 14:46:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SsGLhvtzNNE3Um+kD27FrquNqhBmiHi5qwlCc1MeclU=; b=XiuECaHuWlZtqmf2V9RziiPXPESy1M5JPlu5ULkY1Lq+ut+oFJhcdMTgwL8RtzNBUV slYA65/n18tW4XScYRxcfofPeB0hkM1niA79FfTflHA8206jGnBB1em5BozDhCCKIs5s Of+LQcm2e4gZIPPxSt6hpTQ+oD0f7H7qjnnguQvB+7bPo4Q+A8tiYIewQkjcGa0TY4M6 2Vwfm8RIAaGCX8i19Ue/tSbRgXnuE5ME8dI8KYqGdr0JO95Bg3t63kP+vDCfdTvdEM34 GZ8DDZzy9jiM9k8AUC6DMts6GkZaNtSXkx+Jg041oD4WxMaElsC9zd2m1/qTAbUZulrg N39w== 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:mime-version:content-transfer-encoding; bh=SsGLhvtzNNE3Um+kD27FrquNqhBmiHi5qwlCc1MeclU=; b=eNeiUI+0U5rNWptwB4p36ZlEhdjcpG36MhQZ4SURy2ESxGbgtWGiHqcP3p1dLT4iFe EurghXRD7O34ZS8Hq8kkxYCs2cF/m6795g2h9dmcxzoPV+d/9JWumyQvyqJJQpIoAwgH v0vIKGVc6gCRb5awzQ+6sP7vc0dAqRx9Qz2qyDfS3am/Wl72s8auscl3vLqhyrC3ZlMS BRn1W41F6FyvI2KslJN4F46gc1y31DPI+lr2WngzvIpYcVRORvhDzI2dH/8tpgww6IEK Yt9I+IJpcmy8KULdba4O1pEjRcjSCM370Xo/7zkiQeNp49l4cJSHYeX0kJQk9Gc6bMJ2 qoog== X-Gm-Message-State: AGi0PuZx/iDQneVSXobxdcT9LcYGr7aBhJE6RPHKftrd6e9NeH+VZdue 2AeNrTPOHJ8Ar4ugD5aYZTfhyNZM X-Google-Smtp-Source: APiQypIjDv9j1WGGbsrXKzuvn+8PI0doRo0I/EblRla78tb2gcpayV63BaEBdC9Tkx4qISmrxAydUQ== X-Received: by 2002:a1c:25c4:: with SMTP id l187mr42071872wml.89.1589406402802; Wed, 13 May 2020 14:46:42 -0700 (PDT) Received: from localhost.localdomain (cpc91192-cmbg18-2-0-cust374.5-4.cable.virginm.net. [80.6.113.119]) by smtp.gmail.com with ESMTPSA id m23sm1699734wmg.45.2020.05.13.14.46.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 14:46:42 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH 05/11] MIPS: constify sysrq_key_op Date: Wed, 13 May 2020 22:43:45 +0100 Message-Id: <20200513214351.2138580-5-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200513214351.2138580-1-emil.l.velikov@gmail.com> References: <20200513214351.2138580-1-emil.l.velikov@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Bogendoerfer , Greg Kroah-Hartman , emil.l.velikov@gmail.com, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" With earlier commits, the API no longer discards the const-ness of the sysrq_key_op. As such we can add the notation. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-kernel@vger.kernel.org Cc: Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org Signed-off-by: Emil Velikov Acked-by: Thomas Bogendoerfer --- Please keep me in the CC list, as I'm not subscribed to the list. IMHO it would be better it this gets merged this via the tty tree. --- arch/mips/kernel/sysrq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/kernel/sysrq.c b/arch/mips/kernel/sysrq.c index e5a2a6ab71ac..9c1a2019113b 100644 --- a/arch/mips/kernel/sysrq.c +++ b/arch/mips/kernel/sysrq.c @@ -52,7 +52,7 @@ static void sysrq_handle_tlbdump(int key) #endif } -static struct sysrq_key_op sysrq_tlbdump_op = { +static const struct sysrq_key_op sysrq_tlbdump_op = { .handler = sysrq_handle_tlbdump, .help_msg = "show-tlbs(x)", .action_msg = "Show TLB entries", From patchwork Wed May 13 21:43:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 11547343 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E08E190 for ; Wed, 13 May 2020 21:47:02 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 96E45206F5 for ; Wed, 13 May 2020 21:47:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RW1G+oga" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 96E45206F5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 395DC6EA95; Wed, 13 May 2020 21:46:49 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7F8706EA82 for ; Wed, 13 May 2020 21:46:45 +0000 (UTC) Received: by mail-wm1-x342.google.com with SMTP id d207so9895133wmd.0 for ; Wed, 13 May 2020 14:46:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qwEXZysR23CccmrNbp4oN3ldgqd9cJzH2UZSb4ihijw=; b=RW1G+ogaAUWg4GP/IAaKNDiWpKHIvYpQnbau/mVBhnk3xIed4Kf27YNjBWyThTty/b aa6RzDE2vVQpDzT4KYj0Hg1pX7a86XwH8Gkjh+dqN2ijY/Bh7VOGNBKaBvllUvvgTe7V JYtYdUkSr9CrVUUlGhGy0qMnqJzhlEs9Gg1WhRCbrsggDPN8rSk+V+Xjj/ZBwbDca1zn Zqxq/ucDBkApCW26k1BrUvDs0z4ynUSWmSjyaEkSz0+q23ekyBhQTXxIbOAkQi1qEUd3 PJfBW7d+pq1xy7EbcafYMm7NFocw/Ek9E40OFAv8yotfqMA/LMU73/trnk1ziQrnvLwP 0KLw== 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:mime-version:content-transfer-encoding; bh=qwEXZysR23CccmrNbp4oN3ldgqd9cJzH2UZSb4ihijw=; b=Ne3BipSFFu7P/L+7gpgnbxYF3wpUZjBAQ2UwA/srO3qCmIPEVpe9WvhujUq6YpiAz2 JIMwQVSdZtGb11bximlIpZJdpnAiNiQiHN5jlhn8ksZUBNKH+3QMBFHDD6yUFe0Zl3gf uNHdvoZwaPhyvTB5kl/U1WScLkAgTYNnLpGj7t3bdfuWBLGnnP+jl0NqfgjbDgbUpUp8 VdegCnIlwn3B2p3sastJ248XLu68uKfwS+dk0hL+aSByktnjla6by/cmrcnJAfEIUMQ3 pzokTIUaXMrQl8xPcMpZDeNzDxaNumxbGfzoFcwjXJDFappqjvvfD5aJlAfEtXDgfWR0 Qehw== X-Gm-Message-State: AOAM532zGCLqX1HwN0EO1LKazXgHSAovvfN2dnv4ZVAn+MEvjphENwwE kXhHfvPDtzFMt1kacANG1DFTKK9W X-Google-Smtp-Source: ABdhPJyLIg3eccKezg4f5axysxo4mad1I/De7u6J1LU+oD/g9NIWVf+Zl8ski/Ae57u9v6OoYfDaPA== X-Received: by 2002:a1c:e188:: with SMTP id y130mr9611614wmg.105.1589406403908; Wed, 13 May 2020 14:46:43 -0700 (PDT) Received: from localhost.localdomain (cpc91192-cmbg18-2-0-cust374.5-4.cable.virginm.net. [80.6.113.119]) by smtp.gmail.com with ESMTPSA id m23sm1699734wmg.45.2020.05.13.14.46.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 14:46:43 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH 06/11] powerpc/xmon: constify sysrq_key_op Date: Wed, 13 May 2020 22:43:46 +0100 Message-Id: <20200513214351.2138580-6-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200513214351.2138580-1-emil.l.velikov@gmail.com> References: <20200513214351.2138580-1-emil.l.velikov@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Ellerman , Jiri Slaby , emil.l.velikov@gmail.com, linux-kernel@vger.kernel.org, Paul Mackerras , Greg Kroah-Hartman , linuxppc-dev@lists.ozlabs.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" With earlier commits, the API no longer discards the const-ness of the sysrq_key_op. As such we can add the notation. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-kernel@vger.kernel.org Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Emil Velikov Acked-by: Michael Ellerman --- Please keep me in the CC list, as I'm not subscribed to the list. IMHO it would be better if this gets merged this via the tty tree. --- arch/powerpc/xmon/xmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index 7af840c0fc93..0d8ca5c9f131 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c @@ -3842,7 +3842,7 @@ static void sysrq_handle_xmon(int key) xmon_init(0); } -static struct sysrq_key_op sysrq_xmon_op = { +static const struct sysrq_key_op sysrq_xmon_op = { .handler = sysrq_handle_xmon, .help_msg = "xmon(x)", .action_msg = "Entering xmon", From patchwork Wed May 13 21:43:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 11547349 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 03CAD90 for ; Wed, 13 May 2020 21:47:07 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AD742206F5 for ; Wed, 13 May 2020 21:47:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IJceG01R" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AD742206F5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 278536EA99; Wed, 13 May 2020 21:46:54 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8C5166EA96 for ; Wed, 13 May 2020 21:46:46 +0000 (UTC) Received: by mail-wm1-x342.google.com with SMTP id h4so28142313wmb.4 for ; Wed, 13 May 2020 14:46:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aMr7J7ZMfB4ZM2f1GJQW61b2tOU+m7OCFm5Ehp2KhEg=; b=IJceG01RlwXhlyQYR4oDOXRYjS0suusZWN7gEsoV+UYCYVKC3AGuaacI2CYgES1w25 KIYlnNSHLWnkh4DN5BbY3TWXS+Xz1UjZkhCmRAtLry2Q+Qtm/Y96s3FnNG/yVO0EYLMA elAU+lC8aibYwI1eWkjl/EAHMbK8Ett9Joh1s5kYnN4X0RcE65AOQUIFtJroEkuk1gKW 0aG1YtYfz7u5RTiDGYyX4LJjNlPjMNEK/l7Osu6uwgYMWTvDBFem5fOGY6LJYjfLgEeI HW5evC0XvWEhhscypqHengf1uA2kgiuRX6YOSBZ99kdQamcW2xmIORNt5cyITPVws8+n wMfA== 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:mime-version:content-transfer-encoding; bh=aMr7J7ZMfB4ZM2f1GJQW61b2tOU+m7OCFm5Ehp2KhEg=; b=DFY5au+m6z8qCz6rT4GUJ09I4CSv9Oc3Ej3ha2/uQtrx3MBVliny4SAREEUaQo9zxz nVwRx34bNY2d1+JGOfUvaQRbLAPy2iv2gSFtQfqeYXD+1FoQt7+LhIVnJoBhBPBsB1o1 TN10/bPmeBcnYJVFr7G2swSMHzQ55WwfZgSeBKBosbmlJ92LUKhSM58c0UFU0c6MvjFp O9ImUz4slBsbO2njy9o+7n263Csa0NebwLwNV1l4u62YYGD24Hyr3t3nHvqo0wHZT1B4 Jg+/o0iSXoTQOg/NyD/XKh1U/7wNXnpYwtti92ENKk4k+a8QZJ8eudm0JpZYAioR07vf RZYA== X-Gm-Message-State: AGi0PuYUKyAsXqCNEnA/lEC69L8t0CbOPcw9qaju8RUpAGkvikkIb6cQ UCvqo26tSW6SRS24Qhv7hf8YOj9E X-Google-Smtp-Source: APiQypJbt0YC4e23V0PxrpeY5gor4dZlwWjkH+VR4hz5fssJYDKJUwqMu9BWXNbPFa3NgyDWRpCoLw== X-Received: by 2002:a1c:5944:: with SMTP id n65mr34071597wmb.73.1589406404897; Wed, 13 May 2020 14:46:44 -0700 (PDT) Received: from localhost.localdomain (cpc91192-cmbg18-2-0-cust374.5-4.cable.virginm.net. [80.6.113.119]) by smtp.gmail.com with ESMTPSA id m23sm1699734wmg.45.2020.05.13.14.46.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 14:46:44 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH 07/11] sparc64: constify sysrq_key_op Date: Wed, 13 May 2020 22:43:47 +0100 Message-Id: <20200513214351.2138580-7-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200513214351.2138580-1-emil.l.velikov@gmail.com> References: <20200513214351.2138580-1-emil.l.velikov@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Greg Kroah-Hartman , emil.l.velikov@gmail.com, linux-kernel@vger.kernel.org, Jiri Slaby , sparclinux@vger.kernel.org, "David S. Miller" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" With earlier commits, the API no longer discards the const-ness of the sysrq_key_op. As such we can add the notation. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-kernel@vger.kernel.org Cc: "David S. Miller" Cc: sparclinux@vger.kernel.org Signed-off-by: Emil Velikov Acked-by: David S. Miller --- Please keep me in the CC list, as I'm not subscribed to the list. IMHO it would be better if this gets merged this via the tty tree. --- arch/sparc/kernel/process_64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/sparc/kernel/process_64.c b/arch/sparc/kernel/process_64.c index 4282116e28e7..423011e60982 100644 --- a/arch/sparc/kernel/process_64.c +++ b/arch/sparc/kernel/process_64.c @@ -313,7 +313,7 @@ static void sysrq_handle_globreg(int key) trigger_all_cpu_backtrace(); } -static struct sysrq_key_op sparc_globalreg_op = { +static const struct sysrq_key_op sparc_globalreg_op = { .handler = sysrq_handle_globreg, .help_msg = "global-regs(y)", .action_msg = "Show Global CPU Regs", @@ -388,7 +388,7 @@ static void sysrq_handle_globpmu(int key) pmu_snapshot_all_cpus(); } -static struct sysrq_key_op sparc_globalpmu_op = { +static const struct sysrq_key_op sparc_globalpmu_op = { .handler = sysrq_handle_globpmu, .help_msg = "global-pmu(x)", .action_msg = "Show Global PMU Regs", From patchwork Wed May 13 21:43:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 11547339 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 86460618 for ; Wed, 13 May 2020 21:46:59 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3CDA0206F5 for ; Wed, 13 May 2020 21:46:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rO3yc4WH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3CDA0206F5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 201466EA8D; Wed, 13 May 2020 21:46:49 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by gabe.freedesktop.org (Postfix) with ESMTPS id 849316EA86 for ; Wed, 13 May 2020 21:46:47 +0000 (UTC) Received: by mail-wm1-x344.google.com with SMTP id f134so15955573wmf.1 for ; Wed, 13 May 2020 14:46:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dJi5eMHwAqzUe2i3jUFYaA8xST3/sOL5U08KB2I3T4g=; b=rO3yc4WHAm3l05vSdlARVUnLXK95J2qlUiA4WDLwPUJENF18/YcfSvDZUegRU04XRm vBtu9zIFe4bD2hgd9QTULm8biR5bgXnGTh9InWANNuITuru0/z5vJu1Uognp7JSMx3pr 8P3IXd/HOiDgEW8utGnSsiNoY2aF6SyGHq2ZGfQO2C67+KS87LgeeU9aICdC9HtcGptb Sv319/TJ5Z/0KAPdstm/aIyZeWaZforbuTfNxI/fChFR/r08Ag//hS1NvRSPUtxQPcRl Z2/NqtUtNsI8TQZu6Fg++9ThhlEm3wDnMjGRp0BuHFoWmPb7Tey5IVSvxvdhosybx7an VX3Q== 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:mime-version:content-transfer-encoding; bh=dJi5eMHwAqzUe2i3jUFYaA8xST3/sOL5U08KB2I3T4g=; b=oTSi0UOp8sc09+Evmz0tV7jart8+1YbdBGJiYISt9wDBWUb5gjxDqtlvJv+ZZ17NnP Qh0XbC9PnbDGcdC0nS8oUnbZfVqlv1qfsBSWm8irxJ233odK2Z6CsSPqCummDdqhPndK zifgug4WGQ0mMWgX6JIzIymDXtXjXRFT00kVIXiggQ2kHDSmwJT/lGNVFFSc3/Z7kAUm eK20kZ44X5oWsnUNYZ8eM+qMVZhmeE87kijj5HHGtFYEjXybiemaJ0srt8oC7Vu1G5em 6fjJko1GgwubuAj5XmhTrk4lJnaB2WoPD/T6x4SkEnixXtR7kzS+Q41yt4iYFmwFMYjL l4Cg== X-Gm-Message-State: AOAM531EbMiQRcZ0ZDEk0vRQtkb+ymVrYqaBwE2SIFxSdBnQJy/vWtZW fjMs71wakjG2xxO70tzxTADjyIpv X-Google-Smtp-Source: ABdhPJzAK3hSFQX3+iM2UijCSN/gp9M2/ZbzDliAJRi1ONBhnKazyOD1fNH1Svsw+VYzYAvf1rabIg== X-Received: by 2002:a1c:ba83:: with SMTP id k125mr11288465wmf.20.1589406405887; Wed, 13 May 2020 14:46:45 -0700 (PDT) Received: from localhost.localdomain (cpc91192-cmbg18-2-0-cust374.5-4.cable.virginm.net. [80.6.113.119]) by smtp.gmail.com with ESMTPSA id m23sm1699734wmg.45.2020.05.13.14.46.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 14:46:45 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH 08/11] drm: constify sysrq_key_op Date: Wed, 13 May 2020 22:43:48 +0100 Message-Id: <20200513214351.2138580-8-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200513214351.2138580-1-emil.l.velikov@gmail.com> References: <20200513214351.2138580-1-emil.l.velikov@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, emil.l.velikov@gmail.com, Thomas Zimmermann , Jiri Slaby Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" With earlier commits, the API no longer discards the const-ness of the sysrq_key_op. As such we can add the notation. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-kernel@vger.kernel.org Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: dri-devel@lists.freedesktop.org Signed-off-by: Emil Velikov Reviewed-by: Daniel Vetter Acked-by: Daniel Vetter --- Please keep me in the CC list, as I'm not subscribed to the list. IMHO it would be better if this gets merged this via the tty tree. --- drivers/gpu/drm/drm_fb_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index a9771de4d17e..533767100efe 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -307,13 +307,13 @@ static void drm_fb_helper_sysrq(int dummy1) schedule_work(&drm_fb_helper_restore_work); } -static struct sysrq_key_op sysrq_drm_fb_helper_restore_op = { +static const struct sysrq_key_op sysrq_drm_fb_helper_restore_op = { .handler = drm_fb_helper_sysrq, .help_msg = "force-fb(V)", .action_msg = "Restore framebuffer console", }; #else -static struct sysrq_key_op sysrq_drm_fb_helper_restore_op = { }; +static const struct sysrq_key_op sysrq_drm_fb_helper_restore_op = { }; #endif static void drm_fb_helper_dpms(struct fb_info *info, int dpms_mode) From patchwork Wed May 13 21:43:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 11547351 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 47DF2618 for ; Wed, 13 May 2020 21:47:08 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F270D20727 for ; Wed, 13 May 2020 21:47:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rr+s2C7s" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F270D20727 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 992986EA9B; Wed, 13 May 2020 21:46:54 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by gabe.freedesktop.org (Postfix) with ESMTPS id A82F66EA86 for ; Wed, 13 May 2020 21:46:48 +0000 (UTC) Received: by mail-wr1-x441.google.com with SMTP id j5so1350100wrq.2 for ; Wed, 13 May 2020 14:46:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xXwPehQJdO8W/RRFT9lpEbo/rwg/NqlvrsX9ydy+gUY=; b=rr+s2C7s3IetyBx7kdhC2xyGjmSTPhmqZhI5/PZ+FbS/2BORt8LIkjnLxdLspEASX0 51sn7beVDeEo6rKv1MXsb0gx+hhHXvMtjVkSAXAscD3TvvRmb4hg/48XyNdRmyaAlqrx 3HEH1yPjKSPvKuMRkSYDf4dG4oo0yAEmb0q6IFfTAFvN/fr9ekuEDG8UWgqUnxKtrxyk X17kJ375os2vhxJE6ezApRqMSgh8Yln4Zv5y8sltZTHJZaXqwrQDfpS+FMV1LSjKe/F7 iymLY764L6GTLbeuBfI7gpkJRtxt42+ogtqXGM7bKsaGZj9xRX2EXol4NY+ywW8xCAON YbKg== 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:mime-version:content-transfer-encoding; bh=xXwPehQJdO8W/RRFT9lpEbo/rwg/NqlvrsX9ydy+gUY=; b=NHzKfnsVbVpES6s2vQYYuTNlLZZ/NK9X7C50KN75cyboIEJ9Cydu+OdfBkJ+OL7vLb K/cwCgAaj8A18iUe1X66da2iIK9E3tUmUnOd4hEZRIFayYMPYjj6IRUBIVghmG0CixDM xBHRXkjQ4rt/1lW0cX5TPLXUCWj/GrfKYXQ5Kbig1O56V0QWdMdBHHRKtjw0a/76L7gq 1YD7oBYVv20itxeSAyxu+ZoPJ/hOcq40+xK+uhCOY1WJNukf58FXtRVsosWpBJgg9nuh ol5qV7EEMnwUNfyiDJFkDo9serS1mTIdRHAMDq3PcbfNP2SduTyk3CKVphnvyZ4C1Cik oe6w== X-Gm-Message-State: AOAM530zUIRcGTrXAi5ZIovnvygo5E875SZw1PW5W+1WURmWxiHSfuA+ ok2q+1wMs7+R2mIAuAjLpSlfSP1y X-Google-Smtp-Source: ABdhPJw9XZ5u4qa2WDv17qZvd3SOounzZl47xyXJOSldxT3dsYn4CeJEqn0WOiupCTq6uTcy8reIZQ== X-Received: by 2002:adf:e5c9:: with SMTP id a9mr1683725wrn.292.1589406407182; Wed, 13 May 2020 14:46:47 -0700 (PDT) Received: from localhost.localdomain (cpc91192-cmbg18-2-0-cust374.5-4.cable.virginm.net. [80.6.113.119]) by smtp.gmail.com with ESMTPSA id m23sm1699734wmg.45.2020.05.13.14.46.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 14:46:46 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH 09/11] kdb: constify sysrq_key_op Date: Wed, 13 May 2020 22:43:49 +0100 Message-Id: <20200513214351.2138580-9-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200513214351.2138580-1-emil.l.velikov@gmail.com> References: <20200513214351.2138580-1-emil.l.velikov@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Thompson , Greg Kroah-Hartman , Jiri Slaby , emil.l.velikov@gmail.com, linux-kernel@vger.kernel.org, Jason Wessel , kgdb-bugreport@lists.sourceforge.net Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" With earlier commits, the API no longer discards the const-ness of the sysrq_key_op. As such we can add the notation. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-kernel@vger.kernel.org Cc: Jason Wessel Cc: Daniel Thompson Cc: kgdb-bugreport@lists.sourceforge.net Signed-off-by: Emil Velikov Acked-by: Daniel Thompson --- Please keep me in the CC list, as I'm not subscribed to the list. IMHO it would be better if this gets merged this via the tty tree. --- kernel/debug/debug_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/debug/debug_core.c b/kernel/debug/debug_core.c index 2b7c9b67931d..355bea54ca0e 100644 --- a/kernel/debug/debug_core.c +++ b/kernel/debug/debug_core.c @@ -920,7 +920,7 @@ static void sysrq_handle_dbg(int key) kgdb_breakpoint(); } -static struct sysrq_key_op sysrq_dbg_op = { +static const struct sysrq_key_op sysrq_dbg_op = { .handler = sysrq_handle_dbg, .help_msg = "debug(g)", .action_msg = "DEBUG", From patchwork Wed May 13 21:43:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 11547347 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9D785618 for ; Wed, 13 May 2020 21:47:05 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5350C206F5 for ; Wed, 13 May 2020 21:47:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bdantqXw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5350C206F5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6AB2C6EA9A; Wed, 13 May 2020 21:46:54 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by gabe.freedesktop.org (Postfix) with ESMTPS id E59D26EA98 for ; Wed, 13 May 2020 21:46:49 +0000 (UTC) Received: by mail-wr1-x444.google.com with SMTP id y3so1357087wrt.1 for ; Wed, 13 May 2020 14:46:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GJdGXsHD0zUd2QbzbW/I0cKeP4IeBGCB2rpC+2MAeZI=; b=bdantqXwbJZtRf8K1mYSwY3s0rsnkVOn4KOdiGMmYTUs2SRGH3Jv8v3lfKjmVpKb0D dq+FPq86JI3gIcoKzUP72wPP275IDQqCyyRzzT29Cg8g61hXhvCo+Wu3kAFP2fv5wWre V7KVHZzm1R9X4+9eZLkyH86XAgi+HzvJ8nf1b050sHdvLfNZWcBZw96lLSpiVhW7MLae ts42GPrel78Xz6ct/586YopmRohDVkg+pQlWMfmWz067xJv8WxBGOk66DgtySkRuUEga xxjCqmxTf59JQK+NYgzHnegqg+aUHIA/7WfBrp9NoHOfdUKH8hsydlFTyWhHiZOIEdEg DoXg== 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:mime-version:content-transfer-encoding; bh=GJdGXsHD0zUd2QbzbW/I0cKeP4IeBGCB2rpC+2MAeZI=; b=Sq5hqHygwA4bszBhkXIGjj1YnOV1q7fMT9SQnaBfYIT8m3xlPuoZPk9A9zH2PSISl8 gYXr3+3TM83viAGdtww4QEehB82ihCXK//mKpunQ0sjCwNxgF/lSa5wyTrrOjV0MuJNw cZjkLDGFbTwyd2f15dLfV3alB8PTaFSJj5piKCt3RtEW/fyFOrmpYLB3SmBO4nP4p8AZ uPFL+LN6KMl6e0x9hWx+0bFeLsZIRHr3YbKMQRYNWzOCNlDYMEY73iMlE9UaqMuCJj29 vFOnHpi2BSEBkMm0Bwxizz1FarHvD457wJv6ZdUyNd79VLu81s4LpUYH3ZURwNyBWJIj Ii7Q== X-Gm-Message-State: AOAM530gbRTgzj9QihcViz+9yTI2FtQ2Qz84WlLi67xKxsDTmw9iEhMU 7esys+GNmzGiHQGG85pIdPDTNTT+ X-Google-Smtp-Source: ABdhPJwOW0a96inUowDYevyxA5bBc6FGdx6sWbOmF82NP31eWee/F6lJtgBgJewXU8AVUAr+23bjgg== X-Received: by 2002:a5d:684f:: with SMTP id o15mr1481873wrw.89.1589406408323; Wed, 13 May 2020 14:46:48 -0700 (PDT) Received: from localhost.localdomain (cpc91192-cmbg18-2-0-cust374.5-4.cable.virginm.net. [80.6.113.119]) by smtp.gmail.com with ESMTPSA id m23sm1699734wmg.45.2020.05.13.14.46.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 14:46:47 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH 10/11] kernel/power: constify sysrq_key_op Date: Wed, 13 May 2020 22:43:50 +0100 Message-Id: <20200513214351.2138580-10-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200513214351.2138580-1-emil.l.velikov@gmail.com> References: <20200513214351.2138580-1-emil.l.velikov@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Len Brown , linux-pm@vger.kernel.org, Greg Kroah-Hartman , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, emil.l.velikov@gmail.com, Jiri Slaby Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" With earlier commits, the API no longer discards the const-ness of the sysrq_key_op. As such we can add the notation. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-kernel@vger.kernel.org Cc: "Rafael J. Wysocki" Cc: Len Brown Cc: linux-pm@vger.kernel.org Signed-off-by: Emil Velikov Acked-by: Rafael J. Wysocki --- Please keep me in the CC list, as I'm not subscribed to the list. IMHO it would be better if this gets merged this via the tty tree. --- kernel/power/poweroff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/power/poweroff.c b/kernel/power/poweroff.c index 6d475281c730..562aa0e450ed 100644 --- a/kernel/power/poweroff.c +++ b/kernel/power/poweroff.c @@ -29,7 +29,7 @@ static void handle_poweroff(int key) schedule_work_on(cpumask_first(cpu_online_mask), &poweroff_work); } -static struct sysrq_key_op sysrq_poweroff_op = { +static const struct sysrq_key_op sysrq_poweroff_op = { .handler = handle_poweroff, .help_msg = "poweroff(o)", .action_msg = "Power Off", From patchwork Wed May 13 21:43:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 11547345 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 545C7618 for ; Wed, 13 May 2020 21:47:04 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0ABCB206F5 for ; Wed, 13 May 2020 21:47:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LekmvqEe" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0ABCB206F5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B60996EA98; Wed, 13 May 2020 21:46:53 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by gabe.freedesktop.org (Postfix) with ESMTPS id D27496EA98 for ; Wed, 13 May 2020 21:46:50 +0000 (UTC) Received: by mail-wr1-x442.google.com with SMTP id s8so1302336wrt.9 for ; Wed, 13 May 2020 14:46:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=x7qfOFMEOKghZEcX71PCTwgo1XxvppOm/912/nC3M4w=; b=LekmvqEeT7CWFd+FwUdPd3q2gBtje/kStARbBm7frB7NS5yaQgKFNy0IuuNIi1dHwF fDT+7xUPTKJZmIl9+2vMGLDZzxr5d9ypWVGYxAawanTdP9ZCXyX7pFmC346kIeaEAQjT KUQLfeFLNppUox+V3SUxoSbwEdxMATcBrwkYYdl7zu9GMqjASU3UMgsNns3iNLosPpKa eJRMpqF/Xjv28Tjb9tsJTm4uwZIdcJxZcOgofgUpZTfDsbpF+t/WqyDygWYb4J9o/Psk zvynEB97S09SHpKTT/zHMCyblgAqNOp9a4kBVw9Mqk7Vnvu/tnVTVw1Y1e4mSwHDZPTk OI3g== 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:mime-version:content-transfer-encoding; bh=x7qfOFMEOKghZEcX71PCTwgo1XxvppOm/912/nC3M4w=; b=BvEiUv8c3uovXjmcZnqXIXGldWSTTl6zeh53BSKhr0HSYyNLyuU7sJGSRvhpLhXeEt FYKDVq6JjjZvhva29RLAiADR/GxvmJlTBB5EopFKaWYln0hoSHk0JE363IeQLkBizk/D /d/y3NP2n4MujiRi6jhGE//gd09WbOYheKg1dENfeY0k9coN3e/4tqIn6tXM9B4o/mZm DCgwIsMIOm5t4eutJlNH8ZowCwXU6BgL1INPxjFyl6dGlEWXr8ROaP4GCbd6O/9N8vzx otXYZRfwJ6OQqPYYO1N+xncPQRczCJ0suB4nI9R1xKGvLxoFPuD0Jj7wZbc5VT00/T39 V5Cw== X-Gm-Message-State: AOAM532G+0ImMuyJ7hbaqYzo6QKMdaA77Y2VrWM6IC1ZkcMw+5hysp5m nHU5MZRBTsEXhsraOobb0BLO7bFN X-Google-Smtp-Source: ABdhPJyhzyhCGx2Cl8Yj4V9mytYwksNLzoK7ZBRAORJJ7ctb+CQVFtZJueuqBS6HuhgT0C1BnCwuNw== X-Received: by 2002:a05:6000:128b:: with SMTP id f11mr1518962wrx.227.1589406409289; Wed, 13 May 2020 14:46:49 -0700 (PDT) Received: from localhost.localdomain (cpc91192-cmbg18-2-0-cust374.5-4.cable.virginm.net. [80.6.113.119]) by smtp.gmail.com with ESMTPSA id m23sm1699734wmg.45.2020.05.13.14.46.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 14:46:48 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH 11/11] rcu: constify sysrq_key_op Date: Wed, 13 May 2020 22:43:51 +0100 Message-Id: <20200513214351.2138580-11-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200513214351.2138580-1-emil.l.velikov@gmail.com> References: <20200513214351.2138580-1-emil.l.velikov@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Paul E. McKenney" , Greg Kroah-Hartman , emil.l.velikov@gmail.com, Josh Triplett , linux-kernel@vger.kernel.org, rcu@vger.kernel.org, Jiri Slaby Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" With earlier commits, the API no longer discards the const-ness of the sysrq_key_op. As such we can add the notation. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-kernel@vger.kernel.org Cc: "Paul E. McKenney" Cc: Josh Triplett Cc: rcu@vger.kernel.org Signed-off-by: Emil Velikov Reviewed-by: Paul E. McKenney --- Please keep me in the CC list, as I'm not subscribed to the list. IMHO it would be better if this gets merged this via the tty tree. --- kernel/rcu/tree_stall.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/rcu/tree_stall.h b/kernel/rcu/tree_stall.h index 119ed6afd20f..4e6ed7b91f59 100644 --- a/kernel/rcu/tree_stall.h +++ b/kernel/rcu/tree_stall.h @@ -729,7 +729,7 @@ static void sysrq_show_rcu(int key) show_rcu_gp_kthreads(); } -static struct sysrq_key_op sysrq_rcudump_op = { +static const struct sysrq_key_op sysrq_rcudump_op = { .handler = sysrq_show_rcu, .help_msg = "show-rcu(y)", .action_msg = "Show RCU tree",