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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 A55B5C433EF for ; Sun, 12 Sep 2021 03:16:10 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A9707611BF for ; Sun, 12 Sep 2021 03:16:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A9707611BF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de 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) 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 Content-Transfer-Encoding: 8bit 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 --- 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' */ -- 2.25.1