From patchwork Sun Nov 28 17:24:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12643011 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB4CCC433EF for ; Sun, 28 Nov 2021 17:23:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235873AbhK1R1M (ORCPT ); Sun, 28 Nov 2021 12:27:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358661AbhK1RZM (ORCPT ); Sun, 28 Nov 2021 12:25:12 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFC84C06175A for ; Sun, 28 Nov 2021 09:20:13 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5F10C60F5D for ; Sun, 28 Nov 2021 17:20:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E217CC53FC7; Sun, 28 Nov 2021 17:20:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638120012; bh=s+rMMXxgyPF7OZ/jIe2Q2bV0gqnaKix1XbnUAVFeYAI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aNmdz3OMEUVWniddWBcO/V0UsPpXUTmpMStwjriOCp5KKnrUO7Vrq7VWOAn9bL9jb 77gwVJ3jcl9EztfxNscxnPjFXBQM+TejRR/bQifU/a8Ut6ga3fZ6nmnm2D7ZAXKaqc ZIf5XEXjyvRfeH51MngGzj6WzZ6n3BHbTDVhq5CDCa0nBqUDjukDXU210bH3MovRNi 9VH/XgbsL+SsQXV/iB/zIU7ymeSdRxpuGsa6h0warjHFUZTNlKtIKG4lw6hhyrW15L PqyQ7rWyRn4pNtg+4L+z6tAtzQmgVGFrfdJeFVPhrUDFs3gciKWZGDgYHzLF3KQyMm z07ay6kT2Fzsg== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Jonathan Cameron , Arnd Bergmann , Mauro Carvalho Chehab , Jonathan Albrieux , Linus Walleij Subject: [PATCH 09/12] iio:magn:ak8975: Suppress clang W=1 warning about pointer to enum conversion. Date: Sun, 28 Nov 2021 17:24:42 +0000 Message-Id: <20211128172445.2616166-10-jic23@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211128172445.2616166-1-jic23@kernel.org> References: <20211128172445.2616166-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron Cast to a uintptr_t rather than directly to the enum. As per the discussion in below linked media patch. Link: https://lore.kernel.org/linux-media/CAK8P3a2ez6nEw4d+Mqa3XXAz0RFTZHunqqRj6sCt7Y_Eqqs0rw@mail.gmail.com/ Signed-off-by: Jonathan Cameron Cc: Arnd Bergmann Cc: Mauro Carvalho Chehab Cc: Jonathan Albrieux Cc: Linus Walleij --- drivers/iio/magnetometer/ak8975.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/magnetometer/ak8975.c b/drivers/iio/magnetometer/ak8975.c index 6e82dc54a417..55879a20ae52 100644 --- a/drivers/iio/magnetometer/ak8975.c +++ b/drivers/iio/magnetometer/ak8975.c @@ -929,7 +929,7 @@ static int ak8975_probe(struct i2c_client *client, /* id will be NULL when enumerated via ACPI */ match = device_get_match_data(&client->dev); if (match) { - chipset = (enum asahi_compass_chipset)(match); + chipset = (uintptr_t)match; name = dev_name(&client->dev); } else if (id) { chipset = (enum asahi_compass_chipset)(id->driver_data);