From patchwork Sun Sep 12 03:15:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1526817 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=Zu8Aw+i1; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 4H6ZWc2PVWz9sVw for ; Sun, 12 Sep 2021 13:16:12 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5A6A4838DE; Sun, 12 Sep 2021 05:15:49 +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="Zu8Aw+i1"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CD1FB838D7; Sun, 12 Sep 2021 05:15:37 +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-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) (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 18E81838D7 for ; Sun, 12 Sep 2021 05:15:33 +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-pg1-x534.google.com with SMTP id h3so5907775pgb.7 for ; Sat, 11 Sep 2021 20:15:33 -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=SAYPew3ncfgitBKgrGDNuQfYoqB7aJjxmhSP+ikJU/U=; b=Zu8Aw+i1ue5Ygr+KneseuLUup+YetgE6TZCHDV/kP+IC/1d82OJlQxZVadlH0Sk+Kt aOozYSma8brnh9NA51sPpCuSs/6mYklnB80ZOBd58vdbZ9K7fv6kuiKQzrEn1y3Kl49D g30W0eDvZu60g9hFuVik6uHLYH1wUQYOY0CdmaQwYgV1C8chrzugZFfhPsxIYXNIZs9C 4HR9lpqcgm5rHGhDd59bGnUS3nOmhvFUZ4A7pciYDaXxh4x/noDHUIZ+fT6xVt/BYfkz 5HtfIVUXRCrd/GQLKFMS3KCOS/qfnMNcike2yu9aKaaPeFxFbDOzAcoBn2mT1vfSZSja 1gpw== 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=SAYPew3ncfgitBKgrGDNuQfYoqB7aJjxmhSP+ikJU/U=; b=pEMLS3abH26AT41Og39MHFbKAY3sCFaC5guFL41y30HtsKl1neZUiBLaiHDlOforQP gmzhhmkIy+iXJnyYLyP+v8J7pyaqmgV+xTZYW98BdEYsgqQDsVTK9swX/UKzpfdqA/wz hSo2xCzT9BrF97ejVLngIH1o0KBzXzT1zEe0aNHmdxrsmfy1WNuH49FbMeCdLqKdRoTq Y5dRP0pTiE8SWpNhKm/ibGT7z9fLLKMTyM4jvo4NwySGQE7WXTyB+JOym8BFuI8Q18m5 q5gbGG7TaWkgVxbQeFRTwiNQJUR1gHTKrkwses5QOByRJYwRmQNhnjZsSNp5gjbhJmtz 15Fg== X-Gm-Message-State: AOAM533U0lwd/c/2bD0hiCyENdEDS2wp4fyG1cDSkN6iMRGpYv7w2CCf HHX0BYLLTsF+y38bHOaRSz3mn9Afy/Q= X-Google-Smtp-Source: ABdhPJy8n8guRDXJuuy/Ru+nNHzJg0fHBAE8zcVXRoxZyvDNL4OslIqnF6In1HnB5RTfPKUakDezCA== X-Received: by 2002:a63:9546:: with SMTP id t6mr4960588pgn.260.1631416531483; Sat, 11 Sep 2021 20:15:31 -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.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Sep 2021 20:15:31 -0700 (PDT) From: Bin Meng To: Simon Glass , Rick Chen , Leo Yu-Chi Liang , u-boot@lists.denx.de Subject: [PATCH 4/9] i2c: ocores: Fix -Wint-to-pointer-cast warning Date: Sun, 12 Sep 2021 11:15:11 +0800 Message-Id: <20210912031516.24885-4-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 ocores_i2c.c in a 32-bit build: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] Change to use dev_read_addr_ptr(). Signed-off-by: Bin Meng Reviewed-by: Leo Yu-Chi Liang --- drivers/i2c/ocores_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/ocores_i2c.c b/drivers/i2c/ocores_i2c.c index f129ec3818..3b19ba78fa 100644 --- a/drivers/i2c/ocores_i2c.c +++ b/drivers/i2c/ocores_i2c.c @@ -516,7 +516,7 @@ static int ocores_i2c_probe(struct udevice *dev) u32 clock_frequency_khz; int ret; - bus->base = (void __iomem *)devfdt_get_addr(dev); + bus->base = dev_read_addr_ptr(dev); if (dev_read_u32(dev, "reg-shift", &bus->reg_shift)) { /* no 'reg-shift', check for deprecated 'regstep' */