From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eddie.linux-mips.org ([148.251.95.138]:37348 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755781AbdDLUdP (ORCPT ); Wed, 12 Apr 2017 16:33:15 -0400 Received: from localhost.localdomain ([127.0.0.1]:59024 "EHLO linux-mips.org" rhost-flags-OK-OK-OK-FAIL) by eddie.linux-mips.org with ESMTP id S23993930AbdDLUdI1KnxF (ORCPT ); Wed, 12 Apr 2017 22:33:08 +0200 Date: Wed, 12 Apr 2017 22:33:04 +0200 From: Ralf Baechle To: James Hogan Cc: Sergei Shtylyov , Jason Wessel , linux-mips@linux-mips.org, stable@vger.kernel.org Subject: Re: [PATCH] MIPS: KGDB: Use kernel context for sleeping threads Message-ID: <20170412203304.GA3990@linux-mips.org> References: <20170330155526.GA21492@jhogan-linux.le.imgtec.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170330155526.GA21492@jhogan-linux.le.imgtec.org> Sender: stable-owner@vger.kernel.org List-ID: On Thu, Mar 30, 2017 at 04:55:26PM +0100, James Hogan wrote: > Hi Sergei, > > On Thu, Mar 30, 2017 at 06:42:08PM +0300, Sergei Shtylyov wrote: > > On 03/30/2017 06:06 PM, James Hogan wrote: > > > @@ -254,25 +251,46 @@ void sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *p) > > > #endif > > > > > > for (reg = 0; reg < 16; reg++) > > > - *(ptr++) = regs->regs[reg]; > > > + *(ptr++) = 0; > > > > Parens are not really necessary, you can get rid of them, while at it. > > While not technically required, I disagree that we should get rid of > them, simply because after coding in C for almost 20 years I still had > to look at an operator precedence table to check which of post++ and > dereference operators take precedence. I strongly side with James on this one so I applied the patch as-is. Ralf