From patchwork Fri Dec 1 05:16:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 120305 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp697743qgn; Thu, 30 Nov 2017 21:17:04 -0800 (PST) X-Google-Smtp-Source: AGs4zMZp85RyR7h8kSAhDxJrG/q/RqdVtqeGl7ZoEBR5zMoIBZS3tkL8+xDBxO3URxYaBS8z615e X-Received: by 10.99.172.25 with SMTP id v25mr4578375pge.182.1512105424148; Thu, 30 Nov 2017 21:17:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512105424; cv=none; d=google.com; s=arc-20160816; b=t2eijTc02216kUw6oDBw4cpPRExPd4K0veXECebN3ETrYG8aqsgJznxLIGaf7P8slQ IZPZO23lEa6UnNoVk0ncfL0zIzWtCtG/OKKu7avaO/IvBU7yyPxEuAgvSf16ERgD1GPx GDvLFhezZX4pL6VemqdF7Ur5JbO3AqXr9Y60HONXJUzHcR/AlnPyl8XrkW/Ce/FzjTEf mgF7NMcmDtal597K7SAQk8UdF8re6NQ3V47KWttly+UYaDMFhuOQ9Klf/iLJE6Scr23c mJHbW1u5LuH4xum3PM2sd46zBWcz8GWyBPOdVr5pTgopSw1ECs4o1SAoX83/C9rGktxT lVWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:arc-authentication-results; bh=Ww88ARfkKY14FFZW+f+woDRUA7RYHtq1XmnKgnovmd4=; b=PXc07kw/B7vWT9fL51s1hvpvfp5LrBrZC/jjq0kdHO8ex5FszpJo5rYm7B6a4y6Qi0 DUZVxHUK1xt84K9dgyRkj9eqH/eIzVl6AJAXJhRYU5/5JcJxLySLt9gShCYu4GRbl2ZW T+iR+6vKbKc5/KOCx9SbD9BVzXJoxjxOd1yFGWvkjQ+nAlVD4wA+nNKE/2LVq8ZqHL0X h/zYo6y9tRy86xa1zRhxxaI3Q2UMXe85upAc4Kcz+AKSYWgokVYu20zf7HcDdAfsj+3m XkFASFHpKSn7F+TCL0FprjUJFwxAGV3DS2jHGaZq1Uuye0WkgrbKZyLo6Bl1/4rR3mA7 mjpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PmMiVHya; spf=pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-leds-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 64si4363524pla.622.2017.11.30.21.17.04 for ; Thu, 30 Nov 2017 21:17:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PmMiVHya; spf=pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-leds-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751104AbdLAFRD (ORCPT ); Fri, 1 Dec 2017 00:17:03 -0500 Received: from mail-pl0-f65.google.com ([209.85.160.65]:39653 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750892AbdLAFRC (ORCPT ); Fri, 1 Dec 2017 00:17:02 -0500 Received: by mail-pl0-f65.google.com with SMTP id bi12so5656438plb.6 for ; Thu, 30 Nov 2017 21:17:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to; bh=Ww88ARfkKY14FFZW+f+woDRUA7RYHtq1XmnKgnovmd4=; b=PmMiVHyaIzuJ9GP3/CC1Ykk9IPqt6NKLV+i0iJj8ItMXxsgo0MdWe6awnag9WvF5I0 rMDMmuUQ4hD7f91ekgnWc1DhYY77AMJu8tzf9vUJiDlwH/A7YT9i0GmfeEi+plPZ70vo ytkp3NeSwXAHAGjFwarfUe480Ektxs8fvVMo0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to; bh=Ww88ARfkKY14FFZW+f+woDRUA7RYHtq1XmnKgnovmd4=; b=prblW1aZuuY9iPePaXs/Bq63QpV5ViVi4lfsUWMlDKvUdNgH99SNDB9P9yXIxfHqR9 HyVhdqHQV0VlsFKpB0xojcKteD32sRF1AG84FHbYwZA555HSCrR3t0iqAcMv+Qb1ceZV n7vuEKDeDK4n5bGJdy+1SxnKbLWq2aR7bBCvVPZwG4YBWYYXCW+8JqicTiwaDMyQMPEI 817umFuMTSbtL3CPNsR1HqVA5JGMISFxI6qxU2C+ffEHKBybXNbxwaeQE5IcltdU+3Yd 1Vl14dW5n3JqvvXhrQyO8LQ135+2iutgpBif6XKYuz65H20JMLytZCyaInf4URpYGhtc tPIw== X-Gm-Message-State: AJaThX70bgGi5dWDBww1ctJ5wvIQJk7UkSBIjVL1hkOWLgNfUpRfha/u Kn+0AABR6T+AHszB/6GgjwWdTg== X-Received: by 10.84.178.129 with SMTP id z1mr5102698plb.365.1512105421559; Thu, 30 Nov 2017 21:17:01 -0800 (PST) Received: from localhost.localdomain (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id b67sm10704120pfm.19.2017.11.30.21.17.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Nov 2017 21:17:00 -0800 (PST) From: Bjorn Andersson To: Richard Purdie , Jacek Anaszewski , Pavel Machek Cc: linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org, Linus Walleij , Lee Jones , Stephen Rothwell , Linux-Next Mailing List Subject: [PATCH v2] leds: pm8058: Silence pointer to integer size warning Date: Thu, 30 Nov 2017 21:16:56 -0800 Message-Id: <20171201051656.31694-1-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171130113516.42c8bde2@canb.auug.org.au> Sender: linux-leds-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org The pointer returned by of_device_get_match_data() doesn't have the same size as u32 on 64-bit architectures, causing a compile warning when compile-testing the driver on such platform. Cast the return value of of_device_get_match_data() to unsigned long and then to u32 to silence this warning. Cc: Linus Walleij Fixes: 7f866986e705 ("leds: add PM8058 LEDs driver") Signed-off-by: Bjorn Andersson --- drivers/leds/leds-pm8058.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.15.0 Acked-by: Pavel Machek diff --git a/drivers/leds/leds-pm8058.c b/drivers/leds/leds-pm8058.c index a52674327857..8988ba3b2d65 100644 --- a/drivers/leds/leds-pm8058.c +++ b/drivers/leds/leds-pm8058.c @@ -106,7 +106,7 @@ static int pm8058_led_probe(struct platform_device *pdev) if (!led) return -ENOMEM; - led->ledtype = (u32)of_device_get_match_data(&pdev->dev); + led->ledtype = (u32)(unsigned long)of_device_get_match_data(&pdev->dev); map = dev_get_regmap(pdev->dev.parent, NULL); if (!map) {