From patchwork Wed Nov 24 19:13:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 12637543 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 754C4C433FE for ; Wed, 24 Nov 2021 19:14:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351000AbhKXTQi (ORCPT ); Wed, 24 Nov 2021 14:16:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:52492 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350949AbhKXTQg (ORCPT ); Wed, 24 Nov 2021 14:16:36 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 802686102A; Wed, 24 Nov 2021 19:13:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1637781206; bh=minbWLEAqIe1znplAKAXLGbHWJ/vTNi2mDHC75qZtFY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NI0DboG7UY6oIeVWycluSUF00L7ZIS8mLogUvnivxCSH8vTkHCIQ8syIx+BeKGv4Y hpLBzFc5LmsIarHAhuGevxazWi9SYP1My2LWusbRn+BXLzg3bHaemj2laeEcxPoyS8 a+MJ06f4XuG6K1rLIDcMbRTtzEacS0k7OQgrSDMg1pJ4/n0sfRpBK5iGON42PU79+7 uBcy6KVu0/mEcHCWWi+3AkRJnSUiFYZn84L9EqqsaA70urQKuX47YA57Spnr0pwijv p0w8LOta+/cIiPhuoOW+e2riaBFK5+EOTW91dWljxyeJY7S50WO23ow3lR2Ko9sZfM bucELO4HRIjfg== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mpxhs-004Q53-FM; Wed, 24 Nov 2021 20:13:24 +0100 From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Hans Verkuil , Mauro Carvalho Chehab , Nathan Chancellor , Nick Desaulniers , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH 01/20] media: adv7842: get rid of two unused functions Date: Wed, 24 Nov 2021 20:13:04 +0100 Message-Id: X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Those functions just call a V4L2 core macro, and aren't used anywhere. Get rid of them, in order to avoid clang warnings with W=1. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Nathan Chancellor --- To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH 00/20] at: https://lore.kernel.org/all/cover.1637781097.git.mchehab+huawei@kernel.org/ drivers/media/i2c/adv7842.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/drivers/media/i2c/adv7842.c b/drivers/media/i2c/adv7842.c index 7f8acbdf0db4..9d6eed0f8281 100644 --- a/drivers/media/i2c/adv7842.c +++ b/drivers/media/i2c/adv7842.c @@ -256,21 +256,11 @@ static inline struct v4l2_subdev *to_sd(struct v4l2_ctrl *ctrl) return &container_of(ctrl->handler, struct adv7842_state, hdl)->sd; } -static inline unsigned hblanking(const struct v4l2_bt_timings *t) -{ - return V4L2_DV_BT_BLANKING_WIDTH(t); -} - static inline unsigned htotal(const struct v4l2_bt_timings *t) { return V4L2_DV_BT_FRAME_WIDTH(t); } -static inline unsigned vblanking(const struct v4l2_bt_timings *t) -{ - return V4L2_DV_BT_BLANKING_HEIGHT(t); -} - static inline unsigned vtotal(const struct v4l2_bt_timings *t) { return V4L2_DV_BT_FRAME_HEIGHT(t); From patchwork Wed Nov 24 19:13:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 12637495 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 C8A93C433F5 for ; Wed, 24 Nov 2021 19:13:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351049AbhKXTQj (ORCPT ); Wed, 24 Nov 2021 14:16:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:52506 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350956AbhKXTQg (ORCPT ); Wed, 24 Nov 2021 14:16:36 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 829E761039; Wed, 24 Nov 2021 19:13:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1637781206; bh=zNh74PHZNRpkApXERz6a/nbbu/u11mAhtg08mS2Lb+I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ROselUXsmhTKBs4jHllOxwbPDtGt1cY8PmM0bRMLogAO0KdGzzq3RTz5EJIUQ7jn+ 48POq8k9ZpHkNssBC9arWp8lSRFtcjt3bJvEwu0uco+12XQMG80HdskBX13tYMjp17 o4QcL9K1vaSTpBEXJPBDxO1QllLmNHVb3uGWvbcLNPZXX0OMX3ivEGIirXcPEwpn3C 2tjzXyd9AKqo3GzzXzFXRWkzu1BZ4JsPQH5rQi21cdJVEaKUHXeo+xFiXN2Go57Z82 dWH+3TacB6wZv0DsTnrtsgKgv4vZJr1oyZfz3dm53YdkJ32QhzYETGyLcqPMgl2Z3v 8K542RTdP4Z9A== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mpxhs-004Q56-Fn; Wed, 24 Nov 2021 20:13:24 +0100 From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Mauro Carvalho Chehab , Nathan Chancellor , Nick Desaulniers , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH 02/20] media: saa7134-go7007: get rid of to_state() function Date: Wed, 24 Nov 2021 20:13:05 +0100 Message-Id: <0de4ecd59028848b24cfb57fcf0ac0480d6c7029.1637781097.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org This is just an alias for container_of() and it is used only on a commented code. The commented code actually is an issue that require fixes, so, move the container_of() call to the commented code, and drop the unused function. This way, a fix for the function could be added later without needing to re-add to_state() function. This fixes a clang W=1 warning. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Nathan Chancellor --- To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH 00/20] at: https://lore.kernel.org/all/cover.1637781097.git.mchehab+huawei@kernel.org/ drivers/media/pci/saa7134/saa7134-go7007.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/media/pci/saa7134/saa7134-go7007.c b/drivers/media/pci/saa7134/saa7134-go7007.c index f319edb39c0e..da83893ffee9 100644 --- a/drivers/media/pci/saa7134/saa7134-go7007.c +++ b/drivers/media/pci/saa7134/saa7134-go7007.c @@ -56,11 +56,6 @@ struct saa7134_go7007 { dma_addr_t bottom_dma; }; -static inline struct saa7134_go7007 *to_state(struct v4l2_subdev *sd) -{ - return container_of(sd, struct saa7134_go7007, sd); -} - static const struct go7007_board_info board_voyager = { .flags = 0, .sensor_flags = GO7007_SENSOR_656 | @@ -385,7 +380,7 @@ MODULE_FIRMWARE("go7007/go7007tv.bin"); static int saa7134_go7007_s_std(struct v4l2_subdev *sd, v4l2_std_id norm) { #if 0 - struct saa7134_go7007 *saa = to_state(sd); + struct saa7134_go7007 *saa = container_of(sd, struct saa7134_go7007, sd); struct saa7134_dev *dev = saa->dev; return saa7134_s_std_internal(dev, NULL, norm); From patchwork Wed Nov 24 19:13:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 12637497 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 0F52BC433EF for ; Wed, 24 Nov 2021 19:13:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351092AbhKXTQk (ORCPT ); Wed, 24 Nov 2021 14:16:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:52524 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350958AbhKXTQg (ORCPT ); Wed, 24 Nov 2021 14:16:36 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 87EBC6104F; Wed, 24 Nov 2021 19:13:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1637781206; bh=Eevvy6W9YFudWvuEV7p/tKC/syUTBm6/p7JKSRgzf+c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bXRHw01CBVngYyR14Do++R6BzvSB9JP7je96g+iXWBdT+wE/aqtEGa6hdNO4kqBTk 9yZWATN6OXyU8lp/8J6uc99RUm0r68IbHPDvB7MIcnUXg1koWHj77GgjuYB9Bhvv64 a3LpiMHUXBO9WqWCegR6Op+aC+HSbaGYhzyLk+PkppKox5YE83Bfb5t7WE0SRab7VS aJUaxNh7F0I/RG7GK2GRO/ZWPwtwLWToTw1GgAicKNKAcGwyBiAhG61QcddK/13Igd GnFzKMa427xZnVyrdLCe5jb2vVKHgLT7R1wwPqCno2sYz4ZE/uz/NpG8AR3T2dcjAr UrcrVxcNAzQTQ== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mpxhs-004Q59-GH; Wed, 24 Nov 2021 20:13:24 +0100 From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , "Lad, Prabhakar" , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Subject: [PATCH 03/20] media: davinci: get rid of an unused function Date: Wed, 24 Nov 2021 20:13:06 +0100 Message-Id: <4e64efe47ed540f3ec60b86c4b1e0ad29a2ddc65.1637781097.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org vpif_get_default_field() seems to be some left-over from a past code that sets the field order. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Nathan Chancellor --- To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH 00/20] at: https://lore.kernel.org/all/cover.1637781097.git.mchehab+huawei@kernel.org/ drivers/media/platform/davinci/vpif_capture.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c index ae92e2c206d0..aba105fa7ef9 100644 --- a/drivers/media/platform/davinci/vpif_capture.c +++ b/drivers/media/platform/davinci/vpif_capture.c @@ -618,17 +618,6 @@ static void vpif_calculate_offsets(struct channel_obj *ch) ch->vpifparams.video_params.stdid = vpifparams->std_info.stdid; } -/** - * vpif_get_default_field() - Get default field type based on interface - * @iface: ptr to vpif interface - */ -static inline enum v4l2_field vpif_get_default_field( - struct vpif_interface *iface) -{ - return (iface->if_type == VPIF_IF_RAW_BAYER) ? V4L2_FIELD_NONE : - V4L2_FIELD_INTERLACED; -} - /** * vpif_config_addr() - function to configure buffer address in vpif * @ch: channel ptr From patchwork Wed Nov 24 19:13:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 12637489 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 DCC10C433F5 for ; Wed, 24 Nov 2021 19:13:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350968AbhKXTQh (ORCPT ); Wed, 24 Nov 2021 14:16:37 -0500 Received: from mail.kernel.org ([198.145.29.99]:52486 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350943AbhKXTQg (ORCPT ); Wed, 24 Nov 2021 14:16:36 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 794086101D; Wed, 24 Nov 2021 19:13:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1637781206; bh=oPubh2d4lwP9fKqCb4pNVElTBqmEvoM1817FlD5uu1Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=irJXrhhLIwRivfMQeCc7aAfVVCkb24cDUxA9Hj7NFCWbBnwunN9z3ASNrj9E6n3a9 X13bRzxKuNGdJeN7+B7dSq3DNLtYHwgjFNz8HiUPJWE6+Vqu+/OCXS620D7fYXQpi3 Wzv5FwxWn9gWdWVwY2YRH3giOK8umhhYXwDitIKdzXadq50/x6Y9Uz3C4ys7Netvsu ywPsOXmHr8ADYP6RvCMEB59d8IbAYgyjcfqdfizXZ2hhwvK6QdSjcHpfm2ccG6t3U3 JQX0k6I2i0Lw9Y9JKJB5+Bg5ycfqi2+7iD+QskU1dCEbHvIoobjt3hk098W3DI+e15 ffIjQ8sodAA1A== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mpxhs-004Q5C-Gm; Wed, 24 Nov 2021 20:13:24 +0100 From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Mauro Carvalho Chehab , Nathan Chancellor , Nick Desaulniers , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH 04/20] media: drxd: drop offset var from DownloadMicrocode() Date: Wed, 24 Nov 2021 20:13:07 +0100 Message-Id: X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The offset is not needed, and it is never used, as the pointer itself is already incremented. So, drop it, in order to solve a W=1 clang warning. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Nathan Chancellor --- To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH 00/20] at: https://lore.kernel.org/all/cover.1637781097.git.mchehab+huawei@kernel.org/ drivers/media/dvb-frontends/drxd_hard.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/media/dvb-frontends/drxd_hard.c b/drivers/media/dvb-frontends/drxd_hard.c index a7eb81df88c2..9860cae65f1c 100644 --- a/drivers/media/dvb-frontends/drxd_hard.c +++ b/drivers/media/dvb-frontends/drxd_hard.c @@ -914,44 +914,36 @@ static int DownloadMicrocode(struct drxd_state *state, u32 Address; u16 nBlocks; u16 BlockSize; - u32 offset = 0; int i, status = 0; pSrc = (u8 *) pMCImage; /* We're not using Flags */ /* Flags = (pSrc[0] << 8) | pSrc[1]; */ pSrc += sizeof(u16); - offset += sizeof(u16); nBlocks = (pSrc[0] << 8) | pSrc[1]; pSrc += sizeof(u16); - offset += sizeof(u16); for (i = 0; i < nBlocks; i++) { Address = (pSrc[0] << 24) | (pSrc[1] << 16) | (pSrc[2] << 8) | pSrc[3]; pSrc += sizeof(u32); - offset += sizeof(u32); BlockSize = ((pSrc[0] << 8) | pSrc[1]) * sizeof(u16); pSrc += sizeof(u16); - offset += sizeof(u16); /* We're not using Flags */ /* u16 Flags = (pSrc[0] << 8) | pSrc[1]; */ pSrc += sizeof(u16); - offset += sizeof(u16); /* We're not using BlockCRC */ /* u16 BlockCRC = (pSrc[0] << 8) | pSrc[1]; */ pSrc += sizeof(u16); - offset += sizeof(u16); status = WriteBlock(state, Address, BlockSize, pSrc, DRX_I2C_CLEARCRC); if (status < 0) break; pSrc += BlockSize; - offset += BlockSize; } return status; From patchwork Wed Nov 24 19:13:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 12637493 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 8DE26C433FE for ; Wed, 24 Nov 2021 19:13:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351022AbhKXTQi (ORCPT ); Wed, 24 Nov 2021 14:16:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:52504 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350951AbhKXTQg (ORCPT ); Wed, 24 Nov 2021 14:16:36 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 856BB61041; Wed, 24 Nov 2021 19:13:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1637781206; bh=lsAq/0cKiHLuLleiHtxI/16sPQha5Bd5hiywwOIo6qI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ps9ARWXhIfIyntZeynfdlCX0Cma5uSt9767Mv+nRwruGeCkDfIg6KRPut4t1afnJ0 1iYHDx94LHJr4783T2412HflaJjyYAp4We+EKf/VKPPkgfQW5fJ/zboajb2Ee5zDyQ xOsj4q5rcNmzvgL/SEDrxpPZkQZGtrtrx5QR5U59dSZ6yE2/spy+F4wJG1ZfBefA/t cqtC3Y7/G5WyiAncX5plAsG+PHo2P/mxW5SU9JKfi94eNoIZr+Ue3J/ZmpnLHA9X1U Ux6H0Y2z5VDI3dTProUapd6YE9SvHgZBdgFZy6bCIy0yp4s6fAXgfpzdh+Ayyk6Xzm U85B548xYaUGg== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mpxhs-004Q5G-HH; Wed, 24 Nov 2021 20:13:24 +0100 From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , "Gustavo A. R. Silva" , Hans Verkuil , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Subject: [PATCH 05/20] media: drxk: drop operation_mode from set_dvbt() Date: Wed, 24 Nov 2021 20:13:08 +0100 Message-Id: <1a2a3fa651a90bd1e4d00318d67bfe0488e98df2.1637781097.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org This var is set, but never used. So, drop it. Signed-off-by: Mauro Carvalho Chehab --- To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH 00/20] at: https://lore.kernel.org/all/cover.1637781097.git.mchehab+huawei@kernel.org/ drivers/media/dvb-frontends/drxk_hard.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/media/dvb-frontends/drxk_hard.c b/drivers/media/dvb-frontends/drxk_hard.c index d7fc2595f15b..afa0ac85313f 100644 --- a/drivers/media/dvb-frontends/drxk_hard.c +++ b/drivers/media/dvb-frontends/drxk_hard.c @@ -3720,7 +3720,6 @@ static int set_dvbt(struct drxk_state *state, u16 intermediate_freqk_hz, { u16 cmd_result = 0; u16 transmission_params = 0; - u16 operation_mode = 0; u32 iqm_rc_rate_ofs = 0; u32 bandwidth = 0; u16 param1; @@ -3760,7 +3759,6 @@ static int set_dvbt(struct drxk_state *state, u16 intermediate_freqk_hz, switch (state->props.transmission_mode) { case TRANSMISSION_MODE_AUTO: default: - operation_mode |= OFDM_SC_RA_RAM_OP_AUTO_MODE__M; fallthrough; /* try first guess DRX_FFTMODE_8K */ case TRANSMISSION_MODE_8K: transmission_params |= OFDM_SC_RA_RAM_OP_PARAM_MODE_8K; @@ -3774,7 +3772,6 @@ static int set_dvbt(struct drxk_state *state, u16 intermediate_freqk_hz, switch (state->props.guard_interval) { default: case GUARD_INTERVAL_AUTO: - operation_mode |= OFDM_SC_RA_RAM_OP_AUTO_GUARD__M; fallthrough; /* try first guess DRX_GUARD_1DIV4 */ case GUARD_INTERVAL_1_4: transmission_params |= OFDM_SC_RA_RAM_OP_PARAM_GUARD_4; @@ -3795,7 +3792,6 @@ static int set_dvbt(struct drxk_state *state, u16 intermediate_freqk_hz, case HIERARCHY_AUTO: case HIERARCHY_NONE: default: - operation_mode |= OFDM_SC_RA_RAM_OP_AUTO_HIER__M; /* try first guess SC_RA_RAM_OP_PARAM_HIER_NO */ /* transmission_params |= OFDM_SC_RA_RAM_OP_PARAM_HIER_NO; */ fallthrough; @@ -3815,7 +3811,6 @@ static int set_dvbt(struct drxk_state *state, u16 intermediate_freqk_hz, switch (state->props.modulation) { case QAM_AUTO: default: - operation_mode |= OFDM_SC_RA_RAM_OP_AUTO_CONST__M; fallthrough; /* try first guess DRX_CONSTELLATION_QAM64 */ case QAM_64: transmission_params |= OFDM_SC_RA_RAM_OP_PARAM_CONST_QAM64; @@ -3858,7 +3853,6 @@ static int set_dvbt(struct drxk_state *state, u16 intermediate_freqk_hz, switch (state->props.code_rate_HP) { case FEC_AUTO: default: - operation_mode |= OFDM_SC_RA_RAM_OP_AUTO_RATE__M; fallthrough; /* try first guess DRX_CODERATE_2DIV3 */ case FEC_2_3: transmission_params |= OFDM_SC_RA_RAM_OP_PARAM_RATE_2_3; From patchwork Wed Nov 24 19:13:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 12637499 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 E2BE1C433F5 for ; Wed, 24 Nov 2021 19:13:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351122AbhKXTQn (ORCPT ); Wed, 24 Nov 2021 14:16:43 -0500 Received: from mail.kernel.org ([198.145.29.99]:52772 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350949AbhKXTQl (ORCPT ); Wed, 24 Nov 2021 14:16:41 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4E5BF61053; Wed, 24 Nov 2021 19:13:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1637781211; bh=g0AsuZ12k/WkxlcvsLFNmv8i+pWVEahe+94IcgxRpNA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BfRhCP0KmFkhCfgS39ZOO6jGsw2Sm0SH//aSE6g6dEkTNIdSK+HyfIiN3vhM21fs+ +FPntglC2f5vrm/ZYxmIspsIf6W8kNnLxWzQBcypuH4ziGl+rOdFTjfErjK3nfO5DH Ui+4Nai4fBqElDTXohgU6d9Thx3wEGuodn+XA6kJlSw4DRHlh6YwJ1KOvpf45Ehe+Y oNsMEDbXhZsmtUrI6jMXoLIj6CsVlU8XUKNowTgDTBLZ2MssBHyMAfdM3Fw5vh7tjL jeq6E+G4fRRxA8JFxHdq6GAlb237ne01HhkO/+DPDsC7nb+ZUkUsSngdMuAfmkt9Za oASCY8BF17jzg== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mpxhs-004Q5J-Hj; Wed, 24 Nov 2021 20:13:24 +0100 From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Antti Palosaari , Mauro Carvalho Chehab , Nathan Chancellor , Nick Desaulniers , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH 06/20] media: m88ds3103: drop reg11 calculus from m88ds3103b_select_mclk() Date: Wed, 24 Nov 2021 20:13:09 +0100 Message-Id: <9e528a0ce280d8ce99f9bfe1a725baafa6bf1408.1637781097.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org This vaklue is never used at the code. So, drop it. Solves a W=1 clang warning. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Nathan Chancellor --- To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH 00/20] at: https://lore.kernel.org/all/cover.1637781097.git.mchehab+huawei@kernel.org/ drivers/media/dvb-frontends/m88ds3103.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/media/dvb-frontends/m88ds3103.c b/drivers/media/dvb-frontends/m88ds3103.c index 02e8aa11e36e..bce0f42f3d19 100644 --- a/drivers/media/dvb-frontends/m88ds3103.c +++ b/drivers/media/dvb-frontends/m88ds3103.c @@ -451,7 +451,7 @@ static int m88ds3103b_select_mclk(struct m88ds3103_dev *dev) static int m88ds3103b_set_mclk(struct m88ds3103_dev *dev, u32 mclk_khz) { - u8 reg11 = 0x0A, reg15, reg16, reg1D, reg1E, reg1F, tmp; + u8 reg15, reg16, reg1D, reg1E, reg1F, tmp; u8 sm, f0 = 0, f1 = 0, f2 = 0, f3 = 0; u16 pll_div_fb, N; u32 div; @@ -480,8 +480,6 @@ static int m88ds3103b_set_mclk(struct m88ds3103_dev *dev, u32 mclk_khz) div /= mclk_khz; if (dev->cfg->ts_mode == M88DS3103_TS_SERIAL) { - reg11 |= 0x02; - if (div <= 32) { N = 2; @@ -532,8 +530,6 @@ static int m88ds3103b_set_mclk(struct m88ds3103_dev *dev, u32 mclk_khz) else if ((f3 < 8) && (f3 != 0)) f3 = 8; } else { - reg11 &= ~0x02; - if (div <= 32) { N = 2; From patchwork Wed Nov 24 19:13:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 12637491 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 50FC8C433FE for ; Wed, 24 Nov 2021 19:13:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350997AbhKXTQh (ORCPT ); Wed, 24 Nov 2021 14:16:37 -0500 Received: from mail.kernel.org ([198.145.29.99]:52480 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350928AbhKXTQg (ORCPT ); Wed, 24 Nov 2021 14:16:36 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 76F33604D1; Wed, 24 Nov 2021 19:13:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1637781206; bh=rEaQWJSLeAyWYeLUZHpsb/ELAyk98yYLjZE+h6E7dJA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iJ++v5ZKZl8nAzT4E1auSFRWb4TujUSAWWXHLdbAtJ16MoC8NLphfkwtzgkS9kAVU R258QBgc4hGKTlQjh5m0eF/3YvI8wDW4RiRcGl8ksXF4IWfufNifU5H1Lq6RCDgYVX TMWDO6yPweBuD0lyAKBopjQXh2InEQWMfAekejWq6oXzlx99suIrPSjntfzxxSjBmr tHVhBH5kKuM1qUIjozIhheFggzgOXaNcgHieiK38Q6GcQJnoFfn7WcaxVgR2rq9Lxj t9quB7qLZfscRPcwq/2HGP7q0goh31aO7bPikePBnL0XR3RMYQyysefF37kzhoOkWs I1ebe/1dmltMg== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mpxhs-004Q5M-IE; Wed, 24 Nov 2021 20:13:24 +0100 From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Subject: [PATCH 07/20] media: si21xx: report eventual errors at set_frontend Date: Wed, 24 Nov 2021 20:13:10 +0100 Message-Id: <36d55de3be035253bf1b07506db13eab04ad803d.1637781097.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org If an error occurs while setting the registers at set_frontend, it is silently ignored. Yet, the variable status is updated. Change the logic to return an error if it fails to write values to the registers. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Nathan Chancellor --- To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH 00/20] at: https://lore.kernel.org/all/cover.1637781097.git.mchehab+huawei@kernel.org/ drivers/media/dvb-frontends/si21xx.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/media/dvb-frontends/si21xx.c b/drivers/media/dvb-frontends/si21xx.c index e31eb2c5cc4c..001b23588389 100644 --- a/drivers/media/dvb-frontends/si21xx.c +++ b/drivers/media/dvb-frontends/si21xx.c @@ -711,7 +711,7 @@ static int si21xx_set_frontend(struct dvb_frontend *fe) int i; bool inband_interferer_div2[ALLOWABLE_FS_COUNT]; bool inband_interferer_div4[ALLOWABLE_FS_COUNT]; - int status; + int status = 0; /* allowable sample rates for ADC in MHz */ int afs[ALLOWABLE_FS_COUNT] = { 200, 192, 193, 194, 195, @@ -747,8 +747,6 @@ static int si21xx_set_frontend(struct dvb_frontend *fe) rf_freq = 10 * c->frequency ; data_rate = c->symbol_rate / 100; - status = PASS; - band_low = (rf_freq - lnb_lo) - ((lnb_uncertanity * 200) + (data_rate * 135)) / 200; @@ -832,6 +830,9 @@ static int si21xx_set_frontend(struct dvb_frontend *fe) state->fs = sample_rate;/*ADC MHz*/ si21xx_setacquire(fe, c->symbol_rate, c->fec_inner); + if (status) + return -EREMOTEIO; + return 0; } From patchwork Wed Nov 24 19:13:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 12637503 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 967CAC433F5 for ; Wed, 24 Nov 2021 19:13:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351202AbhKXTQq (ORCPT ); Wed, 24 Nov 2021 14:16:46 -0500 Received: from mail.kernel.org ([198.145.29.99]:52764 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351102AbhKXTQl (ORCPT ); Wed, 24 Nov 2021 14:16:41 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4DB2761041; Wed, 24 Nov 2021 19:13:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1637781211; bh=RRjOTqPDWgrKdDbYPjNhYCqM2YMTxtM8UhC2wV0Nr1E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f4F0FRqIrWtYVY1BgJIUuNFzzvvViYbMzStnsu9jkMUHEnXoFor7p0IA3xIauPS0M 2mpWl2oxq/3roJBk2iuG6/H0O2A2YXaCkmMgYEmsvIhzknVzf17E08ojciXzPe9N94 sAQjzUkOsv8KrP0WJFJ9aZ9CRj3UvnyDy0KIukfK1qhna5B5b9DD3Vg/gDFjUKtsk0 ITlXyZXTLDTKftotWbfvcxxZF5a1PFStdrMwIhsLvxuvYCsyFJLU0BgilhUdh6OYMo 7e+x59vjMksqPeYZTrd8j6HoKrO7+3eaL6xNV6WjsqN8OVwXmnuC+TLdMNoJ29w3fT wNUtENa2OepLw== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mpxhs-004Q5P-Ig; Wed, 24 Nov 2021 20:13:24 +0100 From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Andrey Utkin , Anton Sviridenko , Bluecherry Maintainers , Ismael Luceno , Mauro Carvalho Chehab , Nathan Chancellor , Nick Desaulniers , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH 08/20] media: solo6x10: add _maybe_unused to currently unused functions Date: Wed, 24 Nov 2021 20:13:11 +0100 Message-Id: <18daa194878d8815beef39d6fed2a838e1c2cb68.1637781097.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org There are several unused helper macros there, meant to parse some fields. While there's not wrong with that, it generates clang warnings with W=1, causing build to break with CONFIG_WERROR. So, add __maybe_unused to fix such warnings. Signed-off-by: Mauro Carvalho Chehab Acked-by: Ismael Luceno --- To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH 00/20] at: https://lore.kernel.org/all/cover.1637781097.git.mchehab+huawei@kernel.org/ drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c b/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c index 0abcad4e84fa..85eaf5d00e9b 100644 --- a/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c +++ b/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c @@ -391,12 +391,12 @@ static int solo_send_desc(struct solo_enc_dev *solo_enc, int skip, } /* Extract values from VOP header - VE_STATUSxx */ -static inline int vop_interlaced(const vop_header *vh) +static inline __maybe_unused int vop_interlaced(const vop_header *vh) { return (__le32_to_cpu((*vh)[0]) >> 30) & 1; } -static inline u8 vop_channel(const vop_header *vh) +static inline __maybe_unused u8 vop_channel(const vop_header *vh) { return (__le32_to_cpu((*vh)[0]) >> 24) & 0x1F; } @@ -411,12 +411,12 @@ static inline u32 vop_mpeg_size(const vop_header *vh) return __le32_to_cpu((*vh)[0]) & 0xFFFFF; } -static inline u8 vop_hsize(const vop_header *vh) +static inline u8 __maybe_unused vop_hsize(const vop_header *vh) { return (__le32_to_cpu((*vh)[1]) >> 8) & 0xFF; } -static inline u8 vop_vsize(const vop_header *vh) +static inline u8 __maybe_unused vop_vsize(const vop_header *vh) { return __le32_to_cpu((*vh)[1]) & 0xFF; } @@ -436,12 +436,12 @@ static inline u32 vop_jpeg_size(const vop_header *vh) return __le32_to_cpu((*vh)[4]) & 0xFFFFF; } -static inline u32 vop_sec(const vop_header *vh) +static inline u32 __maybe_unused vop_sec(const vop_header *vh) { return __le32_to_cpu((*vh)[5]); } -static inline u32 vop_usec(const vop_header *vh) +static inline __maybe_unused u32 vop_usec(const vop_header *vh) { return __le32_to_cpu((*vh)[6]); } From patchwork Wed Nov 24 19:13:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 12637501 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 CA6ECC433FE for ; Wed, 24 Nov 2021 19:13:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351141AbhKXTQo (ORCPT ); Wed, 24 Nov 2021 14:16:44 -0500 Received: from mail.kernel.org ([198.145.29.99]:52778 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351101AbhKXTQl (ORCPT ); Wed, 24 Nov 2021 14:16:41 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4E63461055; Wed, 24 Nov 2021 19:13:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1637781211; bh=aYMpgarbsAIo/Gs3IZ3+7TXpCUVheX2ETh/dnhTLa+o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uxPegxTMoJDWt4HPx2kiw6tOrVWKUKqw31nOwt5zrDG6FddWBuhAFuE+sQRX4jJRA mYp8IEgBUykVuC0GdY5pYCPUIWkUaQO1jcGbgKEk/8vpML54ByjBOKAwO/C4J75Gmt +j4rptpWsSs9kX3ZISd7Ad4KzpPJzj1n9o+dGqKT71qhxC4pBJBRZu1n4kK0nLwhza 8oA2WFLxhK0GlcCV8vkvg+kZArArhTFM//QG47K1ipVQmeRcy+VYE3Oc/th1o+HowX 372lGv8fIv/XSeKVFng/+uj6JaI6veQi6QPRmrtd8rvBMc2V/nFKltaoWbi6kmSq4z Nx+6xpgnqoMvg== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mpxhs-004Q5S-JB; Wed, 24 Nov 2021 20:13:24 +0100 From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Hans Verkuil , Kees Cook , Mauro Carvalho Chehab , Nathan Chancellor , Nick Desaulniers , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH 09/20] media: si470x: fix printk warnings with clang Date: Wed, 24 Nov 2021 20:13:12 +0100 Message-Id: X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Clang doesn't like "%hu" on macros: drivers/media/radio/si470x/radio-si470x-i2c.c:414:4: error: format specifies type 'unsigned short' but the argument has type 'int' [-Werror,-Wformat] drivers/media/radio/si470x/radio-si470x-i2c.c:417:4: error: format specifies type 'unsigned short' but the argument has type 'int' [-Werror,-Wformat] So, just replace them with "%u". Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Nathan Chancellor --- To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH 00/20] at: https://lore.kernel.org/all/cover.1637781097.git.mchehab+huawei@kernel.org/ drivers/media/radio/si470x/radio-si470x-i2c.c | 4 ++-- drivers/media/radio/si470x/radio-si470x-usb.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/media/radio/si470x/radio-si470x-i2c.c b/drivers/media/radio/si470x/radio-si470x-i2c.c index a972c0705ac7..7ea7c6326f53 100644 --- a/drivers/media/radio/si470x/radio-si470x-i2c.c +++ b/drivers/media/radio/si470x/radio-si470x-i2c.c @@ -410,10 +410,10 @@ static int si470x_i2c_probe(struct i2c_client *client) radio->registers[DEVICEID], radio->registers[SI_CHIPID]); if ((radio->registers[SI_CHIPID] & SI_CHIPID_FIRMWARE) < RADIO_FW_VERSION) { dev_warn(&client->dev, - "This driver is known to work with firmware version %hu,\n", + "This driver is known to work with firmware version %u,\n", RADIO_FW_VERSION); dev_warn(&client->dev, - "but the device has firmware version %hu.\n", + "but the device has firmware version %u.\n", radio->registers[SI_CHIPID] & SI_CHIPID_FIRMWARE); version_warning = 1; } diff --git a/drivers/media/radio/si470x/radio-si470x-usb.c b/drivers/media/radio/si470x/radio-si470x-usb.c index 3f8634a46573..1e70e6971fe4 100644 --- a/drivers/media/radio/si470x/radio-si470x-usb.c +++ b/drivers/media/radio/si470x/radio-si470x-usb.c @@ -681,10 +681,10 @@ static int si470x_usb_driver_probe(struct usb_interface *intf, radio->registers[DEVICEID], radio->registers[SI_CHIPID]); if ((radio->registers[SI_CHIPID] & SI_CHIPID_FIRMWARE) < RADIO_FW_VERSION) { dev_warn(&intf->dev, - "This driver is known to work with firmware version %hu,\n", + "This driver is known to work with firmware version %u,\n", RADIO_FW_VERSION); dev_warn(&intf->dev, - "but the device has firmware version %hu.\n", + "but the device has firmware version %u.\n", radio->registers[SI_CHIPID] & SI_CHIPID_FIRMWARE); version_warning = 1; } @@ -698,10 +698,10 @@ static int si470x_usb_driver_probe(struct usb_interface *intf, radio->software_version, radio->hardware_version); if (radio->hardware_version < RADIO_HW_VERSION) { dev_warn(&intf->dev, - "This driver is known to work with hardware version %hu,\n", + "This driver is known to work with hardware version %u,\n", RADIO_HW_VERSION); dev_warn(&intf->dev, - "but the device has hardware version %hu.\n", + "but the device has hardware version %u.\n", radio->hardware_version); version_warning = 1; } From patchwork Wed Nov 24 19:13:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 12637513 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 B32DBC43217 for ; Wed, 24 Nov 2021 19:13:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351179AbhKXTQt (ORCPT ); Wed, 24 Nov 2021 14:16:49 -0500 Received: from mail.kernel.org ([198.145.29.99]:52854 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351108AbhKXTQl (ORCPT ); Wed, 24 Nov 2021 14:16:41 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 62A5B6108B; Wed, 24 Nov 2021 19:13:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1637781211; bh=CblGAAA0HB3TFPgoKWXzvvSTEoAZI59ofB49F09VVUQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FXVZ1rUKh16GX094m7MK9NIVs0ZwimtcdOx8+ea3ZsMjwThLQb68ct6GzmwFxKlaQ NmTrRh5158Y20t4XqSxJbO5WyYV4q6RTBcm4CKduVBpXGXhiVnncdGdRb9mxryy9hW LPQcNrX6k54/9Y5YwFfVdHg78AWW2+yimxjdGcNhZcv9Jefo2nnnkZ676EEUTVlv8R w55Q7fqTGoeGUdvjrWX86DUUz5KuXpLkRUcKvkkgTFP0OfRp9GvslnGxbrTckg9p2j Xcb+orc+I5oZXwwP2es1poLe845AYZZLpgHQfPfPSYGFMhgQzNgnXobmxXZSGjNNrj QiTLhJBU0vufQ== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mpxhs-004Q5X-Je; Wed, 24 Nov 2021 20:13:24 +0100 From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Hans Verkuil , Mauro Carvalho Chehab , Xiaofeng Cao , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Subject: [PATCH 10/20] media: radio-si476x: drop a container_of() abstraction macro Date: Wed, 24 Nov 2021 20:13:13 +0100 Message-Id: <85bd768b1525f29a5710c2139bfa241fc7565fe1.1637781097.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org This isn't used anywhere. So, drop it. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Nathan Chancellor --- To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH 00/20] at: https://lore.kernel.org/all/cover.1637781097.git.mchehab+huawei@kernel.org/ drivers/media/radio/radio-si476x.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/media/radio/radio-si476x.c b/drivers/media/radio/radio-si476x.c index b39a68f83c5f..0bf99e1cd1d8 100644 --- a/drivers/media/radio/radio-si476x.c +++ b/drivers/media/radio/radio-si476x.c @@ -312,12 +312,6 @@ struct si476x_radio { u32 audmode; }; -static inline struct si476x_radio * -v4l2_dev_to_radio(struct v4l2_device *d) -{ - return container_of(d, struct si476x_radio, v4l2dev); -} - static inline struct si476x_radio * v4l2_ctrl_handler_to_radio(struct v4l2_ctrl_handler *d) { From patchwork Wed Nov 24 19:13:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 12637511 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 8DAD1C433F5 for ; Wed, 24 Nov 2021 19:13:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351267AbhKXTQs (ORCPT ); Wed, 24 Nov 2021 14:16:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:52870 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351111AbhKXTQm (ORCPT ); Wed, 24 Nov 2021 14:16:42 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6B7186109E; Wed, 24 Nov 2021 19:13:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1637781211; bh=A9kzMO8wWtY/42/gi65g4Ok6WX2I/r/77pq5M1BvF/Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nWzaRJfL/smkHVo1lgXZUiu5xpz7mynotbLWo/PC0Wbl9JL+CRb/0mIJHSsS7xBbg DXiPXy0mE31qaOGrOBgrk0SwhV61ECRNq3rTsKZalQAu/HK3legGwzJPAsdL5O9HWz 3FYhOJRDTpLSkFgSjtszIDGayvnKYC9bTz+GC0wXPOl8FtOSIZvDmrPG9JIBCPw1yg R/4kLwRNVMTYiWvji71ZMa90WrCWvtQFXIFRhslo6EtAamR4eNgPC5ocRfHA46lZTm U7By8CLcsjI3NZNmyYWYN6MYYu2GW86wSI7nrqbVVTL4MNv4wTICFxcNv2VKojSAx4 3ixkTWHj9e75Q== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mpxhs-004Q5b-K6; Wed, 24 Nov 2021 20:13:24 +0100 From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Malcolm Priestley , Mauro Carvalho Chehab , Nathan Chancellor , Nick Desaulniers , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH 11/20] media: lmedm04: don't ignore errors when setting a filter Date: Wed, 24 Nov 2021 20:13:14 +0100 Message-Id: <7da947b5433ecdd9cf1f2a50f4ae5cbc493dc844.1637781097.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Solves a clang warning Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Nathan Chancellor --- To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH 00/20] at: https://lore.kernel.org/all/cover.1637781097.git.mchehab+huawei@kernel.org/ drivers/media/usb/dvb-usb-v2/lmedm04.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c b/drivers/media/usb/dvb-usb-v2/lmedm04.c index fe4d886442a4..8a34e6c0d6a6 100644 --- a/drivers/media/usb/dvb-usb-v2/lmedm04.c +++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c @@ -423,6 +423,9 @@ static int lme2510_pid_filter_ctrl(struct dvb_usb_adapter *adap, int onoff) mutex_unlock(&d->i2c_mutex); + if (ret) + return -EREMOTEIO; + return 0; } From patchwork Wed Nov 24 19:13:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 12637505 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 B9A27C433EF for ; Wed, 24 Nov 2021 19:13:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351172AbhKXTQp (ORCPT ); Wed, 24 Nov 2021 14:16:45 -0500 Received: from mail.kernel.org ([198.145.29.99]:52798 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351103AbhKXTQl (ORCPT ); Wed, 24 Nov 2021 14:16:41 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6180261059; Wed, 24 Nov 2021 19:13:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1637781211; bh=gTRgvwSM8dbBnWYcx5UP6td6uAyzHJtfnz599HRc3s4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ac5XOsIKaSaoD3/o1PjrUfk4JgFs+YIKfP16uiqwETJ2SLLmy8cQ4grbdOiHGfFYm uON3F8I/mXltumZicA8f3QZ6XUbfjHy/nWMGjxp+dW0ngo104jLFM33ibp6XGkUYok EeKj+7nWLb79z0yI/Kf4PbipNmYI6ChI6TVRChrKX9QRU+vrMoQw4SESTvYW4xq7y6 zyt7cQBMh8cdrdS0YlfBpXkmih2rDoV11+XNN6dz2Q96/C52RpDmO11YbiDTsrtvZJ oVwKiYefQCvgZjIYuGBg+z1kTzc/wBePSHfVrwODPXuFLYnzSSZp8Zxbl3xwfB2nqb g9KODGd/AiyVg== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mpxhs-004Q5f-KZ; Wed, 24 Nov 2021 20:13:24 +0100 From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Subject: [PATCH 12/20] media: au0828-i2c: drop a duplicated function Date: Wed, 24 Nov 2021 20:13:15 +0100 Message-Id: <1c5aeba00713d643e6f5600090b68e3d3689c5dd.1637781097.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org This function is not used and it is identical to i2c_slave_did_read_ack(). So, just drop it. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Nathan Chancellor --- To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH 00/20] at: https://lore.kernel.org/all/cover.1637781097.git.mchehab+huawei@kernel.org/ drivers/media/usb/au0828/au0828-i2c.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/media/usb/au0828/au0828-i2c.c b/drivers/media/usb/au0828/au0828-i2c.c index 708f01ab47fa..749f90d73b5b 100644 --- a/drivers/media/usb/au0828/au0828-i2c.c +++ b/drivers/media/usb/au0828/au0828-i2c.c @@ -23,13 +23,6 @@ MODULE_PARM_DESC(i2c_scan, "scan i2c bus at insmod time"); #define I2C_WAIT_DELAY 25 #define I2C_WAIT_RETRY 1000 -static inline int i2c_slave_did_write_ack(struct i2c_adapter *i2c_adap) -{ - struct au0828_dev *dev = i2c_adap->algo_data; - return au0828_read(dev, AU0828_I2C_STATUS_201) & - AU0828_I2C_STATUS_NO_WRITE_ACK ? 0 : 1; -} - static inline int i2c_slave_did_read_ack(struct i2c_adapter *i2c_adap) { struct au0828_dev *dev = i2c_adap->algo_data; From patchwork Wed Nov 24 19:13:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 12637541 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 64E89C433EF for ; Wed, 24 Nov 2021 19:14:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351504AbhKXTRS (ORCPT ); Wed, 24 Nov 2021 14:17:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:52856 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351107AbhKXTQl (ORCPT ); Wed, 24 Nov 2021 14:16:41 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 73188610D1; Wed, 24 Nov 2021 19:13:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1637781211; bh=rsXGcPf9XgkX1szuElTLppvmJPyU9p+Qriu/8wbfjw4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mmCb0c+K0QulsiXzZf3WmTFX4vN8lAeLuai6JkamfeO11dISldKjdjy89ePl9Ozb8 UWlp3EvEyzmlrNp0RbfrdF+urQVy/kmh0Cf4bkqfULajcp6OCZLxPcfdTn6uQxELcE iiGO8JF4CyA7MOnS0rmm+iviKC+urtF0xI38ruvBuvAjDXoTKfMKJmhUXYdTZwpfUu LW8q++44Iz5utAM2lcPDCYI0ks4Bax7mOVb3c3T0jnB9T61exjIxP2LmRCm8Ohej8n m8e+Vh8EKb8TTtIp7NvQGILCZhX3Ne315kabHJflu6M9OppBjR2y3niB72pXr3yJ8E /bEwIWG/NOzQA== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mpxhs-004Q5k-L2; Wed, 24 Nov 2021 20:13:24 +0100 From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Hans Verkuil , Mauro Carvalho Chehab , Nathan Chancellor , Nick Desaulniers , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH 13/20] media: adv7604 add _maybe_unused to currently unused functions Date: Wed, 24 Nov 2021 20:13:16 +0100 Message-Id: X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org There are several unused helper macros there, meant to parse some fields. While there's not wrong with that, it generates clang warnings with W=1, causing build to break with CONFIG_WERROR. So, add __maybe_unused to fix such warnings. Signed-off-by: Mauro Carvalho Chehab --- To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH 00/20] at: https://lore.kernel.org/all/cover.1637781097.git.mchehab+huawei@kernel.org/ drivers/media/i2c/adv7604.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c index 44768b59a6ff..be95b2264221 100644 --- a/drivers/media/i2c/adv7604.c +++ b/drivers/media/i2c/adv7604.c @@ -398,14 +398,14 @@ static inline int io_write_clr_set(struct v4l2_subdev *sd, u8 reg, u8 mask, return io_write(sd, reg, (io_read(sd, reg) & ~mask) | val); } -static inline int avlink_read(struct v4l2_subdev *sd, u8 reg) +static inline int __maybe_unused avlink_read(struct v4l2_subdev *sd, u8 reg) { struct adv76xx_state *state = to_state(sd); return adv76xx_read_check(state, ADV7604_PAGE_AVLINK, reg); } -static inline int avlink_write(struct v4l2_subdev *sd, u8 reg, u8 val) +static inline int __maybe_unused avlink_write(struct v4l2_subdev *sd, u8 reg, u8 val) { struct adv76xx_state *state = to_state(sd); @@ -439,14 +439,14 @@ static inline int infoframe_read(struct v4l2_subdev *sd, u8 reg) return adv76xx_read_check(state, ADV76XX_PAGE_INFOFRAME, reg); } -static inline int infoframe_write(struct v4l2_subdev *sd, u8 reg, u8 val) +static inline int __maybe_unused infoframe_write(struct v4l2_subdev *sd, u8 reg, u8 val) { struct adv76xx_state *state = to_state(sd); return regmap_write(state->regmap[ADV76XX_PAGE_INFOFRAME], reg, val); } -static inline int afe_read(struct v4l2_subdev *sd, u8 reg) +static inline int __maybe_unused afe_read(struct v4l2_subdev *sd, u8 reg) { struct adv76xx_state *state = to_state(sd); @@ -479,14 +479,14 @@ static inline int rep_write_clr_set(struct v4l2_subdev *sd, u8 reg, u8 mask, u8 return rep_write(sd, reg, (rep_read(sd, reg) & ~mask) | val); } -static inline int edid_read(struct v4l2_subdev *sd, u8 reg) +static inline int __maybe_unused edid_read(struct v4l2_subdev *sd, u8 reg) { struct adv76xx_state *state = to_state(sd); return adv76xx_read_check(state, ADV76XX_PAGE_EDID, reg); } -static inline int edid_write(struct v4l2_subdev *sd, u8 reg, u8 val) +static inline int __maybe_unused edid_write(struct v4l2_subdev *sd, u8 reg, u8 val) { struct adv76xx_state *state = to_state(sd); @@ -570,7 +570,7 @@ static inline int hdmi_write_clr_set(struct v4l2_subdev *sd, u8 reg, u8 mask, u8 return hdmi_write(sd, reg, (hdmi_read(sd, reg) & ~mask) | val); } -static inline int test_write(struct v4l2_subdev *sd, u8 reg, u8 val) +static inline int __maybe_unused test_write(struct v4l2_subdev *sd, u8 reg, u8 val) { struct adv76xx_state *state = to_state(sd); @@ -601,14 +601,14 @@ static inline int cp_write_clr_set(struct v4l2_subdev *sd, u8 reg, u8 mask, u8 v return cp_write(sd, reg, (cp_read(sd, reg) & ~mask) | val); } -static inline int vdp_read(struct v4l2_subdev *sd, u8 reg) +static inline int __maybe_unused vdp_read(struct v4l2_subdev *sd, u8 reg) { struct adv76xx_state *state = to_state(sd); return adv76xx_read_check(state, ADV7604_PAGE_VDP, reg); } -static inline int vdp_write(struct v4l2_subdev *sd, u8 reg, u8 val) +static inline int __maybe_unused vdp_write(struct v4l2_subdev *sd, u8 reg, u8 val) { struct adv76xx_state *state = to_state(sd); From patchwork Wed Nov 24 19:13:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 12637507 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 A7723C433EF for ; Wed, 24 Nov 2021 19:13:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351230AbhKXTQs (ORCPT ); Wed, 24 Nov 2021 14:16:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:52872 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351113AbhKXTQm (ORCPT ); Wed, 24 Nov 2021 14:16:42 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7BDE5610E8; Wed, 24 Nov 2021 19:13:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1637781211; bh=s74V3GxdYYJTz+2GcE2sG2QwoR8/KQlxxxsyyTkQRCY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V7KMfkRFwLW8uAAPcabxno83SEf9MwBa8McDunMaV3aday6eJS0BluwutiKfdAQz/ TRia0Wq0ikGhGnjuhCFBAp2V8xcYdgTeUwGQ4xuzMMzH2PY2N7YWr+pHfWjzV0yKAo Fy6Pd00WnkKeafML4l+0Z+at/bJWoClro9XbdokF8Orjjaw1VIaP3TcSqWr9G88Krj BhIK1tQTQHXIs0ROZA/p1Uw5WBqMrSVfzyZ0tQrs9aoAeIu57cgwpws+8VXJDkw4L8 nuMbtLRa2QdpMEyz3Ql3NL/Jy3eyp6Q36qBL99JyRQWxJFa7HaAnxQY4azEiW+RKw6 eDxydcRL0CCeA== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mpxhs-004Q5o-LU; Wed, 24 Nov 2021 20:13:24 +0100 From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Hans Verkuil , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Subject: [PATCH 14/20] media: adv7511: drop unused functions Date: Wed, 24 Nov 2021 20:13:17 +0100 Message-Id: <031cdb0042f8239a6746831f5c8f89cf4aef6107.1637781097.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Those are aliases for another function and not used at the current implementation. So, just drop it. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Nathan Chancellor --- To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH 00/20] at: https://lore.kernel.org/all/cover.1637781097.git.mchehab+huawei@kernel.org/ drivers/media/i2c/adv7511-v4l2.c | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/drivers/media/i2c/adv7511-v4l2.c b/drivers/media/i2c/adv7511-v4l2.c index 41f4e749a859..8e13cae40ec5 100644 --- a/drivers/media/i2c/adv7511-v4l2.c +++ b/drivers/media/i2c/adv7511-v4l2.c @@ -270,28 +270,6 @@ static int adv7511_pktmem_rd(struct v4l2_subdev *sd, u8 reg) return adv_smbus_read_byte_data(state->i2c_pktmem, reg); } -static int adv7511_pktmem_wr(struct v4l2_subdev *sd, u8 reg, u8 val) -{ - struct adv7511_state *state = get_adv7511_state(sd); - int ret; - int i; - - for (i = 0; i < 3; i++) { - ret = i2c_smbus_write_byte_data(state->i2c_pktmem, reg, val); - if (ret == 0) - return 0; - } - v4l2_err(sd, "%s: i2c write error\n", __func__); - return ret; -} - -/* To set specific bits in the register, a clear-mask is given (to be AND-ed), - and then the value-mask (to be OR-ed). */ -static inline void adv7511_pktmem_wr_and_or(struct v4l2_subdev *sd, u8 reg, u8 clr_mask, u8 val_mask) -{ - adv7511_pktmem_wr(sd, reg, (adv7511_pktmem_rd(sd, reg) & clr_mask) | val_mask); -} - static inline bool adv7511_have_hotplug(struct v4l2_subdev *sd) { return adv7511_rd(sd, 0x42) & MASK_ADV7511_HPD_DETECT; From patchwork Wed Nov 24 19:13:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 12637539 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 DD14AC433EF for ; Wed, 24 Nov 2021 19:14:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351334AbhKXTRG (ORCPT ); Wed, 24 Nov 2021 14:17:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:53136 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351187AbhKXTQq (ORCPT ); Wed, 24 Nov 2021 14:16:46 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 715AE604D1; Wed, 24 Nov 2021 19:13:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1637781216; bh=gHNlvFuvp7pBQTa3UhrpW3kfmpC3Up1K10+Lv71IU4o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B31HiaKbFidWXbfwPrdvCnENO4dhSY92pcM0DGe/DJkc5c6xmYNhHkXsz0J03oRIU Gz7OeAbFyIKJ6qOMZ98m4Nl90fZxFSocPiBm3Fsz66JDwUwo07J1Q6reuxwYISdsYp COAilNJhQbSGKNDt0yS9+bnSpYhDGRFz3w5+R2Grt/8Mhloi4aP5L/Jda3NCdZJimI VX4SAYRAphY+iTjWu+h4WnewTTLmZN/uJjeXOIIiq4TgmWcjqnHUVa0a9P2LVjma7u J/5ro6ymzKCVzJd5yjGN9Me5+Le6GCye+3jxL7+B9zCrMPvrEv7vAY9nXivu1F1YHO faUm8jjnyB5wA== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mpxhs-004Q5r-M0; Wed, 24 Nov 2021 20:13:24 +0100 From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Manivannan Sadhasivam , Mauro Carvalho Chehab , Nathan Chancellor , Nick Desaulniers , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH 15/20] media: imx290: mark read reg function as __maybe_unused Date: Wed, 24 Nov 2021 20:13:18 +0100 Message-Id: <163ccefbbdf07512fe1a84c1531754df75a64378.1637781097.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Such function is currently unused, but could be needed in the future. So, keep it, marking it as __maybe_unused, in order to avoid a clang W=1 error. Signed-off-by: Mauro Carvalho Chehab --- To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH 00/20] at: https://lore.kernel.org/all/cover.1637781097.git.mchehab+huawei@kernel.org/ drivers/media/i2c/imx290.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/imx290.c b/drivers/media/i2c/imx290.c index bf7a6c37ca5d..caab830f8c72 100644 --- a/drivers/media/i2c/imx290.c +++ b/drivers/media/i2c/imx290.c @@ -363,7 +363,7 @@ static inline struct imx290 *to_imx290(struct v4l2_subdev *_sd) return container_of(_sd, struct imx290, sd); } -static inline int imx290_read_reg(struct imx290 *imx290, u16 addr, u8 *value) +static inline int __maybe_unused imx290_read_reg(struct imx290 *imx290, u16 addr, u8 *value) { unsigned int regval; int ret; From patchwork Wed Nov 24 19:13:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 12637535 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 E5339C4332F for ; Wed, 24 Nov 2021 19:13:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351177AbhKXTRD (ORCPT ); Wed, 24 Nov 2021 14:17:03 -0500 Received: from mail.kernel.org ([198.145.29.99]:53146 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351188AbhKXTQq (ORCPT ); Wed, 24 Nov 2021 14:16:46 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 743106101D; Wed, 24 Nov 2021 19:13:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1637781216; bh=BVy8LxPgjJhwYfZYArqytmdzHj8T7GuBuT8nt7c89XM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=koiubTcPPYoitRgtbq7KMcXFaXkrkFRBIxBgv/kwfEDIAynEnMEgPTzg9sCDBolhz HtpouwfLfjNt5k46eHao6f6AFLWKRG7+gNXaCprdHKOXJw9pYEmlev5X0ZdJ4KTf89 HE7qNtP7vxhsF7AXVtX5pu99MR1rzZPQuuFtZ5gcTyHtgBmKboK4MnDwRo5rtH1DFf 0P2yKOI49+XfMlYTI7sTs8yQASktGpLXDs/yOmeE1ZtoUj0JOaPFPKNEtzULnpFwpt nGeBa8JqCVC/nf6xP2BGRjQ0/mZKqKTPzj9TKPTapdz9AhhHx/ZCmuyInRP1/wAozq e3TkB98ncOz6Q== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mpxhs-004Q5u-MR; Wed, 24 Nov 2021 20:13:24 +0100 From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , "Lad, Prabhakar" , Mauro Carvalho Chehab , Nathan Chancellor , Nick Desaulniers , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH 16/20] media: davinci: vpbe_osd: mark read reg function as __maybe_unused Date: Wed, 24 Nov 2021 20:13:19 +0100 Message-Id: <7236261ada02edac81d05d8c08864d7aed8f2bfd.1637781097.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Such function is currently unused, but could be needed in the future. So, keep it, marking it as __maybe_unused, in order to avoid a clang W=1 error. Signed-off-by: Mauro Carvalho Chehab --- To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH 00/20] at: https://lore.kernel.org/all/cover.1637781097.git.mchehab+huawei@kernel.org/ drivers/media/platform/davinci/vpbe_osd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/davinci/vpbe_osd.c b/drivers/media/platform/davinci/vpbe_osd.c index 91b571a0ac2c..6b36cae5e6c1 100644 --- a/drivers/media/platform/davinci/vpbe_osd.c +++ b/drivers/media/platform/davinci/vpbe_osd.c @@ -45,7 +45,7 @@ static const struct platform_device_id vpbe_osd_devtype[] = { MODULE_DEVICE_TABLE(platform, vpbe_osd_devtype); /* register access routines */ -static inline u32 osd_read(struct osd_state *sd, u32 offset) +static inline u32 __maybe_unused osd_read(struct osd_state *sd, u32 offset) { struct osd_state *osd = sd; From patchwork Wed Nov 24 19:13:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 12637537 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 1918FC433F5 for ; Wed, 24 Nov 2021 19:14:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351205AbhKXTRF (ORCPT ); Wed, 24 Nov 2021 14:17:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:53154 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351196AbhKXTQq (ORCPT ); Wed, 24 Nov 2021 14:16:46 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8167561057; Wed, 24 Nov 2021 19:13:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1637781216; bh=RqPUjoOPCU3I2CzaPrffX4izZPgRyIi+ecwcGiqNlSo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T6b9U6ea/cOFBpV7kurTKz2bAtK7TzZvfKZqUlaCB3gd88m/IbufB3jamUitTa8bk csFAQCVghwLeaHtnBdfbJFHQMeb+N2F0qPuvJqayo+tR5C9MFqgI7oM6Nu4csceLcP TE9Z5MePY0fYqCENrCtVglkuUUrgxX3uT5E5/YCRn0Buc450gEPxA4dmaS9je7oSm/ A6qrTjRiEspLL9X7sq6fYk3DdZidsQhUY1FR6KAk2fU2eZYkwD9ONnjO6XekVhZwjw 6DfSc5h4xDvwZwVYw7MLEGPw6fhlj3Un3HnEJrRu/zyrHbtXoeCJkA6fdIR2DJNzqO x89WTLJ4S7P7g== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mpxhs-004Q5x-Mz; Wed, 24 Nov 2021 20:13:24 +0100 From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Andy Gross , Bjorn Andersson , Mauro Carvalho Chehab , Nathan Chancellor , Nick Desaulniers , Robert Foss , Todor Tomov , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH 17/20] media: qcom: camss: mark read reg function as __maybe_unused Date: Wed, 24 Nov 2021 20:13:20 +0100 Message-Id: X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Such function is currently unused, but could be needed in the future. So, keep it, marking it as __maybe_unused, in order to avoid a clang W=1 error. Signed-off-by: Mauro Carvalho Chehab --- To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH 00/20] at: https://lore.kernel.org/all/cover.1637781097.git.mchehab+huawei@kernel.org/ drivers/media/platform/qcom/camss/camss-vfe-170.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/qcom/camss/camss-vfe-170.c b/drivers/media/platform/qcom/camss/camss-vfe-170.c index 5c083d70d495..455ae1a819e6 100644 --- a/drivers/media/platform/qcom/camss/camss-vfe-170.c +++ b/drivers/media/platform/qcom/camss/camss-vfe-170.c @@ -191,7 +191,7 @@ static u32 vfe_hw_version(struct vfe_device *vfe) return hw_version; } -static inline void vfe_reg_clr(struct vfe_device *vfe, u32 reg, u32 clr_bits) +static inline void __maybe_unused vfe_reg_clr(struct vfe_device *vfe, u32 reg, u32 clr_bits) { u32 bits = readl_relaxed(vfe->base + reg); From patchwork Wed Nov 24 19:13:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 12637533 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 3572DC433EF for ; Wed, 24 Nov 2021 19:13:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351287AbhKXTQ6 (ORCPT ); Wed, 24 Nov 2021 14:16:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:53250 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351245AbhKXTQs (ORCPT ); Wed, 24 Nov 2021 14:16:48 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8C7876109E; Wed, 24 Nov 2021 19:13:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1637781216; bh=7ACxNdIYeMx8BUyKvevWfbu+SlAB3f7acPwte6T0ctw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UvF1O2K2wz8dTg8lVTJTsof9T5iLyiw4owWRk2izeBHKRcG+Abhny1WbI4EmdgzAD U5a0pKb0WQcWlAi4Io5/jfeS2d2w4zE6yWNec3/1tIl/hTHESOx7082s0y/H8GC6T9 d6+kAcc0gUG/mbbEdvxN53xxP1ATPmlgS+wL1hqWXaxE4nLhB9Lri2pCi/aZBhfdvU AIf7snghwdHLS9B6FuqViHSDnYuA/qP8tGcRr7yPEJdtahQhrp+xLIWvgGS0RWR+e2 WLVJHbaUUExcGZtWYgkl5wcXfK2WUKVK79AN3njb0ba9nwyHqcmuhSadFb8b+8qZmd SpqY/WqAY6kIQ== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mpxhs-004Q60-Nr; Wed, 24 Nov 2021 20:13:24 +0100 From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Andrew-CT Chen , Houlong Wei , Matthias Brugger , Mauro Carvalho Chehab , Minghsiu Tsai , Nathan Chancellor , Nick Desaulniers , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-mediatek@lists.infradead.org, llvm@lists.linux.dev Subject: [PATCH 18/20] media: mtk-mdp: address a clang warning Date: Wed, 24 Nov 2021 20:13:21 +0100 Message-Id: <63ecb865c4f2b81862f5e6ac0dea497d3e0baca3.1637781097.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The typecasts at the dvb-core generate clang warnings when W=1 is enabled. Such warning is harmless, but it causes the build to break with CONFIG_WERROR and W=1 with clang, so do the cast on a way that it won't produce warnings anymore. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Arnd Bergmann --- To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH 00/20] at: https://lore.kernel.org/all/cover.1637781097.git.mchehab+huawei@kernel.org/ drivers/media/platform/mtk-mdp/mtk_mdp_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c index 976aa1f4829b..11285717577f 100644 --- a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c +++ b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c @@ -148,7 +148,7 @@ static int mtk_mdp_probe(struct platform_device *pdev) continue; } - comp_type = (enum mtk_mdp_comp_type)of_id->data; + comp_type = (long)of_id->data; comp = devm_kzalloc(dev, sizeof(*comp), GFP_KERNEL); if (!comp) { From patchwork Wed Nov 24 19:13:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 12637515 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 46606C433EF for ; Wed, 24 Nov 2021 19:13:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351181AbhKXTQu (ORCPT ); Wed, 24 Nov 2021 14:16:50 -0500 Received: from mail.kernel.org ([198.145.29.99]:53126 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351186AbhKXTQq (ORCPT ); Wed, 24 Nov 2021 14:16:46 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 66A93601FA; Wed, 24 Nov 2021 19:13:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1637781216; bh=xF2TmJGxWdp9cd88FGUNpQVb/0Ad7bsiidrScjdYCZM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eA1rMYWEsfjSTj7tJcG44cWjKuq39FihjZNnOPOOYku/294JwGh4EfcxwCJNV+gx9 83WIyZ1h1gbdKoaXe0nTS8jp4yArn34K3FHTsAf32BilhbsoLVnsBqxxO8q3MruZn9 aIx4fCf58a1/n1QWpBzod0s9Y9rnLo89qmAJJ47PCFnS4jyiNb96wgtY72+ScL3zGg o56vioNQTwmEoY6itDnp+IV4ZlnfGNPjnOtE6ezwZXW22ztjxDb2gJLCCBTKmOPh+D e17Qvy718LMm8PHK6ylBQHwv+1w3fwRaIRfltV2Q9BMunu5e+n69Dm8EU7KhzKxYTK K8PEa/aLjUsAg== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mpxhs-004Q63-OK; Wed, 24 Nov 2021 20:13:24 +0100 From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Hans Verkuil , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Subject: [PATCH 19/20] media: cobalt: drop an unused variable Date: Wed, 24 Nov 2021 20:13:22 +0100 Message-Id: X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The clock_control value is read but never actually used. Based on a comment at the code, it has to be reset at the function. So, drop the variable that stores its value. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Nathan Chancellor --- To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH 00/20] at: https://lore.kernel.org/all/cover.1637781097.git.mchehab+huawei@kernel.org/ drivers/media/pci/cobalt/cobalt-cpld.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/media/pci/cobalt/cobalt-cpld.c b/drivers/media/pci/cobalt/cobalt-cpld.c index 3d8026483ac3..fad882459d23 100644 --- a/drivers/media/pci/cobalt/cobalt-cpld.c +++ b/drivers/media/pci/cobalt/cobalt-cpld.c @@ -236,7 +236,6 @@ bool cobalt_cpld_set_freq(struct cobalt *cobalt, unsigned f_out) u8 n1, hsdiv; u8 regs[6]; int found = 0; - u16 clock_ctrl; int retries = 3; for (i = 0; i < ARRAY_SIZE(multipliers); i++) { @@ -260,9 +259,7 @@ bool cobalt_cpld_set_freq(struct cobalt *cobalt, unsigned f_out) hsdiv = multipliers[i_best].hsdiv - 4; rfreq = div_u64(dco << 28, f_xtal); - clock_ctrl = cpld_read(cobalt, SI570_CLOCK_CTRL); - clock_ctrl |= S01755_REG_CLOCK_CTRL_BITMAP_CLKHSMA_FPGA_CTRL; - clock_ctrl |= S01755_REG_CLOCK_CTRL_BITMAP_CLKHSMA_EN; + cpld_read(cobalt, SI570_CLOCK_CTRL); regs[0] = (hsdiv << 5) | (n1 >> 2); regs[1] = ((n1 & 0x3) << 6) | (rfreq >> 32); From patchwork Wed Nov 24 19:13:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 12637517 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 5E2FFC4332F for ; Wed, 24 Nov 2021 19:13:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351320AbhKXTQv (ORCPT ); Wed, 24 Nov 2021 14:16:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:53152 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351191AbhKXTQq (ORCPT ); Wed, 24 Nov 2021 14:16:46 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 814B361055; Wed, 24 Nov 2021 19:13:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1637781216; bh=g8A7lF8+fn2PzwFNuJ8BU8zrppsHJw1vl6cD4Y+Gc90=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V1M9K5IOWLaPJer8zHJZ7NWArxUY3c79AaeieiD4VE6GtTgPwMLMpZqZGclkswBoY KjrhnyMeXrevCRgF05KmnYrk/4Jnt8lGmyLw13TAOXsCvi3hL1r3GLBILqLgj72cjd Rb1CctITyG9Okzl0s90hWkIz3MnCeMkmkSFREj1uzSY961vsNN/OIozrdxleqcTW8m 7L6rqGYjrfH5O5tUHn/FYJ9j5QnQvgERRvcMdGJ6p4gdJ8soFJBs9ovYEAu9n3sYuP JKMggaJOj5tkoZEmYKDTSSl2pUGc6kG5/bStnrXo7pcNa4+saHE+dsVz9crkSdDEvr ZXjqanOV1QXZg== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mpxhs-004Q66-Oo; Wed, 24 Nov 2021 20:13:24 +0100 From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Bixuan Cui , Mauro Carvalho Chehab , Nathan Chancellor , Nick Desaulniers , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH 20/20] media: mxl5005s: drop some dead code Date: Wed, 24 Nov 2021 20:13:23 +0100 Message-Id: X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org As reported by clang (with W=1), the ctrlVal var is never used. Yet, there are even some loops to estimate it. As this is dead code, remove it. If ever needed, someone could revert this patch. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Nathan Chancellor --- To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH 00/20] at: https://lore.kernel.org/all/cover.1637781097.git.mchehab+huawei@kernel.org/ drivers/media/tuners/mxl5005s.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/media/tuners/mxl5005s.c b/drivers/media/tuners/mxl5005s.c index f6e82a8e7d37..ab4c43df9d18 100644 --- a/drivers/media/tuners/mxl5005s.c +++ b/drivers/media/tuners/mxl5005s.c @@ -3414,9 +3414,8 @@ static u16 MXL_ControlWrite_Group(struct dvb_frontend *fe, u16 controlNum, u32 value, u16 controlGroup) { struct mxl5005s_state *state = fe->tuner_priv; - u16 i, j, k; + u16 i, j; u32 highLimit; - u32 ctrlVal; if (controlGroup == 1) /* Initial Control */ { @@ -3432,9 +3431,6 @@ static u16 MXL_ControlWrite_Group(struct dvb_frontend *fe, u16 controlNum, (u8)(state->Init_Ctrl[i].bit[j]), (u8)((value>>j) & 0x01)); } - ctrlVal = 0; - for (k = 0; k < state->Init_Ctrl[i].size; k++) - ctrlVal += state->Init_Ctrl[i].val[k] * (1 << k); } else return -1; } @@ -3454,9 +3450,6 @@ static u16 MXL_ControlWrite_Group(struct dvb_frontend *fe, u16 controlNum, (u8)(state->CH_Ctrl[i].bit[j]), (u8)((value>>j) & 0x01)); } - ctrlVal = 0; - for (k = 0; k < state->CH_Ctrl[i].size; k++) - ctrlVal += state->CH_Ctrl[i].val[k] * (1 << k); } else return -1; } @@ -3477,11 +3470,6 @@ static u16 MXL_ControlWrite_Group(struct dvb_frontend *fe, u16 controlNum, (u8)(state->MXL_Ctrl[i].bit[j]), (u8)((value>>j) & 0x01)); } - ctrlVal = 0; - for (k = 0; k < state->MXL_Ctrl[i].size; k++) - ctrlVal += state-> - MXL_Ctrl[i].val[k] * - (1 << k); } else return -1; }