From patchwork Tue Oct 2 21:07:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 148021 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp5637308lji; Tue, 2 Oct 2018 14:08:37 -0700 (PDT) X-Google-Smtp-Source: ACcGV61OZzIotBQxJsRdULq+39KLNMKRIxuPWoLFdEpqAPtihyUMwWlJ74RT13bIOYvNa5cc3n5E X-Received: by 2002:a62:ce83:: with SMTP id y125-v6mr17999276pfg.201.1538514516884; Tue, 02 Oct 2018 14:08:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538514516; cv=none; d=google.com; s=arc-20160816; b=tSaG7rKf0QZX0jk9pB0UBk8/uLOxIGdHHCknDL6elSp46QMrw48DAphUwth2RPY8Ru 2gBTyaHNs8K9ITXySfoXXnKwYtAgbtxkCkU86+uyFZLnSNhW3b9nZeg21Ndng45ZgEKu FilZi58Hlhm1O8+/40vAV3ClNKGwYAjEzpfgSEslsXAGVAQkgci/SCahEKzgXMS6D3o0 W1hCEnDYC5aYEnPfON9n7EM1qF4lxEjuun6zNXacBEtmKkxPHwoafT3N4p8ALDhqpvrl AnRTHa50c5yvyJiw2C0PwxJfyB1oUhxv8qybU/LH8nnhqYzw7fmV7rcXRIXIvPEzhjIS bncg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=DGh72eUTzslkxOEpkmeu02hQQkehS/6sEGytM0SgU2Q=; b=byia10oGeNaCmimz/zD0FAS615WZJWJu5pTLlheD46NGJVUxeSYX4uEYVq6M36x8WZ 3kELrX+XnbVoPRCFCd8ILyN09bJnVXeEXhDfFRQwEAmBWQochOxTiv750qQw5ybjlxPs +rjj3SgSVr5/NpPlvuwoXhwf678hXJQWBORAS5K5VI1yMuLan+w51v12AYIuZ5nZ0PI8 SqD3viPax0Pk+PGogagujmWyuvaHkAFZoPkCrKSm6oKdkmXkxlb8netsn7LKEE/Z/K7w ySyAEl6xktIxpYKQBXcmBdYHTyh1sqXBC6jbgIfxvw3NrJEl/DSkmrzoXhpV1TPTRDbY URGQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b35-v6si15748406pgl.235.2018.10.02.14.08.36; Tue, 02 Oct 2018 14:08:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728207AbeJCDxv (ORCPT + 32 others); Tue, 2 Oct 2018 23:53:51 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:46133 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727747AbeJCDxu (ORCPT ); Tue, 2 Oct 2018 23:53:50 -0400 Received: from wuerfel.lan ([109.193.40.16]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.129]) with ESMTPA (Nemesis) id 1MwQGj-1fqSx43NAL-00sQUa; Tue, 02 Oct 2018 23:08:27 +0200 Received: from wuerfel.lan ([109.193.40.16]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.129]) with ESMTPA (Nemesis) id 1MwQGj-1fqSx43NAL-00sQUa; Tue, 02 Oct 2018 23:08:27 +0200 From: Arnd Bergmann To: Mark Brown , Lee Jones Cc: Arnd Bergmann , Matti Vaittinen , Enric Balletbo i Serra , linux-kernel@vger.kernel.org Subject: [PATCH] regulator/mfd: fix pointer-to-int cast Date: Tue, 2 Oct 2018 23:07:32 +0200 Message-Id: <20181002210826.2588925-1-arnd@arndb.de> X-Mailer: git-send-email 2.18.0 X-Provags-ID: V03:K1:PK2j7E7n3iaOdwyXdtRoAWf7NIyf47EuZ6J4mDEKiMRzoSdpZi4 Ai0gM6Lyc8AEE0qn1a7uONIoQEiohKtrzt5IeSuS1LfBiHNVdGwkE5vg2biYjru+gVct/Bl L1YEIaQBbCCDvaRf/RQbr/nsyOk6c8aZcTbdzqOQs+GCuTc0y85DK41uavG1QLsr6swKAiW Vfrodo92llGFYhyB0gXDw== X-UI-Out-Filterresults: notjunk:1; V01:K0:12mV71LxHX0=:OEgRrM/pkIdGmXEWJxILml SHItNEzAXHT8wMD25WCCo8XVQAt4K53cmggrLHz/GK4CVRsglc1fbq77ky9dM5O2lqeFpCJOj /+6xyLh9tTczoPv5afxJJNhLplaX2PkqWcWhZpqQoFmzcbScjdESp3IowWT9FJxYNF11Fs0vA owBgnoyjK+eRzslab9dWyK3TbSCC3Hn2E0qIxGF4GMNhISp/Crjs0jaDn4tGCy94Tw/Nr8PAY ec2DBFBeClVKnHhFPXJ9f/MFDsqDK8jrlNpmtO27ByvuVud/KZTjvEMNkPDRTRhJty60nNqY/ KO/uQ32+Hq4nP+ytOdg9l5JSEmqtyRHX8+rnsrolpgbc48WG1wnaFXRgqgXSTpq/fxsp4YQGF aUaVdTkuG/Kwem94wbPQ7ldAwZjMTE5w39z/RKNx1liAO8rUgQ53KxWqW8Lo7kmQyh6t21QxE YpraUThF1BiUKm/76GErwro2uxkiWladEAf4XnKkwLU7A/tLcDKW4eNi9mjpCHiiF8RgR6doi yJ4L2rpFnQNTa+AmbcNRDwoDxZsaeG+7hD4WRRZruGnkiD3lQiqrfj7wtC2s3TY90xQ7LLNxH /Ngi2acQNA5/HxK4NQS0oPuD29mfU4JYVALzjEvAFwqOzwfQ58dK4ozAn0PVtmwOVTudEuWUr T551RR/f09JxJRmnkB5AT7ALB9PD09wt6cKvR2XrCanfLjZa2njnyl4TjlE1CUMis7os= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org gcc points out that a pointer is longer than an int on 64-bit architectures, and that casting between the two may be dangerous: drivers/mfd/rohm-bd718x7.c: In function 'bd718xx_i2c_probe': drivers/mfd/rohm-bd718x7.c:101:23: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] In this driver it is correct, we just need the right kind of cast to avoid the warning. Fixes: 494edd266b94 ("regulator/mfd: Support ROHM BD71847 power management IC") Signed-off-by: Arnd Bergmann --- drivers/mfd/rohm-bd718x7.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.18.0 diff --git a/drivers/mfd/rohm-bd718x7.c b/drivers/mfd/rohm-bd718x7.c index 161c8aac6d86..e66d59190a82 100644 --- a/drivers/mfd/rohm-bd718x7.c +++ b/drivers/mfd/rohm-bd718x7.c @@ -98,7 +98,7 @@ static int bd718xx_i2c_probe(struct i2c_client *i2c, return -ENOMEM; bd718xx->chip_irq = i2c->irq; - bd718xx->chip_type = (unsigned int) + bd718xx->chip_type = (uintptr_t) of_device_get_match_data(&i2c->dev); bd718xx->dev = &i2c->dev; dev_set_drvdata(&i2c->dev, bd718xx);