Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2752062ybc; Wed, 13 Nov 2019 21:19:11 -0800 (PST) X-Google-Smtp-Source: APXvYqyaWhGkvfqSU/L/QordeVErFWqlswyzSU4K1UCr40DROwOriCWW2wfFdEs/N93Wt0MKGlKm X-Received: by 2002:a50:9908:: with SMTP id k8mr7708331edb.75.1573708751174; Wed, 13 Nov 2019 21:19:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573708751; cv=none; d=google.com; s=arc-20160816; b=U3c9xXDmkpkcxUlS2RMf9cIIk+AiMjAm7f0oRwY6OXFShVqU0u9JgqcKAfwL7p8tAb lVh8l9KMjnWNZI2BlnrPoqoMO3lXtFslxc/xynG6g0h+HaeYHfkkGuroPhOF4Q1GAoFM Ti3GFwwVC7BPmZxp4NA2vtPTQnOUnCcF9Oo6KW2XrhAKIDV5gNScSPloKGCqsiJYrnRg kj4S+JOOXqKk52mIUIGdtWBu6At/NQJmR3LMXXkDcIt0S3gK3//5TM/CjXj/bReMppii CUXgcMjG/330Mvtd65vzoiWsYUaXUYNjC+wt/vcv/8nxgEpNf+In5e+a6TvkJOnLHAP9 ZClA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=uWu+xaKjik11YcWYzkakMAD2E5iHnrwgz16W0m7+UFg=; b=xRR9YV8WRCNmaM99hk+dfqT0S66OgJYmonTJ1m2cZ3m4ZCpfVRfXpGChk7Twr6oCks HA5O3aOQnxKHhZf9iNQJyuNPdWLAzZWdZiKRUDEdcHuGF8xND/pFJziWAwk2PCMq2Qnd po4oy4Z7UK92Sjja6XolAyokx9ORQ5wRXCq/WlgWsNqVNShdzyS+Td8vLSuB+N6wbVD+ l+VIQunobLepOIXYyw28XnonkavMoJq0QrR6H65wbrcwuixMCq4+qyB07BKEKTUI6x0n Z8i3UP4mvujs3V/e/I1fAPhMg9ixIuvNrnb3t6TbfU11tN/ljMHEqz1GyTbpSHLlkaXU sGkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hfgI9clc; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p6si1064157eds.70.2019.11.13.21.18.47; Wed, 13 Nov 2019 21:19:11 -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=@kernel.org header.s=default header.b=hfgI9clc; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726541AbfKNFP2 (ORCPT + 99 others); Thu, 14 Nov 2019 00:15:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:46968 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726002AbfKNFP2 (ORCPT ); Thu, 14 Nov 2019 00:15:28 -0500 Received: from mail-qv1-f51.google.com (mail-qv1-f51.google.com [209.85.219.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8F0EA20706; Thu, 14 Nov 2019 05:15:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573708527; bh=WigUSF3alcgcj3pSwFXkYJTAsdWSBKH1LxuGN0UIWDw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=hfgI9clc/bfFjOJFNB8C3UnyfZXN9St0vvpgPg/LyZdPTevrQKGiWvHgi+DnGBZaa ZYT84kVbh/eZSglzPmBmRMhXVUUXNHrsxH0co3c4tcKweJVZbfuqDHUDvczV5IEAu5 OX7MG6Aqd2BpTIhh+V2DBODnIkR0Uwxqxi+myWC4= Received: by mail-qv1-f51.google.com with SMTP id g18so1849816qvp.8; Wed, 13 Nov 2019 21:15:27 -0800 (PST) X-Gm-Message-State: APjAAAXIWE/+YLTIwHJLQNqhGN9VtiMgJPwuIfVya+uMqa4SeW1seBw/ OxkACUTqiFG53GEZ0O7Vc0cbWw/jjmLPqWG8Pvs= X-Received: by 2002:ad4:462d:: with SMTP id x13mr6475849qvv.105.1573708526559; Wed, 13 Nov 2019 21:15:26 -0800 (PST) MIME-Version: 1.0 References: <20191108130123.6839-1-linux@rasmusvillemoes.dk> <20191108130123.6839-31-linux@rasmusvillemoes.dk> In-Reply-To: <20191108130123.6839-31-linux@rasmusvillemoes.dk> From: Timur Tabi Date: Wed, 13 Nov 2019 23:14:49 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 30/47] serial: ucc_uart: factor out soft_uart initialization To: Rasmus Villemoes Cc: Qiang Zhao , Li Yang , Christophe Leroy , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel , lkml , Scott Wood , linux-serial@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 8, 2019 at 7:03 AM Rasmus Villemoes wrote: > > - /* > - * Determine if we need Soft-UART mode > - */ > if (of_find_property(np, "soft-uart", NULL)) { > dev_dbg(&ofdev->dev, "using Soft-UART mode\n"); > soft_uart = 1; > + } else { > + return 0; > } How about: if (!of_find_property(np, "soft-uart", NULL)) return 0; And I think you should be able to get rid of the "soft_uart" variable.