From patchwork Sun Sep 12 03:15:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1526822 X-Patchwork-Delegate: uboot@andestech.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=doZ/GvnT; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H6ZXd3kkZz9sVw for ; Sun, 12 Sep 2021 13:17:05 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D687D83904; Sun, 12 Sep 2021 05:16:09 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="doZ/GvnT"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 26B37838D7; Sun, 12 Sep 2021 05:15:49 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8C452838E3 for ; Sun, 12 Sep 2021 05:15:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=bmeng.cn@gmail.com Received: by mail-pf1-x436.google.com with SMTP id x7so5569637pfa.8 for ; Sat, 11 Sep 2021 20:15:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=MwuOPuKJIbXUd1Wt1KvEh/e3SlA5R0QJ0kJN0rPGx2s=; b=doZ/GvnT4eeACu8y/CbR42aL94Aa0uNuhluMfpp5Rchri6K/pk7mZe65c/PKp1r164 pjq5scNqLXH4daR9SH3HcNvN18ZFYTMd0XZ3BTgEnsN5Tn0J6RAV/VflzZUiq1sZRudo RFUSKAXyVbaCMQ2NWSlAl+q0LrIKeDH8fZue1I88G4D/5i4kggSc8o04TmgRkf/4oBu2 6j7kyKFUikZbnp6oN5b6cOokPzuIy9YcuCPAXl2ycsiVMBUHC1yW9woQDeAZW8U40AqG 8e7FR1XbtddHvFOt6egfYAHabm9YR8SU1SR0FYuQnumDNjWkGH9fAH5G3y3bLMnWTZCq XomA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MwuOPuKJIbXUd1Wt1KvEh/e3SlA5R0QJ0kJN0rPGx2s=; b=DdyHO4jIBi+zqtpeei2XjK3SqN2kfSkaz9xlU7J0Sz3P2pFW2k4YnfNRODgrhXTHv3 YrXvW3Kb6LUXcjGgYFlTrXQ3X6KBFvRvdI7smj4XnOAw2Y5GI1dT18bCkDc31FYLlZJt uEui1dKCzWyVSHzDEljE5NNiso67dlVK7cNb+LSAph9FMLWBQ5zWk0z1jLaka3K+bT7g 1pAlccJ+G420t+V+ByBeuoWsDr9+t+kBtMEGsn/lRnBB3xIOzoqe16t2IA+XOrcBXbTn fu8X2/dSPWxsERMmuhzYoDi9bMqFfdNEQmGcSHPjfKyoQZ+CAoyReY025E+crqFhP76L NtDw== X-Gm-Message-State: AOAM532NgyFeUyoJGPx6E7dua9ykaGX5h+VjXKhWKgbniKCIEYMlNM7m G0kvtIsV7dgpgHRWQlNm+TM= X-Google-Smtp-Source: ABdhPJxunw9n76xj5PUBVNm8ZBOwBIJGpIOA2ucZuLq8EVg41/zMHvr9k5lpcUxb6LWKtYLK4vDByA== X-Received: by 2002:aa7:9243:0:b0:415:7304:7a8 with SMTP id 3-20020aa79243000000b00415730407a8mr4836277pfp.29.1631416543036; Sat, 11 Sep 2021 20:15:43 -0700 (PDT) Received: from i9-aorus-gtx1080.localdomain (144.168.56.201.16clouds.com. [144.168.56.201]) by smtp.gmail.com with ESMTPSA id z9sm2924300pfa.2.2021.09.11.20.15.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Sep 2021 20:15:42 -0700 (PDT) From: Bin Meng To: Simon Glass , Rick Chen , Leo Yu-Chi Liang , u-boot@lists.denx.de Subject: [PATCH 9/9] board: sifive: Fix -Wint-to-pointer-cast warning Date: Sun, 12 Sep 2021 11:15:16 +0800 Message-Id: <20210912031516.24885-9-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210912031516.24885-1-bmeng.cn@gmail.com> References: <20210912031516.24885-1-bmeng.cn@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean The following warning is seen in unleashed.c in a 32-bit build: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] Cast with uintptr_t. Signed-off-by: Bin Meng Reviewed-by: Leo Yu-Chi Liang --- board/sifive/unleashed/unleashed.c | 2 +- board/sifive/unmatched/unmatched.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/board/sifive/unleashed/unleashed.c b/board/sifive/unleashed/unleashed.c index 33baeda986..e7d2332d8c 100644 --- a/board/sifive/unleashed/unleashed.c +++ b/board/sifive/unleashed/unleashed.c @@ -118,7 +118,7 @@ void *board_fdt_blob_setup(void) { if (IS_ENABLED(CONFIG_OF_SEPARATE)) { if (gd->arch.firmware_fdt_addr) - return (ulong *)gd->arch.firmware_fdt_addr; + return (ulong *)(uintptr_t)gd->arch.firmware_fdt_addr; } return (ulong *)&_end; diff --git a/board/sifive/unmatched/unmatched.c b/board/sifive/unmatched/unmatched.c index 8773b660fa..93c452c57f 100644 --- a/board/sifive/unmatched/unmatched.c +++ b/board/sifive/unmatched/unmatched.c @@ -15,7 +15,7 @@ void *board_fdt_blob_setup(void) { if (IS_ENABLED(CONFIG_OF_SEPARATE)) { if (gd->arch.firmware_fdt_addr) - return (ulong *)gd->arch.firmware_fdt_addr; + return (ulong *)(uintptr_t)gd->arch.firmware_fdt_addr; } return (ulong *)&_end;