From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 481EDC43215 for ; Thu, 14 Nov 2019 05:15:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2A916206EC for ; Thu, 14 Nov 2019 05:15:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573708529; bh=WigUSF3alcgcj3pSwFXkYJTAsdWSBKH1LxuGN0UIWDw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=eAQblnLU/s7cnztOvDe0XPtZGaR6mCw52baTW5O6P8ueEDDbY7Jv/R6vVup980LPL AGkzz14Zda4dv+4lz38wKbh1yz9g3rVoPjqRUcwn8aaGcyK/ZaPN3LmBxqMMp5sLz6 C18bfqF0BLvYEWdNKSIbXtX6++7EEFEU7kqn2XPI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726628AbfKNFP2 (ORCPT ); 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-Google-Smtp-Source: APXvYqwlPTIblvxl8u3zUhl8hD3W9ECXciROrFiU7RcbJjYQxah0YbroDoQ4zkxAaXhihEABx4qt8MPf48+py6OCV2g= 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. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6BB99C432C3 for ; Thu, 14 Nov 2019 05:17:28 +0000 (UTC) Received: from lists.ozlabs.org (lists.auug.org.au [203.11.71.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 31247206EC for ; Thu, 14 Nov 2019 05:17:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="hfgI9clc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 31247206EC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 47D8qp0pvZzF5jJ for ; Thu, 14 Nov 2019 16:17:26 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=198.145.29.99; helo=mail.kernel.org; envelope-from=timur@kernel.org; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="hfgI9clc"; dkim-atps=neutral Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 47D8nZ1qjMzF3ZH for ; Thu, 14 Nov 2019 16:15:30 +1100 (AEDT) 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 86893206EF for ; 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 d3so1845703qvs.11 for ; Wed, 13 Nov 2019 21:15:27 -0800 (PST) X-Gm-Message-State: APjAAAXQLgggOWBxVh1uAX+GN0nLhDTrnt/paXPY+yzoLy+K4KX6Xd6M /Fhj8mZr+6OoGVdgsxMjaPDg0Gxb7d0ot5yChY8= X-Google-Smtp-Source: APXvYqwlPTIblvxl8u3zUhl8hD3W9ECXciROrFiU7RcbJjYQxah0YbroDoQ4zkxAaXhihEABx4qt8MPf48+py6OCV2g= 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 Content-Type: text/plain; charset="UTF-8" X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lkml , Li Yang , Scott Wood , linux-serial@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel , Qiang Zhao Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84678C432C3 for ; Thu, 14 Nov 2019 05:19:34 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 636E020659 for ; Thu, 14 Nov 2019 05:19:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="tvDvKbkP"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="hfgI9clc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 636E020659 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QcKRwjOyQdGBI0CWBCIBR1YsvRZ/4tF+VSUCkhmysG0=; b=tvDvKbkPTfba1R EcBGTnmTCTO9KuKB/6VH+7op/CMbjnkE6jlug0seUnOCewsAky+a7MPP+VUIIX000kLX5Dv9ptJcS CchgSWDR0EfiRgbVsaEwZtxwaZCbdkyM/elo56zD2taacjrvgeYjWIVA7RX9ouc1t4CP9CrZHgFp8 n/SXtQ52WaGZwIEYSXywMxD96iy/nis/CTMbnfQuMKT6N8KaUgJf7PKo6M2XWLBDMPSh3vyiNjy1z OP9qZPB/qPEHNhE8X9HvcwsjZoyxk5ZeewzS/sylW0F45f6jicVCeA94WpLUdLTmPCpL47bEmO42m EoypXXQLYrvGmZ7+6S+Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iV7XZ-00059s-58; Thu, 14 Nov 2019 05:19:33 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iV7Tc-0000k1-DU for linux-arm-kernel@lists.infradead.org; Thu, 14 Nov 2019 05:15:29 +0000 Received: from mail-qv1-f43.google.com (mail-qv1-f43.google.com [209.85.219.43]) (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 8C250206F0 for ; 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-f43.google.com with SMTP id v16so1854391qvq.6 for ; Wed, 13 Nov 2019 21:15:27 -0800 (PST) X-Gm-Message-State: APjAAAU5Ige3RMYKmp8BaYK86l5F3OEuheAg8gXvQUJCzTlpLK+4IVet LSw7RSfLPGN2gMDqxpLEtHT0/55OaJ74UvzxFec= X-Google-Smtp-Source: APXvYqwlPTIblvxl8u3zUhl8hD3W9ECXciROrFiU7RcbJjYQxah0YbroDoQ4zkxAaXhihEABx4qt8MPf48+py6OCV2g= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191113_211528_586785_6A47D162 X-CRM114-Status: GOOD ( 10.00 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Christophe Leroy , lkml , Li Yang , Scott Wood , linux-serial@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel , Qiang Zhao Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.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. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel