From patchwork Thu Jul 5 13:51:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Guenter Roeck X-Patchwork-Id: 10509333 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F197E60116 for ; Thu, 5 Jul 2018 13:53:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E025528CC8 for ; Thu, 5 Jul 2018 13:53:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D445428D9D; Thu, 5 Jul 2018 13:53:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, RCVD_IN_SBL, T_DKIM_INVALID, URIBL_SBL autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4A4F228CC8 for ; Thu, 5 Jul 2018 13:53:21 +0000 (UTC) Received: from localhost ([::1]:52932 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fb4hE-0000Q6-49 for patchwork-qemu-devel@patchwork.kernel.org; Thu, 05 Jul 2018 09:53:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52412) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fb4fh-0007Z7-JI for qemu-devel@nongnu.org; Thu, 05 Jul 2018 09:51:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fb4fg-0002Un-Mr for qemu-devel@nongnu.org; Thu, 05 Jul 2018 09:51:45 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:41216) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fb4fc-0001UX-8m; Thu, 05 Jul 2018 09:51:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=roeck-us.net; s=default; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=iiXKRXOknraFVNo3vRRa6geItCC64/fO0Q5OQeenUhI=; b=ovmquSoJusJSKfWLShG/G0NIcp OnuAfEJovqoBM9jga4FL9VvUlZg3vpxWP1LPGsZ2TiUNC+5GRPd2n7PM1MSQvX6oZCLpYwKiO3fSa M2xU2vIZSjMaUzJnp4KnEtZ6K8zCsP907wjIYxXnHwMsRT9VCLSgQbK8Ts1uIYE8WM043laW1YnGy gezAImTkCWjsZTFLzaY6t5uIYqmhiKu4bCgz8REl2MC8u8mK7BpiPJY280FDoGCYqx0/KICgasBeY KxgqObjGkoZNhOkon1PBCARsk/JpNjsQW/H7/KdDGbTkGcLz4/x7x8vTfdKO7ie3Zh4mmbmCKQDNf XPf1VrmA==; Received: from 108-223-40-66.lightspeed.sntcca.sbcglobal.net ([108.223.40.66]:58370 helo=localhost) by bh-25.webhostbox.net with esmtpa (Exim 4.89) (envelope-from ) id 1fb4fO-00Eicu-OR; Thu, 05 Jul 2018 13:51:27 +0000 From: Guenter Roeck To: David Gibson Date: Thu, 5 Jul 2018 06:51:24 -0700 Message-Id: <1530798684-23009-1-git-send-email-linux@roeck-us.net> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Authenticated_sender: guenter@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - nongnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: guenter@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: guenter@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 208.91.199.152 Subject: [Qemu-devel] [PATCH] sam460ex: Add comment explaining ignored errors from fdt operations X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexander Graf , qemu-devel@nongnu.org, =?UTF-8?q?Pilippe=20Mathieu-Daud=C3=A9?= , qemu-ppc@nongnu.org, Paolo Bonzini , Guenter Roeck Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Failing to set serial port clock frequencies is not fatal. Add a comment into the code explaining this, and typecast the function to void to silence static analyzers. Cc: BALATON Zoltan Cc: Pilippe Mathieu-Daudé Cc: Paolo Bonzini Signed-off-by: Guenter Roeck --- hw/ppc/sam460ex.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c index 7eed2ec..b004cda 100644 --- a/hw/ppc/sam460ex.c +++ b/hw/ppc/sam460ex.c @@ -324,7 +324,10 @@ static int sam460ex_load_device_tree(hwaddr addr, /* set serial port clocks */ offset = fdt_node_offset_by_compatible(fdt, -1, "ns16550"); while (offset >= 0) { - fdt_setprop_cell(fdt, offset, "clock-frequency", UART_FREQ); + /* Failure to set serial port clocks is not fatal, so just ignore + * errors when trying to do so. + */ + (void)fdt_setprop_cell(fdt, offset, "clock-frequency", UART_FREQ); offset = fdt_node_offset_by_compatible(fdt, offset, "ns16550"); }