Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5894imu; Wed, 19 Dec 2018 12:34:41 -0800 (PST) X-Google-Smtp-Source: AFSGD/UK5YPDp6kMGViI2y4p/GTnk2kZn7KtsZClSY7Fhorq4xOYQw6XhayRJ+fS6zLU4w5z3UvP X-Received: by 2002:a17:902:33c1:: with SMTP id b59mr21363075plc.220.1545251681765; Wed, 19 Dec 2018 12:34:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545251681; cv=none; d=google.com; s=arc-20160816; b=YJKpOj7fPZW05lRRCfsGR9N+uKgPQixXRnu+hb+82ZdUQpM9NlBDxwt6JO+e7m7aG/ nJroWh+dDKvAtnCIWSTGTD4vNVHGHvlyPvdSllGOgPS7g+hZ822gfbOWkZH4OyidCTUZ tlX61+XYHD1WH4FSKY1JNI9LzhR2GY18xBdZBMv5Gc+s13Sl24VBVJ0KonirojclCvl+ pyqgB2FU5P1voQMZ5zemSu9u5cJNi4oX41faTsebdkWSR4o62dlD/f6+6LtJGM0mbntP xM6C4VLV+K2y8JisTbiieFIbohvDEqGq+9ZA1B/2sbcL1c41wY4pFcIXDT5ZccFhZpei j9SA== 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=y+bPgt6SnPDP0a4iYjPYGvwAQx/u+oM+zOzt+Sj62ZI=; b=Q1mkulz0rUVYwXOwRVjz3uJEeejBa8pHViXOWqNo+u25QLUnACwJLg8ppMwFodIXiG E1UiiPqyy8zHZzU0vo80uXJdvMpozSL2sCEeyCtjWCl9qFjAd+fEH5BNJNqvJEAQoK+o QwmhxFO+xNoRNHU4GNmBseidQ0qx0TI+ppWeM6AWkNyeaHZ4prh3A58p4CXLTIdlUGiD 2O2AWPrKToGihAwtQFR7R6L0WRj5pLAVTNYircmmW2SrHRYUId5S8vH40+6+OY4R1yAy 378BHiSipaxgsBDMdWD1aZzroPkapYk80li5y+O2yzKDmdWm+668mB3pSlLj/ZSI/kgd +tDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TdUJ7NxQ; 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 i96si3377800plb.188.2018.12.19.12.34.25; Wed, 19 Dec 2018 12:34:41 -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=TdUJ7NxQ; 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 S1730105AbeLSQ5Y (ORCPT + 99 others); Wed, 19 Dec 2018 11:57:24 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:34487 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728576AbeLSQ5X (ORCPT ); Wed, 19 Dec 2018 11:57:23 -0500 Received: by mail-wm1-f67.google.com with SMTP id y185so9975048wmd.1 for ; Wed, 19 Dec 2018 08:57:22 -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=y+bPgt6SnPDP0a4iYjPYGvwAQx/u+oM+zOzt+Sj62ZI=; b=TdUJ7NxQU18/CR8M37OgvTsSJnNBt8JiTVfWx+XFGuv2kFDhUzRIOLKtLp4+yD6Xwc 2oydFOVxuY8MA1x43P7gMgXV6dwt/SxlX1uV1mzJkUoeplJFbAFqywD2cAOKH88ZjAho 1vQW45WF0HsRCqVNO1Pc7MeteQj97v+P4f78I= 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=y+bPgt6SnPDP0a4iYjPYGvwAQx/u+oM+zOzt+Sj62ZI=; b=ruIpNs4Oi34vN2z99dWRc6lA9uHrCaynAvb7gQ50xfviTOmvUO057Nh8IZdGtVNeZx wk729WBFnobo05m6JNDCpE2nOKJHvn2NRBmsTdF/qjZvrPyrBpnW9ksPULNMSKVIU62a 1dla24BRJ9u1K38qSDShD7dBJMKwvvDRMIiZcjttI5UKf4ba6KKAbdAHF7ieVcAv4IB/ UPJoGPzcBTht3glOWVldqGUedR1G9vucBj3+jRrywqH2Fk8OKT3J0KTm4ZRZ9GI2mlBc jTn/U5w5PwshIrbCp4nlQ/yCHhJIQgdqsYrNtTzo4ZJkKaGZ1yS2jHcu3Pt2orS41VNn mSTg== X-Gm-Message-State: AA+aEWYRTLAeFgRl3aNvtV3/ahPsn9fABl1cOxRJ0GjpQBWTXxW/idV6 1GkIPG27KuxEuA08sCWx1PVe8g== X-Received: by 2002:a1c:8089:: with SMTP id b131mr8035753wmd.141.1545238641603; Wed, 19 Dec 2018 08:57:21 -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 a17sm6236218wrs.58.2018.12.19.08.57.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Dec 2018 08:57:20 -0800 (PST) Date: Wed, 19 Dec 2018 16:57:18 +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 v2 1/2] mips/kgdb: prepare arch_kgdb_ops for constness Message-ID: <20181219165718.tf5ly7yg5es7bvum@holly.lan> References: <030d63848e4b0ef4d76ca24597ab8302a393d692.1544083483.git.christophe.leroy@c-s.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <030d63848e4b0ef4d76ca24597ab8302a393d692.1544083483.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 Thu, Dec 06, 2018 at 08:07:38PM +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 > Acked-by: Daniel Thompson > Acked-by: Paul Burton > Signed-off-by: Christophe Leroy Applied! Thanks. > - > --- > v2: Added acks from Daniel and Paul. > > 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 >