Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp597704rwp; Wed, 12 Jul 2023 19:56:01 -0700 (PDT) X-Google-Smtp-Source: APBJJlHjOtMrwtS64gnMBrPe4PgjesiSEOS+wHso5ytULg23WsnisoTHVOda7QM0LZmeW1++P0wz X-Received: by 2002:a0d:e208:0:b0:56d:9e2:7d9e with SMTP id l8-20020a0de208000000b0056d09e27d9emr518995ywe.21.1689216960915; Wed, 12 Jul 2023 19:56:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689216960; cv=none; d=google.com; s=arc-20160816; b=mO3SCL0SDgNC/Sq5VmzSn8ppw9nRqPIUOUVwQFtXrrEP3cB5rExmqDuysbAgnAJU3T a91H3gmOwPnSO52ZFFgeHsvV536eheIYmYEYAw6botvH8XHDeQWD77K5lHUUdnuL7n6B SPEuh57FUElqa3A2psOy6FNTxzXVSPNEZSRrMZYdT5ve4/qb8oAXgG3qM601fT/jgAAj bfGfXXOv6lxQewBvNGbz7a3X2bd6NpAxevpeZjmUghHWypedSv4RTy/CYaXlYS0azISb OdFxppRyCSzhtCMm9oDOJVbJOvSh2gpC924CDSy3YimyoTnM7F/rkGD78ZGnJ4K//FJJ SmFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=Dbl5GT4QXr0Hb9LBTYx5ecMOQKk2YluvnVCxVf+ASCM=; fh=2pjJjTjFxvczYJkitfWMwhQwmt0wTY5VrXOVx/y7g0I=; b=R99PC7FRAB7Gg2rVS2dLyxOlZJ+W5YbIZo0YMAcjIteg+MRjlq2SorvLz63zR6grcB +56qxtllEI8H747fJ5vQDG+Ra2XoMIiqVsmRQY7G+8v8SssUjrJRrhKRr+/tYj3/g3Vf cYjNEjPGuAEChHp6sfWE0MLPKWj9YcxfPlQ62FRZZDYYfwsYXxjJpc6BFnUPVNSwVTr6 KC9DwJBw/KpvK22l0B5PW9qfhBKsi+sx9tY4Nx1s/p1P2Br+RvWlEDwiy2f4yhFG6suf zjDSveaPdEqw2rlLFBWwKmd5nDOOdGoUxRFEYZ/sQysroZsQpYg/nogrPCTSrYhIPK/A r1Rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xen0n.name header.s=mail header.b=BzBBi+C0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lo3-20020a170903434300b001b7fa4d1a7esi4134738plb.507.2023.07.12.19.55.46; Wed, 12 Jul 2023 19:56:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@xen0n.name header.s=mail header.b=BzBBi+C0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232486AbjGMCp7 (ORCPT + 99 others); Wed, 12 Jul 2023 22:45:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229646AbjGMCp6 (ORCPT ); Wed, 12 Jul 2023 22:45:58 -0400 Received: from mailbox.box.xen0n.name (mail.xen0n.name [115.28.160.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1ACD19BA; Wed, 12 Jul 2023 19:45:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xen0n.name; s=mail; t=1689216351; bh=gqz1bgvL/lc4UJv2uVXgCnOHv0QDm6yYBsD26lwdwp8=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=BzBBi+C00IuSe07iaacQw/Rel7MGQmTVUDl8U2srpx3+vUC2lgT4eXwe7XZnMj9cH wvOU3eM42Q0ppZyhciwLdOt9zeGR7iuQDV2cI0lCPWNU4Oa2iQ/GL0BNMYnqujb/2z pQMdRBzje3qDwknM47V5k+8tOn/ug4Xo0MfAtvgY= Received: from [100.100.34.13] (unknown [220.248.53.61]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailbox.box.xen0n.name (Postfix) with ESMTPSA id 9684C600DA; Thu, 13 Jul 2023 10:45:50 +0800 (CST) Message-ID: <0797812f-20cd-9961-7a46-d8e6fefee788@xen0n.name> Date: Thu, 13 Jul 2023 10:45:50 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH 02/10] tty: sysrq: switch sysrq handlers from int to u8 To: "Jiri Slaby (SUSE)" , gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Richard Henderson , Ivan Kokshaysky , Matt Turner , Huacai Chen , Thomas Bogendoerfer , Michael Ellerman , Nicholas Piggin , Christophe Leroy , "David S. Miller" , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Jason Wessel , Daniel Thompson , Douglas Anderson , "Rafael J. Wysocki" , Len Brown , Pavel Machek , "Paul E. McKenney" , Frederic Weisbecker , Neeraj Upadhyay , Joel Fernandes , Josh Triplett , Boqun Feng , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Zqiang References: <20230712081811.29004-1-jirislaby@kernel.org> <20230712081811.29004-3-jirislaby@kernel.org> Content-Language: en-US From: WANG Xuerui In-Reply-To: <20230712081811.29004-3-jirislaby@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023/7/12 16:18, Jiri Slaby (SUSE) wrote: > The passed parameter to sysrq handlers is a key (a character). So change > the type from 'int' to 'u8'. Let it specifically be 'u8' for two > reasons: > * unsigned: unsigned values come from the upper layers (devices) and the > tty layer assumes unsigned on most places, and > * 8-bit: as that what's supposed to be one day in all the layers built > on the top of tty. (Currently, we use mostly 'unsigned char' and > somewhere still only 'char'. (But that also translates to the former > thanks to -funsigned-char.)) > > Signed-off-by: Jiri Slaby (SUSE) > Cc: Richard Henderson > Cc: Ivan Kokshaysky > Cc: Matt Turner > Cc: Huacai Chen > Cc: WANG Xuerui > Cc: Thomas Bogendoerfer > Cc: Michael Ellerman > Cc: Nicholas Piggin > Cc: Christophe Leroy > Cc: "David S. Miller" > Cc: Maarten Lankhorst > Cc: Maxime Ripard > Cc: Thomas Zimmermann > Cc: David Airlie > Cc: Daniel Vetter > Cc: Jason Wessel > Cc: Daniel Thompson > Cc: Douglas Anderson > Cc: "Rafael J. Wysocki" > Cc: Len Brown > Cc: Pavel Machek > Cc: "Paul E. McKenney" > Cc: Frederic Weisbecker > Cc: Neeraj Upadhyay > Cc: Joel Fernandes > Cc: Josh Triplett > Cc: Boqun Feng > Cc: Steven Rostedt > Cc: Mathieu Desnoyers > Cc: Lai Jiangshan > Cc: Zqiang > --- > arch/alpha/kernel/setup.c | 2 +- > arch/loongarch/kernel/sysrq.c | 2 +- > arch/mips/kernel/sysrq.c | 2 +- > arch/powerpc/xmon/xmon.c | 2 +- > arch/sparc/kernel/process_64.c | 4 ++-- > drivers/gpu/drm/drm_fb_helper.c | 2 +- > drivers/tty/sysrq.c | 40 ++++++++++++++++----------------- > include/linux/sysrq.h | 2 +- > kernel/debug/debug_core.c | 2 +- > kernel/power/poweroff.c | 2 +- > kernel/rcu/tree_stall.h | 2 +- > 11 files changed, 31 insertions(+), 31 deletions(-) > > [snip] > diff --git a/arch/loongarch/kernel/sysrq.c b/arch/loongarch/kernel/sysrq.c > index 366baef72d29..e663c10fa39c 100644 > --- a/arch/loongarch/kernel/sysrq.c > +++ b/arch/loongarch/kernel/sysrq.c > @@ -43,7 +43,7 @@ static void sysrq_tlbdump_othercpus(struct work_struct *dummy) > static DECLARE_WORK(sysrq_tlbdump, sysrq_tlbdump_othercpus); > #endif > > -static void sysrq_handle_tlbdump(int key) > +static void sysrq_handle_tlbdump(u8 key) > { > sysrq_tlbdump_single(NULL); > #ifdef CONFIG_SMP > [snip] Acked-by: WANG Xuerui # loongarch Thanks! -- WANG "xen0n" Xuerui Linux/LoongArch mailing list: https://lore.kernel.org/loongarch/