Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10745155imu; Thu, 6 Dec 2018 06:11:21 -0800 (PST) X-Google-Smtp-Source: AFSGD/VhZlGCguBwszUcrtIAAysqNwEOwKo69GCEgLNDGFirTPpTGv3ZJ7sZc+T0/wEKooGwbqdI X-Received: by 2002:a62:3948:: with SMTP id g69mr29070570pfa.114.1544105481783; Thu, 06 Dec 2018 06:11:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544105481; cv=none; d=google.com; s=arc-20160816; b=rvjs+3zlt4/38xTwS/G/5HBkpstLYyiC6MJN483nO0kSJZAEjxbbs7fZByIuiv1Nm1 fHb/XUY+Imz9XfHGC5+01f3UD/pMN/ugz+xC5+lYitVO5cbGBzZOfvcK+vxT2OYJpQF5 rvorzsZUTrpPTVgOFaRrkfbbLUJd327d/XhYois3W7mdgKDKzjxOzRuUWIuWGHMslyy0 I6TkRiKA75eC+gj4vsAD3yAVqI2VGn/RjYRHgd9lpI5YoM27wHnuOcpIPB1LYAEvUSL8 kI5l/hS9e9eyk07ZrZRFszTFxudNbc7XAF7ffxPYOHIo9mqyc8nKqSD5N/+GYHhGCXnv dE6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=o+Hi5qCu1RLhwE+bPLc/5fSsJZ+tnZVQIQpuolGNy+I=; b=fq1xSsLyDWMO5sqTFpi17K3E8pJHXBeqkXCO98X0nXV9FgtQyibtw1QX8vTNZ3n+an AtNvHeWewz1bKU0qOph3cbqOW6nNFS8V7BAIDifqH4zsj0fY/7USJV1QeqNdkkLKSYOj ZYpbevVeCiZ+0JvPY28N32N+GaZX+lOWmn3ygrTfX5bvMeEvUtnefQMZqOK0KqzwQooc fjCsHbbUTzK9HydH2Os5t82EgGH7KD0mW3hsKIiJwe8grtMxFxcEQDaYgeT0vQ4ha+2A ak3I4gggrRJg8cvnNksNczA8TfPnUofssMxsch5p8cu537MGkbOrmye/qlSOeHsBD2ph UaQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="QOb/y+96"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (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 e4si295168pgl.570.2018.12.06.06.10.42; Thu, 06 Dec 2018 06:11:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="QOb/y+96"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729664AbeLFOJI (ORCPT + 99 others); Thu, 6 Dec 2018 09:09:08 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:37225 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727704AbeLFOJI (ORCPT ); Thu, 6 Dec 2018 09:09:08 -0500 Received: by mail-wm1-f65.google.com with SMTP id g67so1171170wmd.2 for ; Thu, 06 Dec 2018 06:09:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=o+Hi5qCu1RLhwE+bPLc/5fSsJZ+tnZVQIQpuolGNy+I=; b=QOb/y+96Q7IteY/fkJLo/FOu/I+/Jb5bFWJhFIHgRf+yYO6ntmupLCcUbcM3sliKY6 gvn53nnFJIrS2KgQXJGITmUE16w0pz86fzm1ardMfOz/7nb5pt8dv3CeKk3GU4d/ZqoY hXXrD5o6czjIspu3J6g/Mr08JNMmh12TmlSqM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=o+Hi5qCu1RLhwE+bPLc/5fSsJZ+tnZVQIQpuolGNy+I=; b=Cc83gLfDZBhGNDIQOmVTj5whe/hT4Gom6pmO3gNnmGj8kJEkCrLB02k5jaHS5CHuah 66hy5uraUiQwYtmMUu2+M9o1p8ERGwDTY3txJ6UgpV2mG/icUgAsn1pKtp8LPWzMB2qK Oo/XfAWgUAzRoxrF2ElsEhG6gp0uQ1mB5SiRi6MVIdLRBiG5zzFXn8o9uxiZCboEzDAU KADghnJ/yT/kFeUAQEEdMTYY5XtRi3dr9rHlgW2rWgUsM8b0RpVdbx+lYZ+zKtrES69G yw8iszwYpz2KbHuJi8BDUQm2QqmLQbTryK21ch66rPicvGnnwn32j5OQH1oHT/uctcyt TJpw== X-Gm-Message-State: AA+aEWa2/wWEk56GXSuhZJ1Jn7GCU0l8yDHugMYrdxOUgyeeVohxjnNj AExcAWOaWzfVoXYxvPqP7FnuRw== X-Received: by 2002:a1c:8089:: with SMTP id b131mr20179449wmd.141.1544105346072; Thu, 06 Dec 2018 06:09:06 -0800 (PST) Received: from holly.lan (cpc141214-aztw34-2-0-cust773.18-1.cable.virginm.net. [86.9.19.6]) by smtp.gmail.com with ESMTPSA id t5sm1380222wmd.15.2018.12.06.06.09.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 06 Dec 2018 06:09:05 -0800 (PST) Date: Thu, 6 Dec 2018 14:09:02 +0000 From: Daniel Thompson To: Christophe Leroy Cc: Vineet Gupta , Russell King , Catalin Marinas , Will Deacon , Yoshinori Sato , Richard Kuo , Michal Simek , Ralf Baechle , Paul Burton , James Hogan , Ley Foon Tan , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Rich Felker , "David S. Miller" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, Jason Wessel , Douglas Anderson , Randy Dunlap , "Gustavo A. R. Silva" , linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, uclinux-h8-devel@lists.sourceforge.jp, linux-hexagon@vger.kernel.org, linux-mips@vger.kernel.org, nios2-dev@lists.rocketboards.org, linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, kgdb-bugreport@lists.sourceforge.net Subject: Re: [PATCH 1/2] mips/kgdb: prepare arch_kgdb_ops for constness Message-ID: <20181206140902.ea6jlwqrbcwyxp5r@holly.lan> References: <75bbcdd1e9277d66ebb06e349dda304bd01ce761.1543957194.git.christophe.leroy@c-s.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <75bbcdd1e9277d66ebb06e349dda304bd01ce761.1543957194.git.christophe.leroy@c-s.fr> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 05, 2018 at 04:41:09AM +0000, Christophe Leroy wrote: > MIPS is the only architecture modifying arch_kgdb_ops during init. > This patch makes the init static, so that it can be changed to > const in following patch, as recommended by checkpatch.pl > > Suggested-by: Paul Burton > Signed-off-by: Christophe Leroy From my side this is Acked-by: Daniel Thompson Since this is a dependency for the next patch I'd be happy to take via my tree... but would need an ack from the MIPS guys to do that. Daniel. > --- > arch/mips/kernel/kgdb.c | 16 +++++++--------- > 1 file changed, 7 insertions(+), 9 deletions(-) > > diff --git a/arch/mips/kernel/kgdb.c b/arch/mips/kernel/kgdb.c > index eb6c0d582626..31eff1bec577 100644 > --- a/arch/mips/kernel/kgdb.c > +++ b/arch/mips/kernel/kgdb.c > @@ -394,18 +394,16 @@ int kgdb_arch_handle_exception(int vector, int signo, int err_code, > return -1; > } > > -struct kgdb_arch arch_kgdb_ops; > +struct kgdb_arch arch_kgdb_ops = { > +#ifdef CONFIG_CPU_BIG_ENDIAN > + .gdb_bpt_instr = { spec_op << 2, 0x00, 0x00, break_op }, > +#else > + .gdb_bpt_instr = { break_op, 0x00, 0x00, spec_op << 2 }, > +#endif > +}; > > int kgdb_arch_init(void) > { > - union mips_instruction insn = { > - .r_format = { > - .opcode = spec_op, > - .func = break_op, > - } > - }; > - memcpy(arch_kgdb_ops.gdb_bpt_instr, insn.byte, BREAK_INSTR_SIZE); > - > register_die_notifier(&kgdb_notifier); > > return 0; > -- > 2.13.3 >