From patchwork Sun Nov 28 17:24:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12643007 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 9BFE0C433FE for ; Sun, 28 Nov 2021 17:23:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346470AbhK1R1H (ORCPT ); Sun, 28 Nov 2021 12:27:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358648AbhK1RZH (ORCPT ); Sun, 28 Nov 2021 12:25:07 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B75E7C061757 for ; Sun, 28 Nov 2021 09:19:57 -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 ams.source.kernel.org (Postfix) with ESMTPS id 81BB5B80D29 for ; Sun, 28 Nov 2021 17:19:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7D4B1C53FCB; Sun, 28 Nov 2021 17:19:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638119995; bh=+fof/5humV10YTTwLAW5OWhDsMSWe1Grf91GDZivsUY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UK/yuKKTfTttzxhwnhgPDYKdncxfGXBouQVxY5ddGDCIqb5uxm8VGizgDXD9ebL8e 7wtx7OzLDbIFyLprY1YW/jSnOStlftQsQlSS0YI/tFJZvcrTwyQw3froSVA6SPge94 HhLNDdDQojQo2U/Rak6hW/W9PixuTz3iSBhWSMmoFIhxAEaBnaGiK4/Jl6qprnfl9n E30XMKXJaUlfXt9eRWuabgLTzTXG2VNPRTxzjHTmy6zUBeCiOgI7E8ykcI5XwMftDX f4VVRxQDmdho/YjiF6ZvJyHk3VEtjm+bsSHT3uLUqCLwwwgaHolhN6j7pTAcbX/4y5 08NMKUfO3qa5g== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Jonathan Cameron , Arnd Bergmann , Mauro Carvalho Chehab , Stephan Gerhold Subject: [PATCH 01/12] iio:accel:bma180: Suppress clang W=1 warning about pointer to enum conversion. Date: Sun, 28 Nov 2021 17:24:34 +0000 Message-Id: <20211128172445.2616166-2-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: Stephan Gerhold --- drivers/iio/accel/bma180.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/accel/bma180.c b/drivers/iio/accel/bma180.c index 09496f358ad9..d8a454c266d5 100644 --- a/drivers/iio/accel/bma180.c +++ b/drivers/iio/accel/bma180.c @@ -938,7 +938,7 @@ static int bma180_probe(struct i2c_client *client, i2c_set_clientdata(client, indio_dev); data->client = client; if (client->dev.of_node) - chip = (enum chip_ids)of_device_get_match_data(dev); + chip = (uintptr_t)of_device_get_match_data(dev); else chip = id->driver_data; data->part_info = &bma180_part_info[chip]; From patchwork Sun Nov 28 17:24:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12642987 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 4D7DFC433EF for ; Sun, 28 Nov 2021 17:21:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358683AbhK1RZO (ORCPT ); Sun, 28 Nov 2021 12:25:14 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:56198 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236958AbhK1RXO (ORCPT ); Sun, 28 Nov 2021 12:23:14 -0500 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 0B7F76102B for ; Sun, 28 Nov 2021 17:19:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EEA2CC53FC1; Sun, 28 Nov 2021 17:19:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638119997; bh=dAgNzqHkJOWXo8Dl6zzENKKi5uFTUN6ntrGZcyd7uwY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BZf4/3YoKs7pXLlQwyxgxRb5kS9vcrwX7FenwZ8TQ12ptoBxLff+kOMyluHj2u82O g60sPwZ495bxiO5ltmu3sdJ7T1W9/5r16I12ZMPftfSjU+xh7MSGSNM8oK5F2GpGyk 7EXWPNpu2GgVful6Ui7M6D8xEMrrx0cL4GRtc8U3f223shDzVYs6PfqYqCkuU6dego WE6qV2eHKltT5L4G5qQPNsAATbrqYvTmQR72mPr1uIkguwiJqkcIj+E/TtN7UZ7k8B P85FRLOdhmaKG+ydqrnf1A6vsvuVRLejawYYvzpVz8RBd+fy36w9ZMQYpSfn7nGeKH y/AbNmrusoTeQ== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Jonathan Cameron , Arnd Bergmann , Mauro Carvalho Chehab Subject: [PATCH 02/12] iio:dc:ina2xx-adc: Suppress clang W=1 warning about pointer to enum conversion. Date: Sun, 28 Nov 2021 17:24:35 +0000 Message-Id: <20211128172445.2616166-3-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 --- drivers/iio/adc/ina2xx-adc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/adc/ina2xx-adc.c b/drivers/iio/adc/ina2xx-adc.c index 352f27657238..3bea3ade6ff1 100644 --- a/drivers/iio/adc/ina2xx-adc.c +++ b/drivers/iio/adc/ina2xx-adc.c @@ -971,7 +971,7 @@ static int ina2xx_probe(struct i2c_client *client, } if (client->dev.of_node) - type = (enum ina2xx_ids)of_device_get_match_data(&client->dev); + type = (uintptr_t)of_device_get_match_data(&client->dev); else type = id->driver_data; chip->config = &ina2xx_config[type]; From patchwork Sun Nov 28 17:24:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12642989 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 59794C433F5 for ; Sun, 28 Nov 2021 17:22:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358684AbhK1RZQ (ORCPT ); Sun, 28 Nov 2021 12:25:16 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:56222 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243536AbhK1RXQ (ORCPT ); Sun, 28 Nov 2021 12:23:16 -0500 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 47FBC6103C for ; Sun, 28 Nov 2021 17:20:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0491AC53FC7; Sun, 28 Nov 2021 17:19:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638119999; bh=hxyDxNkAlWrD29JWy+EQN+hhFg7JvNbUY57VYrqbQhA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QXW1vmh5UoWIuWyZKjzC6nzF6D4LV8XP0o8KZ5lrS7bGqhkfo2q10j9XaItDltTAY avIzDhIlhhsY2KtRlJApzvuoXAEFJ5JF0QtNkGJ0DfoFZAJTv8aQJUpspHC55151WD cQNJQWhQyedDUUopjZYZWC7rNLODzlpttVT10wEzTjgfPNadMvA8ccqW+lO5Lq9gIl 3muYFs5o6Iaq41gkY6sA0Ka9WhhNYOzZVDZX2K9UFyaS1QdRCMZVmVckXMe6GEaryM X85evF2UXfOf9zgeM1pnfmAEFzz9YWdxsSbPh0nKIDz0CScunlBhK1u8+koBzZGgXS GdkDRGdg2ntNA== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Jonathan Cameron , Arnd Bergmann , Mauro Carvalho Chehab Subject: [PATCH 03/12] iio:adc:rcar: Suppress clang W=1 warning about pointer to enum conversion. Date: Sun, 28 Nov 2021 17:24:36 +0000 Message-Id: <20211128172445.2616166-4-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 --- drivers/iio/adc/rcar-gyroadc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/iio/adc/rcar-gyroadc.c b/drivers/iio/adc/rcar-gyroadc.c index a48895046408..727ea6c68049 100644 --- a/drivers/iio/adc/rcar-gyroadc.c +++ b/drivers/iio/adc/rcar-gyroadc.c @@ -511,8 +511,7 @@ static int rcar_gyroadc_probe(struct platform_device *pdev) if (ret) return ret; - priv->model = (enum rcar_gyroadc_model) - of_device_get_match_data(&pdev->dev); + priv->model = (uintptr_t)of_device_get_match_data(&pdev->dev); platform_set_drvdata(pdev, indio_dev); From patchwork Sun Nov 28 17:24:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12642991 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 219FEC433F5 for ; Sun, 28 Nov 2021 17:22:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345082AbhK1RZU (ORCPT ); Sun, 28 Nov 2021 12:25:20 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:35538 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345287AbhK1RXU (ORCPT ); Sun, 28 Nov 2021 12:23:20 -0500 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 ams.source.kernel.org (Postfix) with ESMTPS id 41B20B80D29 for ; Sun, 28 Nov 2021 17:20:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 74552C53FCB; Sun, 28 Nov 2021 17:20:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638120002; bh=wWNWeyos2kXI7B8ZCXvjb517pr/rLsHgEl+6fqsoOD8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iPetb+/NPUX44MW9vfETvFNRc38HHqG868zxDkuvu0r9N1gVvCOG82ZykzPZnz2YU q7mFRhBGA8wMYrngwLmKcfIWgmYH9KaLFPm3O4V84Yt4SEKIjgZGJwqjyqkvXtWxlQ EMKhca08/GnMSoQA/sfb3bpf635eTxf2anSaCylJ2blyRwFc/P0MBg9XE+IUos0MH7 8ftS4jgZA72g3nVdokAsZyuwrsMMrPfqxaNSDiJrRpXWnuHkMTqKKmzbWlTOlWkjlR y4m06sEBwwlJHrA8AAKek2XqD7IEfVcotiJIWM/zBJiMFGMVHAV8p+TsAgMCkI0CdJ hbW+A7rSvbHqQ== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Jonathan Cameron , Arnd Bergmann , Mauro Carvalho Chehab Subject: [PATCH 04/12] iio:adc:ti-ads1015: Suppress clang W=1 warning about pointer to enum conversion. Date: Sun, 28 Nov 2021 17:24:37 +0000 Message-Id: <20211128172445.2616166-5-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 --- drivers/iio/adc/ti-ads1015.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/adc/ti-ads1015.c b/drivers/iio/adc/ti-ads1015.c index b92d4cd1b823..068efbce1710 100644 --- a/drivers/iio/adc/ti-ads1015.c +++ b/drivers/iio/adc/ti-ads1015.c @@ -950,7 +950,7 @@ static int ads1015_probe(struct i2c_client *client, indio_dev->name = ADS1015_DRV_NAME; indio_dev->modes = INDIO_DIRECT_MODE; - chip = (enum chip_ids)device_get_match_data(&client->dev); + chip = (uintptr_t)device_get_match_data(&client->dev); if (chip == ADSXXXX) chip = id->driver_data; switch (chip) { From patchwork Sun Nov 28 17:24:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12643009 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 C6492C433EF for ; Sun, 28 Nov 2021 17:23:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346495AbhK1R1I (ORCPT ); Sun, 28 Nov 2021 12:27:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358649AbhK1RZI (ORCPT ); Sun, 28 Nov 2021 12:25:08 -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 015F5C061758 for ; Sun, 28 Nov 2021 09:20:04 -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 9226C61040 for ; Sun, 28 Nov 2021 17:20:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 80121C53FC7; Sun, 28 Nov 2021 17:20:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638120004; bh=0WmxHwWc6/P0y6tPIztENG7TSJrfTZbvp7ABdU3fgUI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kqdIPJw+b4b3S2rAykCKto78try+2hjoZFq8d0db2jiaXtLKFGk+eo7kAF3E9R2Rk 9KBoxZxEWcDl9HMGJTJYMwJuUjRArNEw5aFCdwZ4vJn5I7/Nw3ZMv2clpXZ1lgts8d IValmVef68YSF1T5em21/6nQDk4W+rzwnjLbWwTXPoGBrb4ye5MmPsZhz2QersYxNx mIbAOBEd86jCgyzq/GFMHTrHgBIb7+VVTgoSMdKl3ojZ/TfdLv1k7b/TmyZMuNEOrn 7nHs+SLoUPhfE30hBdJeOMMyBBXxDUvWhB/4+0oDcjdTzHldlb1o0DSWzA8oPA47rc gaBLDyJsxJSWg== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Jonathan Cameron , Arnd Bergmann , Mauro Carvalho Chehab Subject: [PATCH 05/12] iio:amplifiers:hmc425a: Suppress clang W=1 warning about pointer to enum conversion. Date: Sun, 28 Nov 2021 17:24:38 +0000 Message-Id: <20211128172445.2616166-6-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 --- drivers/iio/amplifiers/hmc425a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/amplifiers/hmc425a.c b/drivers/iio/amplifiers/hmc425a.c index 9efa692151f0..16c0a77f6a1c 100644 --- a/drivers/iio/amplifiers/hmc425a.c +++ b/drivers/iio/amplifiers/hmc425a.c @@ -192,7 +192,7 @@ static int hmc425a_probe(struct platform_device *pdev) return -ENOMEM; st = iio_priv(indio_dev); - st->type = (enum hmc425a_type)of_device_get_match_data(&pdev->dev); + st->type = (uintptr_t)of_device_get_match_data(&pdev->dev); st->chip_info = &hmc425a_chip_info_tbl[st->type]; indio_dev->num_channels = st->chip_info->num_channels; From patchwork Sun Nov 28 17:24:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12642993 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 3C367C433EF for ; Sun, 28 Nov 2021 17:22:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345586AbhK1RZY (ORCPT ); Sun, 28 Nov 2021 12:25:24 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:35678 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358872AbhK1RXY (ORCPT ); Sun, 28 Nov 2021 12:23:24 -0500 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 ams.source.kernel.org (Postfix) with ESMTPS id 4D627B80B2F for ; Sun, 28 Nov 2021 17:20:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8C5DCC53FCB; Sun, 28 Nov 2021 17:20:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638120006; bh=M4e12yLHtWRNH4HhQeaN64Rvd0MXe7DUgS09Gr+HST4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Yi0gaf3TdrqLBXg09nMPJn86FxEBqPGfLWZ6BGHbqV6mvFZtBMiWqNji1brUCH0y6 d6WQyfCgUCjIwFVqPa32gQAk2JaQZ673t+hCoVFzwMZ8qBNK/ImhIkc0qzwPnd5FCI 2hSFP4759xFfIoyqpsFkan485gQiRuPQG50ZIwK/6HKxayyYXazfwACc/c7bDnRVCg pfzS3IKXDEKRscVIPfONidPaYhuXl6zf1JQewEU4wAwiKpuSQgtWuXq4SH5mcNoQs8 97H48mYoy3VW19Q92TtoHjBB25OY2IfEtg0JCIAeT8fX4oGJ+CAZs5DtOW3kc8kOj3 /Ep5Wd+8h28IA== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Jonathan Cameron , Arnd Bergmann , Mauro Carvalho Chehab Subject: [PATCH 06/12] iio:dac:mcp4725: Suppress clang W=1 warning about pointer to enum conversion. Date: Sun, 28 Nov 2021 17:24:39 +0000 Message-Id: <20211128172445.2616166-7-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 --- drivers/iio/dac/mcp4725.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/dac/mcp4725.c b/drivers/iio/dac/mcp4725.c index 98b2c2f10bf3..842bad57cb88 100644 --- a/drivers/iio/dac/mcp4725.c +++ b/drivers/iio/dac/mcp4725.c @@ -386,7 +386,7 @@ static int mcp4725_probe(struct i2c_client *client, i2c_set_clientdata(client, indio_dev); data->client = client; if (dev_fwnode(&client->dev)) - data->id = (enum chip_id)device_get_match_data(&client->dev); + data->id = (uintptr_t)device_get_match_data(&client->dev); else data->id = id->driver_data; pdata = dev_get_platdata(&client->dev); From patchwork Sun Nov 28 17:24:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12642995 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 7E385C4332F for ; Sun, 28 Nov 2021 17:22:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346302AbhK1RZZ (ORCPT ); Sun, 28 Nov 2021 12:25:25 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:56294 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358876AbhK1RXY (ORCPT ); Sun, 28 Nov 2021 12:23:24 -0500 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 75DD56103E for ; Sun, 28 Nov 2021 17:20:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 94AF6C53FC1; Sun, 28 Nov 2021 17:20:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638120007; bh=FRoGdIkDAOyOmcuRcysS449DkfmSWLO81MnDGGwXteY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T0C9agFJpDx2Msw5ZAnHd44eecqiiIDSm0qabItl9ythKAfHssQ+lGgCjGcHuttVe /KGSNImLLLg6lMJOLv1vHvUrxCZItXgZ94BmTZDwh9QqPWS18O5yQzuiuAkkShdYl3 BdaEqWGBgIRzgbwM9m7bvbEb2fMEyP+xs204e4gUFcZEN/mfsQm1ZBDR1Er6MJDN13 g227En0DGfDNTcKg0HpZca22HVW5QIxiShlSHq98F0bKpRNrgb4MZRS7pI32+c+lIn tBemCEuRZIw9r/HCfoq/SuIDMIit1m24l8IV8ZGy/sUd2aKAjbcoucvD6INSZWSpKv p1+dtaSM0+mRA== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Jonathan Cameron , Arnd Bergmann , Mauro Carvalho Chehab , Jean-Baptiste Maneyrol Subject: [PATCH 07/12] iio:imu:inv_icm42600: Suppress clang W=1 warning about pointer to enum conversion. Date: Sun, 28 Nov 2021 17:24:40 +0000 Message-Id: <20211128172445.2616166-8-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: Jean-Baptiste Maneyrol --- drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c | 2 +- drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c b/drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c index 85b1934cec60..33d9afb1ba91 100644 --- a/drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c +++ b/drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c @@ -58,7 +58,7 @@ static int inv_icm42600_probe(struct i2c_client *client) match = device_get_match_data(&client->dev); if (!match) return -EINVAL; - chip = (enum inv_icm42600_chip)match; + chip = (uintptr_t)match; regmap = devm_regmap_init_i2c(client, &inv_icm42600_regmap_config); if (IS_ERR(regmap)) diff --git a/drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c b/drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c index 323789697a08..e6305e5fa975 100644 --- a/drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c +++ b/drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c @@ -57,7 +57,7 @@ static int inv_icm42600_probe(struct spi_device *spi) match = device_get_match_data(&spi->dev); if (!match) return -EINVAL; - chip = (enum inv_icm42600_chip)match; + chip = (uintptr_t)match; regmap = devm_regmap_init_spi(spi, &inv_icm42600_regmap_config); if (IS_ERR(regmap)) From patchwork Sun Nov 28 17:24:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12642997 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 8BBFAC433F5 for ; Sun, 28 Nov 2021 17:22:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358705AbhK1RZ3 (ORCPT ); Sun, 28 Nov 2021 12:25:29 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:35740 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358888AbhK1RX2 (ORCPT ); Sun, 28 Nov 2021 12:23:28 -0500 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 ams.source.kernel.org (Postfix) with ESMTPS id AD85FB80B55 for ; Sun, 28 Nov 2021 17:20:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5E4ADC53FCB; Sun, 28 Nov 2021 17:20:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638120010; bh=/agjTQvjlvaF4+MzG+LGqkSrqQ1WyOJe5RYL+5DmPxk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E243GRITY/81tkPyCEqIbo4TFHiw6sQSKyg0eAL7eeTcbm1fA+wyVRUR/4dgv9t65 AbLN06GgeyY12022t2UqPTN6uT/TK9BdAlDx9my65l/fDQ0K5YjchN0+dZwk9UR6VB tPXwmgDHuQ/a6QCDTHzDrm+c8SmywAFdmgVD2bFwP3plY2xmxVK0NpxKceUt3osMHL uNwCeHzEWop7oRxRYJ1xgS43RwhcvShSYsdteIP7LPrJvgzLuJxQ0Lpb0z7h07cdZi n5vFUMu01Vl5fQg9cBEnSgHtfURYiCfHJSHOuPFnqhGkV0OJqd/E+QHfy8QSuT92uw BjlmKoHL2T3tg== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Jonathan Cameron , Arnd Bergmann , Mauro Carvalho Chehab , Baptiste Mansuy , Jean-Baptiste Maneyrol , Linus Walleij Subject: [PATCH 08/12] iio:imu:inv_mpu6050: Suppress clang W=1 warning about pointer to enum conversion. Date: Sun, 28 Nov 2021 17:24:41 +0000 Message-Id: <20211128172445.2616166-9-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: Baptiste Mansuy Cc: Jean-Baptiste Maneyrol Cc: Linus Walleij --- drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c | 2 +- drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c index 3ef17e3f50e2..fe03707ec2d3 100644 --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c @@ -110,7 +110,7 @@ static int inv_mpu_probe(struct i2c_client *client, match = device_get_match_data(&client->dev); if (match) { - chip_type = (enum inv_devices)match; + chip_type = (uintptr_t)match; name = client->name; } else if (id) { chip_type = (enum inv_devices) diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c index b056f3fe2561..6800356b25fb 100644 --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c @@ -45,7 +45,7 @@ static int inv_mpu_probe(struct spi_device *spi) chip_type = (enum inv_devices)spi_id->driver_data; name = spi_id->name; } else if ((match = device_get_match_data(&spi->dev))) { - chip_type = (enum inv_devices)match; + chip_type = (uintptr_t)match; name = dev_name(&spi->dev); } else { return -ENODEV; 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); From patchwork Sun Nov 28 17:24:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12643013 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 CC5BDC433F5 for ; Sun, 28 Nov 2021 17:23:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346629AbhK1R1N (ORCPT ); Sun, 28 Nov 2021 12:27:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358656AbhK1RZN (ORCPT ); Sun, 28 Nov 2021 12:25:13 -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 81B20C06175B for ; Sun, 28 Nov 2021 09:20:15 -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 2324660F5D for ; Sun, 28 Nov 2021 17:20:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8EFA0C53FC7; Sun, 28 Nov 2021 17:20:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638120014; bh=evYm1iKAaGb58pnaoCcX6AjBdF5XxIXimhJCJ+hLYCo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GRpR27jlHAFiDeNK2XbmZd2Ffwjbxe5dGPNailmoKh2mzjf+nfaPgAporPoDv4+X8 XGGixPSpJe1ErvvbAZyL24gCC254rwr4yAYWEINnGrwusuZF0sFUY9vH4yFpVulKK5 5uL+Lywq0e1kZaW88aaSVzQ34yR5QPragb+a0C2Qc0bZq/scFujaUFEIg15+SELJVs B13kflIQZb35zZQo3WkvMi6uBjzsxhfrg8FdnrHkmC7LrLWnw4cH6ko9RrgQj9Bh7x ppLC+slyrHR70sTbOkZAMptp5f/BM1tn4+2GEDPgjjhNo3JPHVdsbsgMjFTRo1LKFJ bg3fNNDQ2f6xQ== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Jonathan Cameron Subject: [PATCH 10/12] iio:dummy: Drop set but unused variable len. Date: Sun, 28 Nov 2021 17:24:43 +0000 Message-Id: <20211128172445.2616166-11-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 Not sure what the thinking was here, as lost to history, but the variable is clearly not used so get rid of it. Warning seen with clang W=1 tests (may be present with other compilers and build options). Signed-off-by: Jonathan Cameron --- drivers/iio/dummy/iio_simple_dummy_buffer.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/iio/dummy/iio_simple_dummy_buffer.c b/drivers/iio/dummy/iio_simple_dummy_buffer.c index 59aa60d4ca37..d81c2b2dad82 100644 --- a/drivers/iio/dummy/iio_simple_dummy_buffer.c +++ b/drivers/iio/dummy/iio_simple_dummy_buffer.c @@ -45,7 +45,6 @@ static irqreturn_t iio_simple_dummy_trigger_h(int irq, void *p) { struct iio_poll_func *pf = p; struct iio_dev *indio_dev = pf->indio_dev; - int len = 0; u16 *data; data = kmalloc(indio_dev->scan_bytes, GFP_KERNEL); @@ -79,7 +78,6 @@ static irqreturn_t iio_simple_dummy_trigger_h(int irq, void *p) indio_dev->masklength, j); /* random access read from the 'device' */ data[i] = fakedata[j]; - len += 2; } } From patchwork Sun Nov 28 17:24:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12642999 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 3CD95C433F5 for ; Sun, 28 Nov 2021 17:22:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346038AbhK1RZd (ORCPT ); Sun, 28 Nov 2021 12:25:33 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:56380 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346139AbhK1RXd (ORCPT ); Sun, 28 Nov 2021 12:23:33 -0500 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 351556103F for ; Sun, 28 Nov 2021 17:20:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 373BCC004E1; Sun, 28 Nov 2021 17:20:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638120016; bh=KPaicMjrlpGor07drBAYhtzSDLARBN3cPeLRzhrRnRY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MmAvlCWYBk4mJpOCtreD8EZ4X3Xqic44Fl+oZTte8Pb0VKcqa0Qwl0lntuX7Klf5l zKyZXUPPhygYpeZyblyOJ6hYUFFd+PVycMEDl2njGIXEZrcWcsmtqs5QxF82wdFdGD ZXNEBJQyu2PfvonbX1p0lG47G3TWy5cOMlbfbcy/6/bR1LJ6MirHDa3uyfqzyOarVH t8mxHg+c1LAbekPr4N7x9g6n5MdZm8ADFhqFlVRxWpw/wKKbd8iVPwxLd19u2vaLVm qhJkR/f2qQPCZtSFzmeGzQH33Ozsus7MOOEkCEX0bMJpcnFkFQxtAyqwBeLPv8OZ0K 26YL7GnAmy42g== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Jonathan Cameron , Stephan Gerhold Subject: [PATCH 11/12] iio:accel:bmc150: Mark structure __maybe_unused as only needed with for pm ops. Date: Sun, 28 Nov 2021 17:24:44 +0000 Message-Id: <20211128172445.2616166-12-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 If CONFIG_PM not set then clang warns this structure is unused. Signed-off-by: Jonathan Cameron Cc: Stephan Gerhold --- drivers/iio/accel/bmc150-accel-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/accel/bmc150-accel-core.c b/drivers/iio/accel/bmc150-accel-core.c index b0678c351e82..e6081dd0a880 100644 --- a/drivers/iio/accel/bmc150-accel-core.c +++ b/drivers/iio/accel/bmc150-accel-core.c @@ -170,7 +170,7 @@ static const struct { {1000, 0, 0x0E}, {2000, 0, 0x0F} }; -static const struct { +static __maybe_unused const struct { int bw_bits; int msec; } bmc150_accel_sample_upd_time[] = { {0x08, 64}, From patchwork Sun Nov 28 17:24:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12643001 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 80E79C433F5 for ; Sun, 28 Nov 2021 17:22:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346139AbhK1RZh (ORCPT ); Sun, 28 Nov 2021 12:25:37 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:35830 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346223AbhK1RXg (ORCPT ); Sun, 28 Nov 2021 12:23:36 -0500 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 ams.source.kernel.org (Postfix) with ESMTPS id 8E69EB80D25 for ; Sun, 28 Nov 2021 17:20:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 22334C53FC1; Sun, 28 Nov 2021 17:20:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638120018; bh=/z2ylpSTcG9wpjujMqzaEGms/pLYcqdQlxLGhPpw5Io=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EkfLzufaKn9KLa2nZeam09Xo/N3DwKA9S/wNZZ7F6WCGrbO4HzVJ/MIUBrlcRrE1P XG4akx2W1LoFcPNnRRUli0eM87rxi2UzELrnsj6F6rGcMkhnR4t4h5p3gWxzJMMEii Vx7b82XXG3OaP/ZXJH5vQ3h7xh4zdh8R0co/cjEqwNLY9Ro0tPfLRDn7JpNs5ROkkH kxOfYtgJx5y2B08OJXv/XJdkerH8h5z1HhcgdvNNvEXf3Kpog0Tqr/h2Zx+G88gPaR KwzulMUZCfJiUT3r8Bxn6k4Hd1MYxmEy2Om27jxOybclfy8IcInL4Tr3WXGn+hHvUw Xq4lqgwOny0Jw== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Jonathan Cameron , Stephan Gerhold Subject: [PATCH 12/12] iio:accel:kxcjk-1013: Mark struct __maybe_unused to avoid warning. Date: Sun, 28 Nov 2021 17:24:45 +0000 Message-Id: <20211128172445.2616166-13-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 This structure is only used in PM ops, so may not be used depending on build configuration. Signed-off-by: Jonathan Cameron Cc: Stephan Gerhold --- drivers/iio/accel/kxcjk-1013.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/accel/kxcjk-1013.c b/drivers/iio/accel/kxcjk-1013.c index 88cf0c276893..460b1a89d575 100644 --- a/drivers/iio/accel/kxcjk-1013.c +++ b/drivers/iio/accel/kxcjk-1013.c @@ -315,7 +315,7 @@ static const char *const kxtf9_samp_freq_avail = "25 50 100 200 400 800"; /* Refer to section 4 of the specification */ -static const struct { +static __maybe_unused const struct { int odr_bits; int usec; } odr_start_up_times[KX_MAX_CHIPS][12] = {