Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp297340pxa; Fri, 14 Aug 2020 04:42:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFq4f4+GcNtjEtpBU8CvnNnKp/44BZtf9KvH/NAbHDfiLNbw24mpyh3owHYIzASoe1zNxM X-Received: by 2002:a17:906:9984:: with SMTP id af4mr2089805ejc.90.1597405360556; Fri, 14 Aug 2020 04:42:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597405360; cv=none; d=google.com; s=arc-20160816; b=DVFFzXZh/YsX6k9G9ID/kMO1MBcYxL+fCBuu4IXdD503tovHQmIrEp2bCu9WNsOMVf v+D+ElyGTiKFvOfDR1kQ6Bzj3oVyQ8dpzWuMDoRrIczcXGV/0q6ZgoLJrXIlSqSWREBh Iq3QcTu8PjwX4MC7AGMtM8wHNy+nBm1CeVjM8o6Db126ZdvmLPvXNtgFQk69kNjy2JhS K0uSqh3pPPDmMo7aVqdjr2J5yDUc2zz/6Gb4RKmqofXZyxku1sSKG4vHenbhREoawL2S 1AQ1QK70/blRaxTNUlwGi6s37zy/vAzhn3A8tKWD9Dvoa0ei6fNYN9PThQoIaGVqen8c 2VXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=fXOinOaTouuyiTu5KQ5LuIo8RHDIe9EoPbZlWHPA1JU=; b=PpH2lUZZBCE6xxk5mnTFhRiXQ5JTaAtEcTqzVzy/pUMcuPu3iOUwNCjizRBCDPTryd iuhixqwlhifKXq54YchhfuIDsswTQ4SV4ja6M9H5L3soAhX90pqHH5YlmihoHnsCki3W Hgx+oL6GIC1taPlT7jpYetL5jN+wDJMDsIDyUbAz+7UnrrRR6OUOJ9aOJxgAAfommdk2 tRyivdfJex+ygcVwurp8R3SQEclSE+3PWKQqrIDpeKxG0MyaPAu1UcLiqCd+81JbmGQ6 BTrL5jx21EgI6xWXvL+Q6ZHdnOImyhEx+lUN8S/Xyf0mTmSXsv6KAKAV3V4h3jupi3ZS 9HAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rlhTnBiZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b1si5408382ejb.739.2020.08.14.04.42.17; Fri, 14 Aug 2020 04:42:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rlhTnBiZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727987AbgHNL3o (ORCPT + 99 others); Fri, 14 Aug 2020 07:29:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726647AbgHNL3n (ORCPT ); Fri, 14 Aug 2020 07:29:43 -0400 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD329C061384; Fri, 14 Aug 2020 04:29:43 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id d22so4429329pfn.5; Fri, 14 Aug 2020 04:29:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=fXOinOaTouuyiTu5KQ5LuIo8RHDIe9EoPbZlWHPA1JU=; b=rlhTnBiZ8K2eBbck5IB3aNnAR5FTPR0KAiW+6tR9Im9zHxo+6GlmB5fjSp1V7+Pj6S J2osKBlMlu44c79JAYMheyH+o5Go2q8xjFrEqgapm23dQeIXe/r6mdnCW3fC/1A68gnA Dq9dQTs5mfjueofG2+JZasPg70UY2SjR4AB0KMsVs30CWyNs949vyllcQIxGAcZwZzJ1 ndvJHpSgCy7hZZSvfLeivmCyu5h57E+MoCEoSGoUo+J2FRJtfzbPQkUXEvHApMVgEOV2 /FpKhhLFLNYK/VBiQx08st4iBlciCwlZFPj1hMU+S4laOVufJMNzljOoiya84WKyjVOQ gTpA== 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; bh=fXOinOaTouuyiTu5KQ5LuIo8RHDIe9EoPbZlWHPA1JU=; b=Vokh9IR6eF+gmngYfrHabczKy6n7qI9Md0waR0WaqJKeaqRRpHLPgqcWHDv9jA478E uOc4EM7ZF0HqbIVaHu1DND0pTwHL9Z7VoGO7LOiIO0M8zGn6GLsWYIB6qqkw7x9pFTNw XObX6kadedGJNpBdaykKV3aakFGrPkEK9EWK8AB6Aoenb6AunXQiMvhPlKkwUg3PwabY lKOIxbPqwFjePzSONYT+IjUfcVhVfQjqV0JsKeFcfDHCTEdXdkM8+ZGo85tzJD/SkQG7 ILaOnCV2Ez0Py2/L9e/YutWyRsHOS1ZY8ghF01TJUGN2a4gxNEAac405Jh80EnVb+3Qi d+Vw== X-Gm-Message-State: AOAM533FKs/VZoTpgD0GEMa/N91ACVIiJRi92uoD1Yw63wDlmK8sa72o JPNFvfXq3jpPVduEG4dvNQ0= X-Received: by 2002:a63:1a51:: with SMTP id a17mr1409425pgm.309.1597404583242; Fri, 14 Aug 2020 04:29:43 -0700 (PDT) Received: from localhost ([2409:10:2e40:5100:6e29:95ff:fe2d:8f34]) by smtp.gmail.com with ESMTPSA id o192sm9642743pfg.81.2020.08.14.04.29.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Aug 2020 04:29:42 -0700 (PDT) Date: Fri, 14 Aug 2020 20:29:40 +0900 From: Sergey Senozhatsky To: Andy Shevchenko Cc: Sergey Senozhatsky , Greg KH , Guenter Roeck , Tony Lindgren , Kurt Kanzenbach , Raul Rangel , Petr Mladek , Steven Rostedt , John Ogness , linux-kernel , linux-serial@vger.kernel.org Subject: Re: [PATCH] uart:8250: change lock order in serial8250_do_startup() Message-ID: <20200814112940.GB582@jagdpanzerIV.localdomain> References: <20200814013802.357412-1-sergey.senozhatsky@gmail.com> <20200814095928.GK1891694@smile.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200814095928.GK1891694@smile.fi.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (20/08/14 12:59), Andy Shevchenko wrote: > > --- > > drivers/tty/serial/8250/8250_port.c | 11 +++++++---- > > 1 file changed, 7 insertions(+), 4 deletions(-) > > > > diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c > > index 09475695effd..67f1a4f31093 100644 > > --- a/drivers/tty/serial/8250/8250_port.c > > +++ b/drivers/tty/serial/8250/8250_port.c > > @@ -2275,6 +2275,11 @@ int serial8250_do_startup(struct uart_port *port) > > > > if (port->irq && !(up->port.flags & UPF_NO_THRE_TEST)) { > > unsigned char iir1; > > > + bool irq_shared = up->port.irqflags & IRQF_SHARED; > > I'm wondering why we need a temporary variable? This flag is not supposed to be > changed in between, can we leave original conditionals? No particular reason. We can keep the original (long) ones, I guess. > Nevertheless I noticed an inconsistency of the dereference of the flags which > seems to be brough by dfe42443ea1d ("serial: reduce number of indirections in > 8250 code"). > > I think we can stick with newer: > > if (port->irqflags & IRQF_SHARED) I'll take a look. -ss