From nobody Sun Sep 22 13:36:10 2024 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 C0481C433FE for ; Mon, 29 Nov 2021 10:08:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350265AbhK2KLv (ORCPT ); Mon, 29 Nov 2021 05:11:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237649AbhK2KJu (ORCPT ); Mon, 29 Nov 2021 05:09:50 -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 D488DC0698C7; Mon, 29 Nov 2021 01:47:58 -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 A514BB80E5F; Mon, 29 Nov 2021 09:47:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 423C5C004E1; Mon, 29 Nov 2021 09:47:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638179276; bh=f974R1GQ3CA5550xZG/h8JPur17WQ/6bdI+wsFzXxXc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UC/HYEx9ROToK4CsU5X1Z/pKq3l907BaT/JNjG8PpzYohI9FVKbv9/DWgKKtmEuJ+ SmP6YnIiI/YmabhfgB7aTpUhk6LJ6YukEk1vbBMbwwmXw0oJDzXnHAeWC7KEvPUlr4 ml3rI9uf/SuSRiMjRYGEIYaAN8tNVCT3ucc6IHKFjknpFPmfbVlxyyfncRrrivh4ts TlHQamih1drbR2WfBSNLQFRxiDG7RcSAsT3pY1ZjxVpSlhxjQY4Q/iu7lSX8X4/Sk1 2c49spSnMWczXflCwFKwyyCxho35mWWS4y4nwZY5vEylleuYdBoIU7skGUFbohiylC 4E/5s3LBFJ2yw== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mrdGM-000RAw-4S; Mon, 29 Nov 2021 10:47:54 +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 v2 01/20] media: adv7842: get rid of two unused functions Date: Mon, 29 Nov 2021 10:47:33 +0100 Message-Id: X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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=3D1. Reviewed-by: Nathan Chancellor Signed-off-by: Mauro Carvalho Chehab --- See [PATCH v2 00/20] at: https://lore.kernel.org/all/cover.1638179135.git.m= chehab+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_c= trl *ctrl) return &container_of(ctrl->handler, struct adv7842_state, hdl)->sd; } =20 -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); } =20 -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); --=20 2.33.1 From nobody Sun Sep 22 13:36:10 2024 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 3F29EC4332F for ; Mon, 29 Nov 2021 10:08:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352907AbhK2KMB (ORCPT ); Mon, 29 Nov 2021 05:12:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237047AbhK2KJ5 (ORCPT ); Mon, 29 Nov 2021 05:09:57 -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 F1132C0698CB; Mon, 29 Nov 2021 01:47:58 -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 B7D97B80E61; Mon, 29 Nov 2021 09:47:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5453AC53FAD; Mon, 29 Nov 2021 09:47:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638179276; bh=k/r/HEftU56EeEP2U5xn5dg4W7rEwcQiF7pmRR/y6tE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Njibk+EORllBjF9kVb+169wlt6RjTpgLm6rzZgdaZWthQrMe/1OaoW7ewzdKwgPlu wHSkuYANdXAJbqAnlFol+3opi3u4MiUBEqBdlUt6zlehYNNt1pJMVNOGqRs+6FvPx1 F8ZDTeUstIRjUsQ9xdap3qdZCv7afdffharO+BwN7OBmhinaeWuBi5A9lshOiIOHwf K9FSjZIevwXHUHwrcz+8JNJs2bsqp0aW/QRpXPpaWnI5Wc3qnXVcj/fO2cZNQH3zfU iiCKmA02+wezuPwUzpcMCrAjfFviUWnYByV4o84F4bsX5qVkPOx2kP1Zn/G3ihTyFm wQDo3w7o3dOTw== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mrdGM-000RAz-5t; Mon, 29 Nov 2021 10:47:54 +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 v2 02/20] media: saa7134-go7007: get rid of to_state() function Date: Mon, 29 Nov 2021 10:47:34 +0100 Message-Id: <8efe1d7c0023ce124fa9984095f5bc7198c71c82.1638179135.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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=3D1 warning. Reviewed-by: Nathan Chancellor Signed-off-by: Mauro Carvalho Chehab --- See [PATCH v2 00/20] at: https://lore.kernel.org/all/cover.1638179135.git.m= chehab+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; }; =20 -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 =3D { .flags =3D 0, .sensor_flags =3D 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 =3D to_state(sd); + struct saa7134_go7007 *saa =3D container_of(sd, struct saa7134_go7007, sd= ); struct saa7134_dev *dev =3D saa->dev; =20 return saa7134_s_std_internal(dev, NULL, norm); --=20 2.33.1 From nobody Sun Sep 22 13:36:10 2024 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 7A13EC433EF for ; Mon, 29 Nov 2021 10:08:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352333AbhK2KL7 (ORCPT ); Mon, 29 Nov 2021 05:11:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237431AbhK2KJy (ORCPT ); Mon, 29 Nov 2021 05:09:54 -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 E5ACBC0698CA; Mon, 29 Nov 2021 01:47:58 -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 B3105B80E29; Mon, 29 Nov 2021 09:47:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 50E90C53FCF; Mon, 29 Nov 2021 09:47:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638179276; bh=rzDLCKSxsaxbNkqeAch3s8qyQjDd6iwHRnT2T+rfJhg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tbxD8oa5Sg6I8rmBkL1nzKCY+Z87YxDK1bnmirgGiJEY2oJspfGWfpNzs+Y0hzyqo ET0hwq9SmZL2t3f5bK9NX6nz0TMxYX3vJzn8dykWZnvEZSUYvP2KpLEW7noAYb1s/F v15Yol4e9CJ20HMB7w/zHhDi9mxgZnOwDTOg5+o13VBcIW6dErEKTtTREpqhZOKNkv QyDxCN7/tgobF+UC8v2H+BF22563JGFnu5Igd44nZib/l1EOdHdxZLsotNEfJjaPGk 5bMdeZLQ7iIWsfWPlLt16jgxFG5KYXLssqFgNETy4q/EtMvNRUkvTYdjc9pFXmHihO FklT4Naj5t4NQ== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mrdGM-000RB2-7U; Mon, 29 Nov 2021 10:47:54 +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, Nathan Chancellor Subject: [PATCH v2 03/20] media: davinci: get rid of an unused function Date: Mon, 29 Nov 2021 10:47:35 +0100 Message-Id: <7447911ef26de9ac73265df6aee306fbe59691a0.1638179135.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" vpif_get_default_field() seems to be some left-over from a past code that sets the field order. Reviewed-by: Nathan Chancellor Signed-off-by: Mauro Carvalho Chehab --- See [PATCH v2 00/20] at: https://lore.kernel.org/all/cover.1638179135.git.m= chehab+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 =3D vpifparams->std_info.stdid; } =20 -/** - * 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 =3D=3D VPIF_IF_RAW_BAYER) ? V4L2_FIELD_NONE : - V4L2_FIELD_INTERLACED; -} - /** * vpif_config_addr() - function to configure buffer address in vpif * @ch: channel ptr --=20 2.33.1 From nobody Sun Sep 22 13:36:10 2024 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 89B11C433FE for ; Mon, 29 Nov 2021 10:08:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353110AbhK2KMC (ORCPT ); Mon, 29 Nov 2021 05:12:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238876AbhK2KJ6 (ORCPT ); Mon, 29 Nov 2021 05:09:58 -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 089F0C0698CC; Mon, 29 Nov 2021 01:47:59 -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 C80B5B80E62; Mon, 29 Nov 2021 09:47:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5BD25C53FD0; Mon, 29 Nov 2021 09:47:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638179276; bh=Dl4PsWpdjqElHMy7Xe1wnMBXy8V8aqd1CbbHT17BCQs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XYOcXgDdgiySXP6eKKtxNnCx3F+qo8nNXnc3y8vqzZR4Ev+D+vBFHVqpyYfp3xxt7 JcwFNrWTH2VWQHd79Adu2pPgVxcU/IbYvaUGIqtXCk5d61eHhC5Bc1ek+of+Yo5LvW zZLOxHvAfovhoR5r/TiHB/MnzSaPdwx5tvOEWldJfvty3WRi1AP5rNt3/q8/GNDlCL Ct0e/WAKDfBnTakiopIfBToqrsQFsNzPmRu8Mym7ZDpCHvLLV4ZMvoAjpH6YCwCZBA rHxdYVSPaI+m7S+C0GqKwoSfcLY8M4RmH71D6PbsAvvW8b4tcWt1UhA5ZR7KWFEBHD M+Zuu0fhnXInQ== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mrdGM-000RB8-90; Mon, 29 Nov 2021 10:47:54 +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 v2 04/20] media: drxd: drop offset var from DownloadMicrocode() Date: Mon, 29 Nov 2021 10:47:36 +0100 Message-Id: <54a313c07f938258eba9038031b3bd4fb64712c0.1638179135.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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=3D1 clang warning. Reviewed-by: Nathan Chancellor Signed-off-by: Mauro Carvalho Chehab --- See [PATCH v2 00/20] at: https://lore.kernel.org/all/cover.1638179135.git.m= chehab+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-fr= ontends/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 =3D 0; int i, status =3D 0; =20 pSrc =3D (u8 *) pMCImage; /* We're not using Flags */ /* Flags =3D (pSrc[0] << 8) | pSrc[1]; */ pSrc +=3D sizeof(u16); - offset +=3D sizeof(u16); nBlocks =3D (pSrc[0] << 8) | pSrc[1]; pSrc +=3D sizeof(u16); - offset +=3D sizeof(u16); =20 for (i =3D 0; i < nBlocks; i++) { Address =3D (pSrc[0] << 24) | (pSrc[1] << 16) | (pSrc[2] << 8) | pSrc[3]; pSrc +=3D sizeof(u32); - offset +=3D sizeof(u32); =20 BlockSize =3D ((pSrc[0] << 8) | pSrc[1]) * sizeof(u16); pSrc +=3D sizeof(u16); - offset +=3D sizeof(u16); =20 /* We're not using Flags */ /* u16 Flags =3D (pSrc[0] << 8) | pSrc[1]; */ pSrc +=3D sizeof(u16); - offset +=3D sizeof(u16); =20 /* We're not using BlockCRC */ /* u16 BlockCRC =3D (pSrc[0] << 8) | pSrc[1]; */ pSrc +=3D sizeof(u16); - offset +=3D sizeof(u16); =20 status =3D WriteBlock(state, Address, BlockSize, pSrc, DRX_I2C_CLEARCRC); if (status < 0) break; pSrc +=3D BlockSize; - offset +=3D BlockSize; } =20 return status; --=20 2.33.1 From nobody Sun Sep 22 13:36:10 2024 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 C215DC433F5 for ; Mon, 29 Nov 2021 10:07:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243770AbhK2KKz (ORCPT ); Mon, 29 Nov 2021 05:10:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243537AbhK2KIy (ORCPT ); Mon, 29 Nov 2021 05:08:54 -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 08B68C0698C2; Mon, 29 Nov 2021 01:47:58 -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 8782E61263; Mon, 29 Nov 2021 09:47:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 64E37C53FD4; Mon, 29 Nov 2021 09:47:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638179276; bh=Fp7arA5lBUk6fO+z1FEqsXv9rP6Nf7CrzZDn+sfxLds=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X1ruu5h3vaAuIaDwY2Y7R357Md4qbqysmgOA2tTiziJsy+WBnTgSNpSGAKlwqL/a2 AW12kPHjgcVylpo9lehquP4lBlAPuda4ESqJ3BMG8vTKdSn3QkA6mzARZf70Tujq9n j5MkW+Xcy7qmABb6uwy4RaUyzMeVRhDxHPOn3TRDpk1m3gTdkDvSTmptU6uZ49BWUM UQNpjQ/MCZzca+HEF0HX/5HXXoM4eyazantRBZU5R5jAbJHOqt7T8ggc0W3JykwyAT CzEXWOZYAHYRxyjrExMlPPzN+a0NDKmdXjLuMVBZxe1+uKheTE/IdnNq4UU4vDVExB eANb/wNGOSLhQ== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mrdGM-000RBC-Aa; Mon, 29 Nov 2021 10:47:54 +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 v2 05/20] media: drxk: drop operation_mode from set_dvbt() Date: Mon, 29 Nov 2021 10:47:37 +0100 Message-Id: <28e38377afa7535cb1ede125b8aa987bbf9b4f27.1638179135.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" This var is set, but never used. So, drop it. Signed-off-by: Mauro Carvalho Chehab --- See [PATCH v2 00/20] at: https://lore.kernel.org/all/cover.1638179135.git.m= chehab+huawei@kernel.org/ drivers/media/dvb-frontends/drxk_hard.c | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/drivers/media/dvb-frontends/drxk_hard.c b/drivers/media/dvb-fr= ontends/drxk_hard.c index d7fc2595f15b..9430295a8175 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 int= ermediate_freqk_hz, { u16 cmd_result =3D 0; u16 transmission_params =3D 0; - u16 operation_mode =3D 0; u32 iqm_rc_rate_ofs =3D 0; u32 bandwidth =3D 0; u16 param1; @@ -3759,10 +3758,8 @@ static int set_dvbt(struct drxk_state *state, u16 in= termediate_freqk_hz, /* mode */ switch (state->props.transmission_mode) { case TRANSMISSION_MODE_AUTO: - default: - operation_mode |=3D OFDM_SC_RA_RAM_OP_AUTO_MODE__M; - fallthrough; /* try first guess DRX_FFTMODE_8K */ case TRANSMISSION_MODE_8K: + default: transmission_params |=3D OFDM_SC_RA_RAM_OP_PARAM_MODE_8K; break; case TRANSMISSION_MODE_2K: @@ -3773,9 +3770,7 @@ static int set_dvbt(struct drxk_state *state, u16 int= ermediate_freqk_hz, /* guard */ switch (state->props.guard_interval) { default: - case GUARD_INTERVAL_AUTO: - operation_mode |=3D OFDM_SC_RA_RAM_OP_AUTO_GUARD__M; - fallthrough; /* try first guess DRX_GUARD_1DIV4 */ + case GUARD_INTERVAL_AUTO: /* try first guess DRX_GUARD_1DIV4 */ case GUARD_INTERVAL_1_4: transmission_params |=3D OFDM_SC_RA_RAM_OP_PARAM_GUARD_4; break; @@ -3794,11 +3789,7 @@ static int set_dvbt(struct drxk_state *state, u16 in= termediate_freqk_hz, switch (state->props.hierarchy) { case HIERARCHY_AUTO: case HIERARCHY_NONE: - default: - operation_mode |=3D OFDM_SC_RA_RAM_OP_AUTO_HIER__M; - /* try first guess SC_RA_RAM_OP_PARAM_HIER_NO */ - /* transmission_params |=3D OFDM_SC_RA_RAM_OP_PARAM_HIER_NO; */ - fallthrough; + default: /* try first guess SC_RA_RAM_OP_PARAM_HIER_NO */ case HIERARCHY_1: transmission_params |=3D OFDM_SC_RA_RAM_OP_PARAM_HIER_A1; break; @@ -3814,9 +3805,7 @@ static int set_dvbt(struct drxk_state *state, u16 int= ermediate_freqk_hz, /* modulation */ switch (state->props.modulation) { case QAM_AUTO: - default: - operation_mode |=3D OFDM_SC_RA_RAM_OP_AUTO_CONST__M; - fallthrough; /* try first guess DRX_CONSTELLATION_QAM64 */ + default: /* try first guess DRX_CONSTELLATION_QAM64 */ case QAM_64: transmission_params |=3D OFDM_SC_RA_RAM_OP_PARAM_CONST_QAM64; break; @@ -3857,9 +3846,7 @@ static int set_dvbt(struct drxk_state *state, u16 int= ermediate_freqk_hz, /* coderate */ switch (state->props.code_rate_HP) { case FEC_AUTO: - default: - operation_mode |=3D OFDM_SC_RA_RAM_OP_AUTO_RATE__M; - fallthrough; /* try first guess DRX_CODERATE_2DIV3 */ + default: /* try first guess DRX_CODERATE_2DIV3 */ case FEC_2_3: transmission_params |=3D OFDM_SC_RA_RAM_OP_PARAM_RATE_2_3; break; --=20 2.33.1 From nobody Sun Sep 22 13:36:10 2024 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 BDF42C433EF for ; Mon, 29 Nov 2021 09:50:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245562AbhK2Jxx (ORCPT ); Mon, 29 Nov 2021 04:53:53 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:34590 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245375AbhK2JvQ (ORCPT ); Mon, 29 Nov 2021 04:51: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 ams.source.kernel.org (Postfix) with ESMTPS id 4B766B80E66; Mon, 29 Nov 2021 09:47:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 78D07C58324; Mon, 29 Nov 2021 09:47:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638179276; bh=55eT3wgWOJhie6F7iqSlU4bA4FiL270RS5JqRpvLTyY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZDZBxWs/BcZKGatNB4UlPCgcj4fLrgtWWovVsjozNIUXdDPWJCyVj5ZrZE0pK7K3f RHQW7tBJLDfdtef2a300EVWrP5XnD5OkWNrX1IqAQr+C7BTgergTGJXAkRjVEfnhuR Tw5YCI5divZ9H1yEJ7E6XUZR92xXyme2NyL/y9KKe07EGb/X5gzJo+aPyyhTKSKYjK twTiw73T4LsRnmeEJYWwS/FzuXM57A4N9XWhqgOKhB3Mrn5ktWttWc00F1/iTfFnWK eO/IS9QeVXVTxSMj6P5YFws4pZ7iKaCtSG09GRghHBmCRSxOJE+/EF8RF3O5a/7bKO tkHWmpHfVJVfA== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mrdGM-000RBG-Bp; Mon, 29 Nov 2021 10:47:54 +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 v2 06/20] media: m88ds3103: drop reg11 calculus from m88ds3103b_select_mclk() Date: Mon, 29 Nov 2021 10:47:38 +0100 Message-Id: <535b7e2c4d48e14aed70b70231306b0f6263f103.1638179135.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" This value is never used at the code. So, drop it. Solves a W=3D1 clang warning. Reviewed-by: Nathan Chancellor Signed-off-by: Mauro Carvalho Chehab --- See [PATCH v2 00/20] at: https://lore.kernel.org/all/cover.1638179135.git.m= chehab+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-fr= ontends/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) =20 static int m88ds3103b_set_mclk(struct m88ds3103_dev *dev, u32 mclk_khz) { - u8 reg11 =3D 0x0A, reg15, reg16, reg1D, reg1E, reg1F, tmp; + u8 reg15, reg16, reg1D, reg1E, reg1F, tmp; u8 sm, f0 =3D 0, f1 =3D 0, f2 =3D 0, f3 =3D 0; u16 pll_div_fb, N; u32 div; @@ -480,8 +480,6 @@ static int m88ds3103b_set_mclk(struct m88ds3103_dev *de= v, u32 mclk_khz) div /=3D mclk_khz; =20 if (dev->cfg->ts_mode =3D=3D M88DS3103_TS_SERIAL) { - reg11 |=3D 0x02; - if (div <=3D 32) { N =3D 2; =20 @@ -532,8 +530,6 @@ static int m88ds3103b_set_mclk(struct m88ds3103_dev *de= v, u32 mclk_khz) else if ((f3 < 8) && (f3 !=3D 0)) f3 =3D 8; } else { - reg11 &=3D ~0x02; - if (div <=3D 32) { N =3D 2; =20 --=20 2.33.1 From nobody Sun Sep 22 13:36:10 2024 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 A0915C433F5 for ; Mon, 29 Nov 2021 10:07:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245573AbhK2KK7 (ORCPT ); Mon, 29 Nov 2021 05:10:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243281AbhK2KIy (ORCPT ); Mon, 29 Nov 2021 05:08:54 -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 20A21C0698C3; Mon, 29 Nov 2021 01:47:58 -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 B3AFA61265; Mon, 29 Nov 2021 09:47:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 79BDBC58325; Mon, 29 Nov 2021 09:47:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638179276; bh=INPTpNH82uZnt9Dd9GOkeIbAFEVs1Y0clSg4UoK9T8A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VsPOUxP1Fi7Th/1KlzEPtARVVMaRY6WLk9lWcaqVjJT/gA5PpcYArqyf0A+wqsfyU 8DbFAkOQWLhvgV0vTSN56Ld6f4w7CMcOsHBJ7Hf7NzgnOvSsXg4luYkkQWnSCfQNcg O1nA3mCgwDKCn2l2YV6VtFJY5UIACP/XQYi+iE+9vQcd0f9anaID8G0YCtgl+c1L3X gXBpcfIoSfRyKuIuuTo4hiz+eSKVJA3ew1wD3RxcfYAj1rvbRfqT08FkwlPMp3fd3P 600/Yj3jTKGmwxh2vmNm+JZUKf6q8G51yv+dY9iVD340C/Y2WJSXwg1hiQcLWeOCBU riVwaUIBBFFQA== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mrdGM-000RBK-Cu; Mon, 29 Nov 2021 10:47:54 +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 v2 07/20] media: si21xx: report eventual errors at set_frontend Date: Mon, 29 Nov 2021 10:47:39 +0100 Message-Id: X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 --- See [PATCH v2 00/20] at: https://lore.kernel.org/all/cover.1638179135.git.m= chehab+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-front= ends/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 =3D 0; =20 /* allowable sample rates for ADC in MHz */ int afs[ALLOWABLE_FS_COUNT] =3D { 200, 192, 193, 194, 195, @@ -747,8 +747,6 @@ static int si21xx_set_frontend(struct dvb_frontend *fe) rf_freq =3D 10 * c->frequency ; data_rate =3D c->symbol_rate / 100; =20 - status =3D PASS; - band_low =3D (rf_freq - lnb_lo) - ((lnb_uncertanity * 200) + (data_rate * 135)) / 200; =20 @@ -832,6 +830,9 @@ static int si21xx_set_frontend(struct dvb_frontend *fe) state->fs =3D sample_rate;/*ADC MHz*/ si21xx_setacquire(fe, c->symbol_rate, c->fec_inner); =20 + if (status) + return -EREMOTEIO; + return 0; } =20 --=20 2.33.1 From nobody Sun Sep 22 13:36:10 2024 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 6184BC433FE for ; Mon, 29 Nov 2021 09:50:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232045AbhK2Jxv (ORCPT ); Mon, 29 Nov 2021 04:53:51 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:53474 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245365AbhK2JvP (ORCPT ); Mon, 29 Nov 2021 04:51:15 -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 2A09E6127D; Mon, 29 Nov 2021 09:47:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8A78CC5832B; Mon, 29 Nov 2021 09:47:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638179276; bh=bKT/FVKdDsk92Wsk+85dta6QHDOvKgOzfD9WCfX8L6I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FGET6Rlq/s9hVQHlCp0AoUcH4AeYsxMjK2AjuejvrI0cSE+gxS1CAJPX7IFv6hIL4 JdNzQxMP8CWCui1BxxU5Umwqlcl7IQqqoMYMiPlvlTdxXy2OpCLU0Suo48aJ3kXUAQ 3q/e+vM4s+5BjBHD0wT3Q3qEgcM/wWR4zeLCIzxk7Dv4fMnD1lMQ2YWszvL4fEyycj DCEGoBBX7/Jh+32fECFenjGyfLsqo18nlKU/yLdZIJ/51+tZwrdAEUENkQHBoh1RcW Vuu2OmaOJie6eicbF/Jzkl0OIFO7HSukrXVyrbTo0MpgA4+duRM77rdQjRcZOVP7VD wQznjfqP9D2Aw== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mrdGM-000RBO-Ed; Mon, 29 Nov 2021 10:47:54 +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 v2 08/20] media: solo6x10: mark unused functions as such Date: Mon, 29 Nov 2021 10:47:40 +0100 Message-Id: X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" There are several unused helper macros there, meant to parse some fields. As those actually help to document the hardware, the better is to keep them. However, it generates clang warnings with W=3D1, causing build to break with CONFIG_WERROR. So, add __always_unused to fix such warnings. Acked-by: Ismael Luceno Signed-off-by: Mauro Carvalho Chehab --- See [PATCH v2 00/20] at: https://lore.kernel.org/all/cover.1638179135.git.m= chehab+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..7766cadb73ea 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_e= nc, int skip, } =20 /* Extract values from VOP header - VE_STATUSxx */ -static inline int vop_interlaced(const vop_header *vh) +static inline __always_unused int vop_interlaced(const vop_header *vh) { return (__le32_to_cpu((*vh)[0]) >> 30) & 1; } =20 -static inline u8 vop_channel(const vop_header *vh) +static inline __always_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; } =20 -static inline u8 vop_hsize(const vop_header *vh) +static inline u8 __always_unused vop_hsize(const vop_header *vh) { return (__le32_to_cpu((*vh)[1]) >> 8) & 0xFF; } =20 -static inline u8 vop_vsize(const vop_header *vh) +static inline u8 __always_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; } =20 -static inline u32 vop_sec(const vop_header *vh) +static inline u32 __always_unused vop_sec(const vop_header *vh) { return __le32_to_cpu((*vh)[5]); } =20 -static inline u32 vop_usec(const vop_header *vh) +static inline __always_unused u32 vop_usec(const vop_header *vh) { return __le32_to_cpu((*vh)[6]); } --=20 2.33.1 From nobody Sun Sep 22 13:36:10 2024 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 33B37C433F5 for ; Mon, 29 Nov 2021 09:50:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347125AbhK2Jxi (ORCPT ); Mon, 29 Nov 2021 04:53:38 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:53440 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245364AbhK2JvP (ORCPT ); Mon, 29 Nov 2021 04:51:15 -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 DFF5E6126D; Mon, 29 Nov 2021 09:47:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9494CC58332; Mon, 29 Nov 2021 09:47:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638179276; bh=UVxFR05FKMhOYLbyC9BEQE9pXiwUc5eHmgE5lfAnxhI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o/pdwFHOU9TVEpdPPb2IJ76QsNuU6pWoBy9UOglfJshvug865l6fNdIwmW5fPfKKZ vTgHcW/DiAZ1IiGB3fHAArL9bV/0dnD98UNom4jNxcjhQpCugchUDxy53Y1oMqIiHj 500XRR7o8hK+h/FXMyMDBNtMIMYboEvZsGch5VmDe1ZlsiZX50IxQwPRB7XrNkV4AV IsIvJahlaOizMOyeJKsEdg1Jat1tw5dMPhuiEbTZqOnJ+XARhifkEb5w1sXk0CVosd 0QKyMJG8zPP1oPdYc7WXy0OoGfUeYVWPLFSd4/e5DvIgmUitxjY/jjCh3liWSFRP6B NZXseLLNigLOA== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mrdGM-000RBS-GG; Mon, 29 Nov 2021 10:47:54 +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 v2 09/20] media: si470x: fix printk warnings with clang Date: Mon, 29 Nov 2021 10:47:41 +0100 Message-Id: <442df11dd08158df88e95a457175a65f20dc8369.1638179135.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Clang doesn't like "%hu" on macros: drivers/media/radio/si470x/radio-si470x-i2c.c:414:4: error: format specifi= es type 'unsigned short' but the argument has type 'int' [-Werror,-Wformat] drivers/media/radio/si470x/radio-si470x-i2c.c:417:4: error: format specifi= es type 'unsigned short' but the argument has type 'int' [-Werror,-Wformat] Besides that, changeset cbacb5ab0aa0 ("docs: printk-formats: Stop encouragi= ng use of unnecessary %h[xudi] and %hh[xudi]") dropped recomendation of using %h. So, just replace them with "%u". Reviewed-by: Nathan Chancellor Signed-off-by: Mauro Carvalho Chehab --- See [PATCH v2 00/20] at: https://lore.kernel.org/all/cover.1638179135.git.m= chehab+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 =3D 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_interfa= ce *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 =3D 1; } @@ -698,10 +698,10 @@ static int si470x_usb_driver_probe(struct usb_interfa= ce *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 =3D 1; } --=20 2.33.1 From nobody Sun Sep 22 13:36:10 2024 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 4DF77C433F5 for ; Mon, 29 Nov 2021 10:08:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346984AbhK2KLe (ORCPT ); Mon, 29 Nov 2021 05:11:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229769AbhK2KJY (ORCPT ); Mon, 29 Nov 2021 05:09:24 -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 C30A3C0698C6; Mon, 29 Nov 2021 01:47:58 -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 547F361290; Mon, 29 Nov 2021 09:47:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A30A6C58331; Mon, 29 Nov 2021 09:47:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638179276; bh=2LbnBBSEprT+n2sIqoaoyoxqkrmW/XjL0iFXZjWwGek=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ONVt5nNkK6jo1KHw1IDlOZ0hsEptJV1u/0U0OYNV1rzYP5++IA9TZKc75QK7fIMq6 pqwNiCT1hdgoLNc9HOpUfJqXaTVd6CCkh0cPoKc5RfNA1DixTj4/l/R1PAwSDo1Khe mTVKBbQFPke0kx0ywPOf+NuDaAfa7ZkpRdKzE8ThNgcfZDxUBV9NHQ+9cdTLys8nCK j3h6TjYjQlfpQb8u7ON2bU4mvtTrH1vy90J4Br//5GjFDJcQzQFSLtYyll6+SdTa2H OLnHWN7IzEhHCIsCHCObQPoTv5O3ZCqlRS19KhZeLGRftVkMXq+iovRH5TxFNQbY6E u56UMEkf5zEjw== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mrdGM-000RBW-I2; Mon, 29 Nov 2021 10:47:54 +0100 From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Hans Verkuil , Mauro Carvalho Chehab , Nathan Chancellor , Xiaofeng Cao , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Subject: [PATCH v2 10/20] media: radio-si476x: drop a container_of() abstraction macro Date: Mon, 29 Nov 2021 10:47:42 +0100 Message-Id: <494171479348cc4d7aea22c51256d8028cbb249b.1638179135.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" This isn't used anywhere. So, drop it. Reviewed-by: Nathan Chancellor Signed-off-by: Mauro Carvalho Chehab --- See [PATCH v2 00/20] at: https://lore.kernel.org/all/cover.1638179135.git.m= chehab+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; }; =20 -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) { --=20 2.33.1 From nobody Sun Sep 22 13:36:10 2024 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 EC304C433EF for ; Mon, 29 Nov 2021 10:08:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348049AbhK2KLg (ORCPT ); Mon, 29 Nov 2021 05:11:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232059AbhK2KJ0 (ORCPT ); Mon, 29 Nov 2021 05:09:26 -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 D494CC0698C8; Mon, 29 Nov 2021 01:47:58 -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 671C861296; Mon, 29 Nov 2021 09:47:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AA04DC58337; Mon, 29 Nov 2021 09:47:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638179276; bh=8QgHuLKT09qwmU7NQkYtwYyeui5thGFxIHL/EEuGkxE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S7ahT9S5YPTyEDpkiGtURf/JblJkTElHtNQQgTsE/jzdWILAYm8YqCRFVrnFN4f1s hEHR6WZkY6MFaqUtv3qek5r+PUyIWSRDzy+eSsukzmN4F9+ojVD2E1RsR32YsOrVpz Zz9LLs+NCoIY6asg0namKX80m1G/621XUWU1kNqEj+KrpzL1LqrjQmAjoSMz8kDVUr MchQ3Hr/uI6G0XwGI2xr1ebotLxtSv5v7q29pLKFKw58+iPDQzqiqKHebiGEGmW/4j lyAilsxO/ZPVbJ5frPaCk6F65n7V1boZQ6Iqb3Pcjrpv5+5hdt/CPh6dqD935Gz6+I PQXhbw0NQepmA== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mrdGM-000RBa-JH; Mon, 29 Nov 2021 10:47:54 +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 v2 11/20] media: lmedm04: don't ignore errors when setting a filter Date: Mon, 29 Nov 2021 10:47:43 +0100 Message-Id: X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Solves a clang warning. Reviewed-by: Nathan Chancellor Signed-off-by: Mauro Carvalho Chehab --- See [PATCH v2 00/20] at: https://lore.kernel.org/all/cover.1638179135.git.m= chehab+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_adapt= er *adap, int onoff) =20 mutex_unlock(&d->i2c_mutex); =20 + if (ret) + return -EREMOTEIO; + return 0; } =20 --=20 2.33.1 From nobody Sun Sep 22 13:36:10 2024 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 5D548C433F5 for ; Mon, 29 Nov 2021 09:50:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350040AbhK2Jx6 (ORCPT ); Mon, 29 Nov 2021 04:53:58 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:34610 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245377AbhK2JvR (ORCPT ); Mon, 29 Nov 2021 04:51:17 -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 11201B80E70; Mon, 29 Nov 2021 09:47:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B3D3AC58334; Mon, 29 Nov 2021 09:47:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638179276; bh=saFeHFW6YIuQRRVUW9F5rGW6Xsrq+9cWY9rHYQr/MjA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kgyMz/XtYIHS5P2y6KuGpHbvSkMIx48H8roSDgkCoqmRWtoXUa8cWwjivaDYCWo8Q DJ9VE5fWGMc6y6CHIamWtXUkCtg7hLZYc9wMQnIyAMrMySsBc/uuUd3kwy+cbVxo23 T708FErwhWzgJD1Tbn9OEA4qyV4gQATWvMePATH7ISoIG50h/X+JyRKZk8Rx5k5V6n y8MmlkXuefjtGTi7C/D4VF9gKe15SgacupDBCBBQdJtNsp9l8YzsuPiGZhVlJRVtsy MBUH3sx0siWX+lTxv74mQD7sIBqTp5zzxmrQWSsMmzLmMpzXvGHfHCLkTonEUsaf5L U7nvyUoIRsQNw== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mrdGM-000RBe-Ko; Mon, 29 Nov 2021 10:47:54 +0100 From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Mauro Carvalho Chehab , Nathan Chancellor , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Subject: [PATCH v2 12/20] media: au0828-i2c: drop a duplicated function Date: Mon, 29 Nov 2021 10:47:44 +0100 Message-Id: <644a5d27b84bfc10219c2c9583fa61d06615de1f.1638179135.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" This function is not used, so, just drop it. Reviewed-by: Nathan Chancellor Signed-off-by: Mauro Carvalho Chehab --- See [PATCH v2 00/20] at: https://lore.kernel.org/all/cover.1638179135.git.m= chehab+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/au08= 28/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 =20 -static inline int i2c_slave_did_write_ack(struct i2c_adapter *i2c_adap) -{ - struct au0828_dev *dev =3D 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 =3D i2c_adap->algo_data; --=20 2.33.1 From nobody Sun Sep 22 13:36:10 2024 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 D1120C433EF for ; Mon, 29 Nov 2021 09:51:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351742AbhK2JyT (ORCPT ); Mon, 29 Nov 2021 04:54:19 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:34614 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245453AbhK2JvR (ORCPT ); Mon, 29 Nov 2021 04:51:17 -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 20449B80E72; Mon, 29 Nov 2021 09:47:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA0FEC5833B; Mon, 29 Nov 2021 09:47:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638179276; bh=qLsXkKUqYgx/y5TYU+1VFJtNdFV5qBVzuVbWurIKgCw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KbtrAZaJ0HUA0HsvUsfHoTlDWfeg93Ece5o26tcCNNmwlO0oVEbHoTNUH2p+VrhM0 3HwLL4V/DY0XAIhcImSIjai9kl6XQ5WnCmIvG65I/RlWtkaJmSNE3jxNiF25zg2Hor JiCgVMXrqGFaUgRdMlMJbRfvvG48wmRj8B3I+j6vJl7BYwYs0XkL04hG5yPft8OXmW tpNTjqfBnISgyl1So++MI6Kmrj/iFu4AcgpJmyCcEUt60GV9OGEBpBp30SQ3fWP+Ee irkIqaZgbcLsGgD6VudykQjb4D2dV/Z51/rLYDGacjGXzZLmtWJYN86+pFSUZ/CzRt 75TD2DbIUMuWg== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mrdGM-000RBi-Md; Mon, 29 Nov 2021 10:47:54 +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 v2 13/20] media: adv7604: mark unused functions as such Date: Mon, 29 Nov 2021 10:47:45 +0100 Message-Id: <91b6e8c97de3608785a035eaef6d970aea7926ac.1638179135.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" There are several unused helper macros there, meant to parse some fields. As those actually help to document the hardware, the better is to keep them. However, it generates clang warnings with W=3D1, causing build to break with CONFIG_WERROR. So, add __always_unused to fix such warnings. Signed-off-by: Mauro Carvalho Chehab --- See [PATCH v2 00/20] at: https://lore.kernel.org/all/cover.1638179135.git.m= chehab+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..a2fa408d2d9f 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); } =20 -static inline int avlink_read(struct v4l2_subdev *sd, u8 reg) +static inline int __always_unused avlink_read(struct v4l2_subdev *sd, u8 r= eg) { struct adv76xx_state *state =3D to_state(sd); =20 return adv76xx_read_check(state, ADV7604_PAGE_AVLINK, reg); } =20 -static inline int avlink_write(struct v4l2_subdev *sd, u8 reg, u8 val) +static inline int __always_unused avlink_write(struct v4l2_subdev *sd, u8 = reg, u8 val) { struct adv76xx_state *state =3D to_state(sd); =20 @@ -439,14 +439,14 @@ static inline int infoframe_read(struct v4l2_subdev *= sd, u8 reg) return adv76xx_read_check(state, ADV76XX_PAGE_INFOFRAME, reg); } =20 -static inline int infoframe_write(struct v4l2_subdev *sd, u8 reg, u8 val) +static inline int __always_unused infoframe_write(struct v4l2_subdev *sd, = u8 reg, u8 val) { struct adv76xx_state *state =3D to_state(sd); =20 return regmap_write(state->regmap[ADV76XX_PAGE_INFOFRAME], reg, val); } =20 -static inline int afe_read(struct v4l2_subdev *sd, u8 reg) +static inline int __always_unused afe_read(struct v4l2_subdev *sd, u8 reg) { struct adv76xx_state *state =3D to_state(sd); =20 @@ -479,14 +479,14 @@ static inline int rep_write_clr_set(struct v4l2_subde= v *sd, u8 reg, u8 mask, u8 return rep_write(sd, reg, (rep_read(sd, reg) & ~mask) | val); } =20 -static inline int edid_read(struct v4l2_subdev *sd, u8 reg) +static inline int __always_unused edid_read(struct v4l2_subdev *sd, u8 reg) { struct adv76xx_state *state =3D to_state(sd); =20 return adv76xx_read_check(state, ADV76XX_PAGE_EDID, reg); } =20 -static inline int edid_write(struct v4l2_subdev *sd, u8 reg, u8 val) +static inline int __always_unused edid_write(struct v4l2_subdev *sd, u8 re= g, u8 val) { struct adv76xx_state *state =3D to_state(sd); =20 @@ -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); } =20 -static inline int test_write(struct v4l2_subdev *sd, u8 reg, u8 val) +static inline int __always_unused test_write(struct v4l2_subdev *sd, u8 re= g, u8 val) { struct adv76xx_state *state =3D to_state(sd); =20 @@ -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); } =20 -static inline int vdp_read(struct v4l2_subdev *sd, u8 reg) +static inline int __always_unused vdp_read(struct v4l2_subdev *sd, u8 reg) { struct adv76xx_state *state =3D to_state(sd); =20 return adv76xx_read_check(state, ADV7604_PAGE_VDP, reg); } =20 -static inline int vdp_write(struct v4l2_subdev *sd, u8 reg, u8 val) +static inline int __always_unused vdp_write(struct v4l2_subdev *sd, u8 reg= , u8 val) { struct adv76xx_state *state =3D to_state(sd); =20 --=20 2.33.1 From nobody Sun Sep 22 13:36:10 2024 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 69F98C433F5 for ; Mon, 29 Nov 2021 10:08:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350849AbhK2KLx (ORCPT ); Mon, 29 Nov 2021 05:11:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234924AbhK2KJv (ORCPT ); Mon, 29 Nov 2021 05:09:51 -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 E0D34C0698C9; Mon, 29 Nov 2021 01:47:58 -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 710F06129E; Mon, 29 Nov 2021 09:47:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E3005C9039C; Mon, 29 Nov 2021 09:47:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638179276; bh=YlKZnWxAnzvzgRkW58KVzO1NH7YwxG8b4dfk4+1g7WA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IaYNnMhUgeuxefx7BBPsTqNpGJAbJfwuIxSLPx+KA6ewujY+L5rTPUb0u+usXowaB Rfymx9vSlJAtHV5qpUL3gL7AauCLlZvwxO3+j0/cdy2IuvT951pKoG7Qob3CC9di6r VhTZMfKlkwiFnhJUmZc+PVG4KPLpogFmG7+wDV3V5ymr2eD6ECPvrt+qtDmew21FKp 16yZGgNbaXif8rsPNaGamfgr+75GO9H/Bgy3uAOoL6b7B+uZXA8vUOu/juhIhrO5cZ 5pxQ9t3ndWf1yVe1/SycXA5ykhAKDakXKx0fD1NIBfMewlOgl5L8viFkQLpNZcMWwZ lw11h/uj5B+MQ== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mrdGM-000RBm-Oa; Mon, 29 Nov 2021 10:47:54 +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, Nathan Chancellor Subject: [PATCH v2 14/20] media: adv7511: drop unused functions Date: Mon, 29 Nov 2021 10:47:46 +0100 Message-Id: X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Those are aliases for another function and not used at the current implementation. So, just drop it. Reviewed-by: Nathan Chancellor Signed-off-by: Mauro Carvalho Chehab --- See [PATCH v2 00/20] at: https://lore.kernel.org/all/cover.1638179135.git.m= chehab+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-v= 4l2.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, u= 8 reg) return adv_smbus_read_byte_data(state->i2c_pktmem, reg); } =20 -static int adv7511_pktmem_wr(struct v4l2_subdev *sd, u8 reg, u8 val) -{ - struct adv7511_state *state =3D get_adv7511_state(sd); - int ret; - int i; - - for (i =3D 0; i < 3; i++) { - ret =3D i2c_smbus_write_byte_data(state->i2c_pktmem, reg, val); - if (ret =3D=3D 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; --=20 2.33.1 From nobody Sun Sep 22 13:36:10 2024 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 4D60FC433F5 for ; Mon, 29 Nov 2021 09:51:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352202AbhK2Jy1 (ORCPT ); Mon, 29 Nov 2021 04:54:27 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:34612 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245428AbhK2JvR (ORCPT ); Mon, 29 Nov 2021 04:51:17 -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 1DF13B80E6F; Mon, 29 Nov 2021 09:47:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 04BEEC53FC7; Mon, 29 Nov 2021 09:47:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638179277; bh=lyjOfRRquo5cdbI3gpJqeiWDs1+gFT1wXowGwbJ8mMs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S91kmsM0YvUzBmKwjE4ZtmvsqsB7X+5SXz7RRD8O3EXWXfZ2r6H/rk92xK1SCARA5 jBJon1m3DMCAiSQTqaX46Hqw/YH40ycutk0+oPprlPb4CgwUxsKnGWxwJGELgQLg86 OtBwRRv+iixXjgK3M3b3q0LMwKT61WPy8Hgb8WPCr3w5TUiaAJnMTrfqsDYPPwmssz oeTBXpytLD+3vovqS8F1D+56O7h7/GDDnhgbK9BUiHpHuBGFarMpCfZIpEKbLR9cqR jF3k1sb3ylWs/pJaxvK4qFd3BLrwNxFf3EszD1F+o4ySsBB4CzRA7T/1FLVO910dz6 tIppjm6t7pwBA== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mrdGM-000RBq-QZ; Mon, 29 Nov 2021 10:47:54 +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 v2 15/20] media: imx290: mark read reg function as __always_unused Date: Mon, 29 Nov 2021 10:47:47 +0100 Message-Id: <2471c2ecdf023fc3014d1ad544f2b0e9436fc9ff.1638179135.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Such function is currently unused, but could be needed in the future. So, keep it, marking it as __always_unused, in order to avoid a clang W=3D1 error. Signed-off-by: Mauro Carvalho Chehab --- See [PATCH v2 00/20] at: https://lore.kernel.org/all/cover.1638179135.git.m= chehab+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..99f2a50d39a4 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_subd= ev *_sd) return container_of(_sd, struct imx290, sd); } =20 -static inline int imx290_read_reg(struct imx290 *imx290, u16 addr, u8 *val= ue) +static inline int __always_unused imx290_read_reg(struct imx290 *imx290, u= 16 addr, u8 *value) { unsigned int regval; int ret; --=20 2.33.1 From nobody Sun Sep 22 13:36:10 2024 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 16DB0C433EF for ; Mon, 29 Nov 2021 10:08:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353445AbhK2KME (ORCPT ); Mon, 29 Nov 2021 05:12:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238905AbhK2KJ6 (ORCPT ); Mon, 29 Nov 2021 05:09:58 -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 6415DC0698CD; Mon, 29 Nov 2021 01:48:00 -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 2E521B80E75; Mon, 29 Nov 2021 09:47:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 051B6C53FD3; Mon, 29 Nov 2021 09:47:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638179277; bh=cvDcFaDZVEW1u/gAhNbQDP9i1EmPWvMAVO+rzVJt8UA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vDA1Q9rsnDrm+hHvttboWsJuGAPuy/3d9fyfQ23IueJVZbr+aMpCOqklJt3U+ORoK t1pIY4Rg1GwFFFV/Uaa7XIDE4Wq1WaMA2TOoM+xz6CRYjGoHzZYsj7Lbqq7PotdSSt bWUq0GoNdKaTuy3SW5bsyqQFEH8mzpCQzPmhyo2RFATHGSg2n5tpqLX+6NH1UGnIhU iqCJ6t9+iL0/zADu5LeVTsmhL4vYZv0l9TgAin5nPbpJ+8MmuQrJHmdD0uTwlSC0cV czb3TDNao9phOiHV3T4t3vQH8l6OXXXhAwpVTS8EUInQme+bL+orlxiv2o/IG5UVl8 S67L0j8X/zr+w== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mrdGM-000RBu-SX; Mon, 29 Nov 2021 10:47:54 +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 v2 16/20] media: davinci: vpbe_osd: mark read reg function as __always_unused Date: Mon, 29 Nov 2021 10:47:48 +0100 Message-Id: <0c086fea0d3f0771f6c8627e99edb719e282a49c.1638179135.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Such function is currently unused, but could be needed in the future. So, keep it, marking it as __always_unused, in order to avoid a clang W=3D1 error. Signed-off-by: Mauro Carvalho Chehab --- See [PATCH v2 00/20] at: https://lore.kernel.org/all/cover.1638179135.git.m= chehab+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/plat= form/davinci/vpbe_osd.c index 91b571a0ac2c..32f7ef547c82 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[]= =3D { MODULE_DEVICE_TABLE(platform, vpbe_osd_devtype); =20 /* register access routines */ -static inline u32 osd_read(struct osd_state *sd, u32 offset) +static inline u32 __always_unused osd_read(struct osd_state *sd, u32 offse= t) { struct osd_state *osd =3D sd; =20 --=20 2.33.1 From nobody Sun Sep 22 13:36:10 2024 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 82F6BC433F5 for ; Mon, 29 Nov 2021 10:08:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345038AbhK2KLX (ORCPT ); Mon, 29 Nov 2021 05:11:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245186AbhK2KJU (ORCPT ); Mon, 29 Nov 2021 05:09:20 -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 81E93C0698C4; Mon, 29 Nov 2021 01:47:58 -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 1945561274; Mon, 29 Nov 2021 09:47:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 17490C93056; Mon, 29 Nov 2021 09:47:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638179277; bh=g7axgzCcZGn/eeA1irl2Ht+bPVY0TQVNksswKwdV460=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BeyQubmuGPslQehBh6n2w+Qk+OC0h7H+dSEAMsDwXRHOR5ge0JmWQPtkv82y4Akgn eucesC14ZOxrgtVjuAyE8l6EIcns2wO6CWGBXeGNcdHihCZe3tkAGmV2C6Ebp9ctrG wAdiMvqTr5ovJCh8JTgM3VmhwHmpsZ1zQf108T1AJAC6No8aOIHrg7F2PHaRv18ols s2o6ifx+hkB/+DpOVcwvldgKImrmws1HvtCty/h68l/7KP+01S6b8PnsrwZigsAwr0 RoUm9shvYenAL/XO0f220yrMDbGWzqTMYr3iRI1xB1WV8ueaOA+GffSnrCYmvY2Qs6 8Sme4GhwJZwBg== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mrdGM-000RBy-Un; Mon, 29 Nov 2021 10:47:54 +0100 From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Robert Foss , Andy Gross , Bjorn Andersson , Mauro Carvalho Chehab , Todor Tomov , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, Mauro Carvalho Chehab Subject: [PATCH v2 17/20] media: camss: Remove unused static function Date: Mon, 29 Nov 2021 10:47:49 +0100 Message-Id: X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Robert Foss vfe_reg_clr() is not used in camss-vfe-170.c, and can be removed. Signed-off-by: Robert Foss Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- See [PATCH v2 00/20] at: https://lore.kernel.org/all/cover.1638179135.git.m= chehab+huawei@kernel.org/ drivers/media/platform/qcom/camss/camss-vfe-170.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/media/platform/qcom/camss/camss-vfe-170.c b/drivers/me= dia/platform/qcom/camss/camss-vfe-170.c index 5c083d70d495..f524af712a84 100644 --- a/drivers/media/platform/qcom/camss/camss-vfe-170.c +++ b/drivers/media/platform/qcom/camss/camss-vfe-170.c @@ -191,13 +191,6 @@ static u32 vfe_hw_version(struct vfe_device *vfe) return hw_version; } =20 -static inline void vfe_reg_clr(struct vfe_device *vfe, u32 reg, u32 clr_bi= ts) -{ - u32 bits =3D readl_relaxed(vfe->base + reg); - - writel_relaxed(bits & ~clr_bits, vfe->base + reg); -} - static inline void vfe_reg_set(struct vfe_device *vfe, u32 reg, u32 set_bi= ts) { u32 bits =3D readl_relaxed(vfe->base + reg); --=20 2.33.1 From nobody Sun Sep 22 13:36:10 2024 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 C6200C433EF for ; Mon, 29 Nov 2021 10:08:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345705AbhK2KL1 (ORCPT ); Mon, 29 Nov 2021 05:11:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229623AbhK2KJY (ORCPT ); Mon, 29 Nov 2021 05:09:24 -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 A65B1C0698C5; Mon, 29 Nov 2021 01:47:58 -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 80B2E61256; Mon, 29 Nov 2021 09:47:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 20459C8CFC3; Mon, 29 Nov 2021 09:47:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638179277; bh=50op9YAtX0/PCCZuHHAdCtTsRwW2P9kyuSBk3Zk50fM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Oki8XiQlbzy0bzjG3M7lzh+UspuiW0aj+E0AudObl3VBhss3bB8v3WrDKSjA8Ld/Z aNvZvy9NXWEZ3Adm2/S16ADKTH1MGJ3PC6UZc7aNlMTGOKozWz8oRSe1BSRomjbePZ PmWDVXyBr03dy2eDubT4kEY5bQScrvOPYF7METmZ1UoG+UUdII+3+P+7+Hg3AQN3su E9Oxf+G4F4WGNwWIZqKA5C3UqgPrzYlfhKZWRIfOi7SMS/agARzf9LvyiOQAgGbz9k bsn9vTwcQJn6uz23kO3ELjb6FLqKddPr7895vs/w7gv0CM5GWuyL6QABnjsTcxpaTr gyCnfSIRMC5Cw== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mrdGN-000RC2-0a; Mon, 29 Nov 2021 10:47:55 +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, Arnd Bergmann Subject: [PATCH v2 18/20] media: mtk-mdp: address a clang warning Date: Mon, 29 Nov 2021 10:47:50 +0100 Message-Id: X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The typecasts at the dvb-core generate clang warnings when W=3D1 is enabled. Such warning is harmless, but it causes the build to break with CONFIG_WERROR and W=3D1 with clang, so do the cast on a way that it won't produce warnings anymore. Reviewed-by: Arnd Bergmann Signed-off-by: Mauro Carvalho Chehab --- See [PATCH v2 00/20] at: https://lore.kernel.org/all/cover.1638179135.git.m= chehab+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..3d38793aaa25 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; } =20 - comp_type =3D (enum mtk_mdp_comp_type)of_id->data; + comp_type =3D (uintptr_t)of_id->data; =20 comp =3D devm_kzalloc(dev, sizeof(*comp), GFP_KERNEL); if (!comp) { --=20 2.33.1 From nobody Sun Sep 22 13:36:10 2024 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 0AB50C433F5 for ; Mon, 29 Nov 2021 09:50:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348005AbhK2Jxp (ORCPT ); Mon, 29 Nov 2021 04:53:45 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:53506 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245374AbhK2JvQ (ORCPT ); Mon, 29 Nov 2021 04:51: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 8BA8A612AB; Mon, 29 Nov 2021 09:47:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3CAC5C8CFCA; Mon, 29 Nov 2021 09:47:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638179277; bh=PZc8s3X7+3Fvl9dhdA2WhkbH6WBiqlNGKDPhzYrtWIU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tzv6b49Jr4kuLZ6+ooSy3BfBoTQunFcJjbBAWSec5tyFqV0ZSCu84wS3RKWJpnEP9 AR3OCgpIggV/0Sr2tkWchkhheEFuQOpOBFrArIDDBlTYqRcGWfM22mP8/bJeObiy/T gjGKGseU83VL/D1cKOHd/D+rdFXLU7AlqxfHi3S7GmfuHCLL6wotZLHy2VnTVb7jv7 /YoAVBvNtmc8GKfXCNOSNFo9si5UVDh2V524NtAU4wc1vMFSi/utB3nq6DY6UxBUS1 PzuNt2Z0fRF/30rz/HMwuGgtwKNnn/JJvYpvr3WM2NQyFLeh7GHLsIQW3EbHJ7D4UQ FEHb9UzajIiUA== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mrdGN-000RC6-2W; Mon, 29 Nov 2021 10:47:55 +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, Nathan Chancellor Subject: [PATCH v2 19/20] media: cobalt: drop an unused variable Date: Mon, 29 Nov 2021 10:47:51 +0100 Message-Id: <22f9904099e3dfd1d245c45a125392b549e142d8.1638179135.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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. Reviewed-by: Nathan Chancellor Signed-off-by: Mauro Carvalho Chehab --- See [PATCH v2 00/20] at: https://lore.kernel.org/all/cover.1638179135.git.m= chehab+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/cob= alt/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, unsign= ed f_out) u8 n1, hsdiv; u8 regs[6]; int found =3D 0; - u16 clock_ctrl; int retries =3D 3; =20 for (i =3D 0; i < ARRAY_SIZE(multipliers); i++) { @@ -260,9 +259,7 @@ bool cobalt_cpld_set_freq(struct cobalt *cobalt, unsign= ed f_out) hsdiv =3D multipliers[i_best].hsdiv - 4; rfreq =3D div_u64(dco << 28, f_xtal); =20 - clock_ctrl =3D cpld_read(cobalt, SI570_CLOCK_CTRL); - clock_ctrl |=3D S01755_REG_CLOCK_CTRL_BITMAP_CLKHSMA_FPGA_CTRL; - clock_ctrl |=3D S01755_REG_CLOCK_CTRL_BITMAP_CLKHSMA_EN; + cpld_read(cobalt, SI570_CLOCK_CTRL); =20 regs[0] =3D (hsdiv << 5) | (n1 >> 2); regs[1] =3D ((n1 & 0x3) << 6) | (rfreq >> 32); --=20 2.33.1 From nobody Sun Sep 22 13:36:10 2024 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 308BAC433EF for ; Mon, 29 Nov 2021 10:08:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353614AbhK2KMF (ORCPT ); Mon, 29 Nov 2021 05:12:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239028AbhK2KJ6 (ORCPT ); Mon, 29 Nov 2021 05:09:58 -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 6A290C0698CE; Mon, 29 Nov 2021 01:48:00 -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 3377CB80E6B; Mon, 29 Nov 2021 09:47:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 42D06C8CFC9; Mon, 29 Nov 2021 09:47:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638179277; bh=almiBRvaRIswDQ0M54jkBCu++okng5mXod3ZWHjA9zA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bYUkGbbarxNSXez5Q7KK4TvqK5ZftC5v/LITcTho7w9ecANgRfh/ILgp/V+XMgAzT D+RHjtYH6UqgatA4xQPft02ZryN6Iolqymom+tbCVNvIk5+LpfaueCGaPU7r4oMkSB 5DG+DmX+vvide0RHSoqVwwhurxEbwAuclEjRZ6FnInFyF/iUmW0kN16OC/MXmrl1pQ zEXqrfIwGEd9nHYteyaJtKoGtmfhGVzUWqqbKwr9cZ49dlggryl6iFVsgp2CHuFGNr E7vv/yfqih4C/474Q99jWJ9jAIzFFJuXalNDW0OuHO2agUPdDUXht0TRhJ5z7dCzxJ 2D23CV5HiRxqg== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mrdGN-000RCA-4c; Mon, 29 Nov 2021 10:47:55 +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 v2 20/20] media: mxl5005s: drop some dead code Date: Mon, 29 Nov 2021 10:47:52 +0100 Message-Id: X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" As reported by clang (with W=3D1), 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. Reviewed-by: Nathan Chancellor Signed-off-by: Mauro Carvalho Chehab --- See [PATCH v2 00/20] at: https://lore.kernel.org/all/cover.1638179135.git.m= chehab+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/mxl5005= s.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 =3D fe->tuner_priv; - u16 i, j, k; + u16 i, j; u32 highLimit; - u32 ctrlVal; =20 if (controlGroup =3D=3D 1) /* Initial Control */ { =20 @@ -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 =3D 0; - for (k =3D 0; k < state->Init_Ctrl[i].size; k++) - ctrlVal +=3D 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 =3D 0; - for (k =3D 0; k < state->CH_Ctrl[i].size; k++) - ctrlVal +=3D state->CH_Ctrl[i].val[k] * (1 << k); } else return -1; } @@ -3477,11 +3470,6 @@ static u16 MXL_ControlWrite_Group(struct dvb_fronten= d *fe, u16 controlNum, (u8)(state->MXL_Ctrl[i].bit[j]), (u8)((value>>j) & 0x01)); } - ctrlVal =3D 0; - for (k =3D 0; k < state->MXL_Ctrl[i].size; k++) - ctrlVal +=3D state-> - MXL_Ctrl[i].val[k] * - (1 << k); } else return -1; } --=20 2.33.1