From mboxrd@z Thu Jan 1 00:00:00 1970 From: Erwan LE RAY Subject: Re: Fwd: [PATCH] serial: stm32: fix a recursive locking in stm32_config_rs485 Date: Thu, 6 Jun 2019 07:42:31 +0000 Message-ID: <78dfdaaf-d855-8913-b8c5-e4ab6774868a@st.com> References: <20190604095452.6360-1-borut.seljak@t-2.net> <41dddd5f-5c1c-3346-890a-8018f26ebd49@st.com> <33271a7e-644b-70e3-f84c-d019b394ce77@st.com> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <33271a7e-644b-70e3-f84c-d019b394ce77@st.com> Content-Language: en-US Content-ID: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Borut Seljak Cc: Maxime Coquelin , Alexandre TORGUE , Greg Kroah-Hartman , "linux-kernel@vger.kernel.org" , "linux-serial@vger.kernel.org" , Jiri Slaby , "linux-stm32@st-md-mailman.stormreply.com" , "linux-arm-kernel@lists.infradead.org" List-Id: linux-serial@vger.kernel.org Hi Borut, Please remove unused "flags" variable declaration. Erwan. On 6/4/19 3:55 PM, Erwan LE RAY wrote: > >> Hi Borut, >> >> Please add the following line in the commit message (before your = >> sign-off) in a V2 of your patch: >> >> Fixes: 1bcda09d291081 ("serial: stm32: add support for RS485 hardware = >> control mode") >> >> I'm OK with the patch itself. >> >> Erwan. >> >> >> Subject: [PATCH] serial: stm32: fix a recursive locking in >>> stm32_config_rs485 >>> Date: Tue,=A0 4 Jun 2019 11:54:51 +0200 >>> From: Borut Seljak >>> CC: Maxime Coquelin , Alexandre Torgue >>> , Greg Kroah-Hartman >>> , linux-kernel@vger.kernel.org, >>> borut.seljak@t-2.net, linux-serial@vger.kernel.org, Jiri Slaby >>> , linux-stm32@st-md-mailman.stormreply.com, >>> linux-arm-kernel@lists.infradead.org >>> >>> Remove spin_lock_irqsave in stm32_config_rs485, it cause recursive = >>> locking. >>> Already locked in uart_set_rs485_config. >>> >>> Signed-off-by: Borut Seljak >>> --- >>> =A0 drivers/tty/serial/stm32-usart.c | 2 -- >>> =A0 1 file changed, 2 deletions(-) >>> >>> diff --git a/drivers/tty/serial/stm32-usart.c >>> b/drivers/tty/serial/stm32-usart.c >>> index e8d7a7bb4339..da373a465f51 100644 >>> --- a/drivers/tty/serial/stm32-usart.c >>> +++ b/drivers/tty/serial/stm32-usart.c >>> @@ -107,7 +107,6 @@ static int stm32_config_rs485(struct uart_port = >>> *port, >>> =A0=A0=A0=A0=A0 bool over8; >>> =A0=A0=A0=A0=A0 unsigned long flags; - unsigned long flags; >>> =A0 - spin_lock_irqsave(&port->lock, flags); >>> =A0=A0=A0=A0=A0 stm32_clr_bits(port, ofs->cr1, BIT(cfg->uart_enable_bit= )); >>> =A0=A0=A0=A0=A0=A0 port->rs485 =3D *rs485conf; >>> @@ -147,7 +146,6 @@ static int stm32_config_rs485(struct uart_port = >>> *port, >>> =A0=A0=A0=A0=A0 } >>> =A0=A0=A0=A0=A0=A0 stm32_set_bits(port, ofs->cr1, BIT(cfg->uart_enable_= bit)); >>> -=A0=A0=A0 spin_unlock_irqrestore(&port->lock, flags); >>> =A0=A0=A0=A0=A0=A0 return 0; >>> =A0 }