Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp653839rdb; Thu, 18 Jan 2024 14:57:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IEe+4Ayi2xRUceSdswUwIIABbQCVPQz0+ORjob3JJ35vkR1QfSgqRl2XLyWwlPIw3yAQINb X-Received: by 2002:a17:902:6ac9:b0:1d0:6ffd:cecf with SMTP id i9-20020a1709026ac900b001d06ffdcecfmr1523435plt.136.1705618653373; Thu, 18 Jan 2024 14:57:33 -0800 (PST) Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d12-20020a170902cecc00b001d5f508be46si2188963plg.200.2024.01.18.14.57.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 14:57:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-30611-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-30611-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30611-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 2BC6AB23929 for ; Thu, 18 Jan 2024 22:57:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 455301DA51; Thu, 18 Jan 2024 22:57:22 +0000 (UTC) Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.85.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3A0871DA33 for ; Thu, 18 Jan 2024 22:57:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.58.85.151 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705618641; cv=none; b=bd0snAg0ltz2SeJ7kjCL3/feLG29RSCL7c6WyhnktTxdLrvQiVXU+jwH83VNMyJQKAvzuYx+ZhDhDUpq/bFGVtR9Z2aUZkm6pf1aB6kkjtaZIFHO5rbKsN62U7VJKDJhkD6/eXfTezYNT1ZC8w9sgGjFtjANFZ1IWt0CB9HrVpM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705618641; c=relaxed/simple; bh=ePoebnA7cF9X5WjbtdpG44r2FPognLgyvewUM1ypAQ0=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: MIME-Version:Content-Type; b=Kq3gWbD66ATcvlYymVct83Y27q0NT8aXDRIVz0OV9Lh5Ux1Wvb3pKJwqmxpgtCaStmfq+Xyn+Z3C7vMt/hPkFpHcRAQ2P3OjDwSn8aMRXQVrsP3i1F2OO+BGzb2p5BZ+KxXNCjMSXf/tBrDksmxmoIw6zdNrd76dQboCmeMY/2w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ACULAB.COM; spf=pass smtp.mailfrom=aculab.com; arc=none smtp.client-ip=185.58.85.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ACULAB.COM Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aculab.com Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with both STARTTLS and AUTH (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mtapsc-8-UQGpYoAbOK6t9xx-prymvA-1; Thu, 18 Jan 2024 22:57:16 +0000 X-MC-Unique: UQGpYoAbOK6t9xx-prymvA-1 Received: from AcuMS.Aculab.com (10.202.163.6) by AcuMS.aculab.com (10.202.163.6) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Thu, 18 Jan 2024 22:56:59 +0000 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.048; Thu, 18 Jan 2024 22:56:59 +0000 From: David Laight To: 'Sreenath Vijayan' , "john.ogness@linutronix.de" , "corbet@lwn.net" , "gregkh@linuxfoundation.org" , "jirislaby@kernel.org" , "rdunlap@infradead.org" , "pmladek@suse.com" CC: "rostedt@goodmis.org" , "senozhatsky@chromium.org" , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-serial@vger.kernel.org" , "taichi.shimoyashiki@sony.com" , "daniel.palmer@sony.com" , "anandakumar.balasubramaniam@sony.com" Subject: RE: [PATCH v3 2/2] tty/sysrq: Dump printk ring buffer messages via sysrq Thread-Topic: [PATCH v3 2/2] tty/sysrq: Dump printk ring buffer messages via sysrq Thread-Index: AQHaSTdPmE3VCTcFQ06mN/ozLchFlLDgL+Yw Date: Thu, 18 Jan 2024 22:56:59 +0000 Message-ID: <57f8c1f40ccc4a4f9d29e97f50a36b4f@AcuMS.aculab.com> References: <57daf43c5270f7532b269b9f0e90d126ca012354.1705331453.git.sreenath.vijayan@sony.com> In-Reply-To: <57daf43c5270f7532b269b9f0e90d126ca012354.1705331453.git.sreenath.vijayan@sony.com> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable From: Sreenath Vijayan > Sent: 17 January 2024 11:14 ... > /* Key Operations table and lock */ > static DEFINE_SPINLOCK(sysrq_key_table_lock); >=20 > @@ -505,7 +523,7 @@ static const struct sysrq_key_op *sysrq_key_table[62]= =3D { > =09NULL,=09=09=09=09/* A */ > =09NULL,=09=09=09=09/* B */ > =09NULL,=09=09=09=09/* C */ > -=09NULL,=09=09=09=09/* D */ > +=09&sysrq_dmesg_dump_op,=09=09/* D */ > =09NULL,=09=09=09=09/* E */ > =09NULL,=09=09=09=09/* F */ > =09NULL,=09=09=09=09/* G */ That looks like it ought to use C99 initialisers: =09['D' - 'A'] =3D &sysrq_dmesg_dump_op, Possible with a #define to hide the offset. =09David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1= PT, UK Registration No: 1397386 (Wales)