From patchwork Thu Dec 9 16:17:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars-Peter Clausen X-Patchwork-Id: 12667013 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 56D6DC433FE for ; Thu, 9 Dec 2021 16:17:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231244AbhLIQV3 (ORCPT ); Thu, 9 Dec 2021 11:21:29 -0500 Received: from www381.your-server.de ([78.46.137.84]:41270 "EHLO www381.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237216AbhLIQV1 (ORCPT ); Thu, 9 Dec 2021 11:21:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=metafoo.de; s=default2002; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References; bh=n5Dkv+SafM6uFCrQBXjmUP6uD3VzZH/9wct2o6CMcMc=; b=ajyk4FHsHv3ACqENZLcP3vhiQq znAHBGClQD6PVupFwPe3OhxiRxaxumG1NkUTBkwNolH3wYtCPBEhPmPYlavgMuPIZRN+siU5uD/lV smj0QWUV9DXJMqAVziRVQ2jxVVVxQ1AyFEOYVXSWhNzLs9HJa4qqYu/K3sMNMAVG2/LGHd1ZRfB7A mhr5qsAbiIjl3hUbXdQfmIWq2sBs6Xe4ZDSO8lQ3/ZGtktsuXqEpIVVyPO7PDSlBIV3+Xl/PihaZ0 rqO7fxuUGM2OU25a337RzumEeKSZYwnDSjkxuAF4XvI70Ocr03A0sK0uMdnytkVQt905PIBHG3NyV qN7QMH8A==; Received: from sslproxy05.your-server.de ([78.46.172.2]) by www381.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1mvM7E-0007zT-NS; Thu, 09 Dec 2021 17:17:52 +0100 Received: from [2001:a61:2aa6:c001:9e5c:8eff:fe01:8578] (helo=lars-desktop.fritz.box) by sslproxy05.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mvM7E-00083w-Hj; Thu, 09 Dec 2021 17:17:52 +0100 From: Lars-Peter Clausen To: Jonathan Cameron Cc: Marc Titinger , Matt Ranostay , linux-iio@vger.kernel.org, Lars-Peter Clausen Subject: [PATCH 1/3] iio: as3935: Remove unnecessary cast Date: Thu, 9 Dec 2021 17:17:28 +0100 Message-Id: <20211209161730.396848-1-lars@metafoo.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Authenticated-Sender: lars@metafoo.de X-Virus-Scanned: Clear (ClamAV 0.103.3/26378/Thu Dec 9 10:21:16 2021) Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org `buf` is cast to a const char *, but `buf` is already a const char *, so the case is unnecessary. Signed-off-by: Lars-Peter Clausen --- drivers/iio/proximity/as3935.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/proximity/as3935.c b/drivers/iio/proximity/as3935.c index d62766b6b39e..51f4f92ae84a 100644 --- a/drivers/iio/proximity/as3935.c +++ b/drivers/iio/proximity/as3935.c @@ -133,7 +133,7 @@ static ssize_t as3935_sensor_sensitivity_store(struct device *dev, unsigned long val; int ret; - ret = kstrtoul((const char *) buf, 10, &val); + ret = kstrtoul(buf, 10, &val); if (ret) return -EINVAL; From patchwork Thu Dec 9 16:17:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars-Peter Clausen X-Patchwork-Id: 12667011 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 36DB4C433EF for ; Thu, 9 Dec 2021 16:17:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240717AbhLIQV2 (ORCPT ); Thu, 9 Dec 2021 11:21:28 -0500 Received: from www381.your-server.de ([78.46.137.84]:41278 "EHLO www381.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231244AbhLIQV1 (ORCPT ); Thu, 9 Dec 2021 11:21:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=metafoo.de; s=default2002; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID; bh=wLh3taj/8kVghouC7V0K2FizLR95JvJNX8ZwUbuqSz4=; b=CQ9Xc+zz6hpplnR5FpcwLQOhLa Q8+Yho9kv1J6hyp57FgFmbZ/1PvJ384vrN2qWWkPTpt8aClIsisyf0kRTQGzvX6dgHxmsl6kR333b YqaMtjCPedBvT39R0hq9X9an6XfOl+hDPFU7uXCvnhfVBmk3iosNOsCk7Wi7LaC7KtltgkfesYORb +bOJKvxA/LcyFyMK6++ZsY5jXJ8zC8JdFOUcldRHYWvPNsd9cnALGlHKqCDo98qx94Wjdkzd6Jvyl gmJ178fgxQfk26gAOvk9BOAxRJux1Iz+xq6uuSIjHWGBz72sMve3Fedx/A/bLthrVMMNVW5wX/pOd GjvBqDew==; Received: from sslproxy05.your-server.de ([78.46.172.2]) by www381.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1mvM7E-0007zV-RX; Thu, 09 Dec 2021 17:17:52 +0100 Received: from [2001:a61:2aa6:c001:9e5c:8eff:fe01:8578] (helo=lars-desktop.fritz.box) by sslproxy05.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mvM7E-00083w-Ln; Thu, 09 Dec 2021 17:17:52 +0100 From: Lars-Peter Clausen To: Jonathan Cameron Cc: Marc Titinger , Matt Ranostay , linux-iio@vger.kernel.org, Lars-Peter Clausen Subject: [PATCH 2/3] iio: in2xx-adc: Remove unnecessary cast Date: Thu, 9 Dec 2021 17:17:29 +0100 Message-Id: <20211209161730.396848-2-lars@metafoo.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211209161730.396848-1-lars@metafoo.de> References: <20211209161730.396848-1-lars@metafoo.de> MIME-Version: 1.0 X-Authenticated-Sender: lars@metafoo.de X-Virus-Scanned: Clear (ClamAV 0.103.3/26378/Thu Dec 9 10:21:16 2021) Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org `buf` is cast to a const char *, but `buf` is already a const char *, so the case is unnecessary. Signed-off-by: Lars-Peter Clausen --- 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..08f243f5b92b 100644 --- a/drivers/iio/adc/ina2xx-adc.c +++ b/drivers/iio/adc/ina2xx-adc.c @@ -550,7 +550,7 @@ static ssize_t ina2xx_allow_async_readout_store(struct device *dev, bool val; int ret; - ret = strtobool((const char *) buf, &val); + ret = strtobool(buf, &val); if (ret) return ret; From patchwork Thu Dec 9 16:17:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars-Peter Clausen X-Patchwork-Id: 12667009 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 CC4C0C433F5 for ; Thu, 9 Dec 2021 16:17:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235758AbhLIQV2 (ORCPT ); Thu, 9 Dec 2021 11:21:28 -0500 Received: from www381.your-server.de ([78.46.137.84]:41288 "EHLO www381.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240717AbhLIQV1 (ORCPT ); Thu, 9 Dec 2021 11:21:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=metafoo.de; s=default2002; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID; bh=+l5iBLZo4YyqZmfOoWMoRQdxUhEzjK+rR5duTgR7f+g=; b=JWDzpDYKNOacrKtH961DxWAMGZ CbXLOFXI3aj5ivYEpvjPRD4kHmefWUgpJh13guqZgKQ/SJylN0+Fqs4wxgIQtCkujaHcmkb4UTmzq nph52/j56e47jW8Fqwr7bXxEipJ/49iA1gYir4eLSMjgwtpKgrHx7SpvZ5Urfyf0YpHtiMl2NuBIn /1Kp2Bzmfzhbc2Hu5i3uZKM8IPNnAQUwhlp+dBY0xrxL3FMSx52ZLGcaKNbmIJX6ho3sSV/Z2xTYp jtTWWLRMCcQ4l6eWpzyDkWh1jSRHb8co964TgKLNFE8qllF5bJke1B27qVur49KIW8gByp/x6Kzmv MHg9A2Rw==; Received: from sslproxy05.your-server.de ([78.46.172.2]) by www381.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1mvM7E-0007zf-VL; Thu, 09 Dec 2021 17:17:52 +0100 Received: from [2001:a61:2aa6:c001:9e5c:8eff:fe01:8578] (helo=lars-desktop.fritz.box) by sslproxy05.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mvM7E-00083w-Pl; Thu, 09 Dec 2021 17:17:52 +0100 From: Lars-Peter Clausen To: Jonathan Cameron Cc: Marc Titinger , Matt Ranostay , linux-iio@vger.kernel.org, Lars-Peter Clausen Subject: [PATCH 3/3] iio: vz89x: Remove unnecessary cast Date: Thu, 9 Dec 2021 17:17:30 +0100 Message-Id: <20211209161730.396848-3-lars@metafoo.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211209161730.396848-1-lars@metafoo.de> References: <20211209161730.396848-1-lars@metafoo.de> MIME-Version: 1.0 X-Authenticated-Sender: lars@metafoo.de X-Virus-Scanned: Clear (ClamAV 0.103.3/26378/Thu Dec 9 10:21:16 2021) Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org The case to u8 * is unnecessary here since the expression is already of type u8 *. Signed-off-by: Lars-Peter Clausen --- drivers/iio/chemical/vz89x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/chemical/vz89x.c b/drivers/iio/chemical/vz89x.c index 23b22a5f5c1c..e7e1c74a351e 100644 --- a/drivers/iio/chemical/vz89x.c +++ b/drivers/iio/chemical/vz89x.c @@ -242,7 +242,7 @@ static int vz89x_get_resistance_reading(struct vz89x_data *data, struct iio_chan_spec const *chan, int *val) { - u8 *tmp = (u8 *) &data->buffer[chan->address]; + u8 *tmp = &data->buffer[chan->address]; switch (chan->scan_type.endianness) { case IIO_LE: