From patchwork Thu Aug 3 12:15:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 130563 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f41:0:b0:3e4:2afc:c1 with SMTP id v1csp1125805vqx; Thu, 3 Aug 2023 05:54:13 -0700 (PDT) X-Google-Smtp-Source: APBJJlGKLN7RiXLYwPGCrY77hzvZvDRbljvtuLlZahdr43vElpUuaFp9td1KMs8zIOOuFbMuSACn X-Received: by 2002:a05:6a20:9703:b0:13c:8e50:34b8 with SMTP id hr3-20020a056a20970300b0013c8e5034b8mr15240193pzc.35.1691067252791; Thu, 03 Aug 2023 05:54:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691067252; cv=none; d=google.com; s=arc-20160816; b=T2OWfk/OnJFlAgs6lrOLZuWJWpmPaJABz9kqNZ3avazImuOlcIFUA3Mw29CfbLrrZc pfW27IijuaBaXn6164FwfoSB+a8/nh38WUeE/7MfLCWCsdDTCUwIGSv9gLg9DL1Irjea HbZPCHdyhJou8K1OD90iV/X1LwbwDcYqkiYbz3MsbX+UCxQCab0KmamY0F15v42vYZNx SmzuZq02UqoYLjm0eo3ZmWvWI6G6Hpj022/V6Y+EMtydy7iUnJ5LJQK/R3lWSu5LlE7T r5R5Ytmlqx5v4+7b2AB+tOk5fhHVlWKYFJNzgjU41g6in4yPXWB9NPisn1z5MhcKugxs UetA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=uIOwGuGNjEIoP5lX3GH0e6pWBa+FHU8edsRuWoqcE/w=; fh=OqXResVBGmKVif32WrPB9+w/XjWhGxZKnootS83aEBI=; b=XQTYvDk5UfwOIeTjGcOe1rMsWCBLtq+xC+NfaSJ019pmXKZHqyjgzIK+v8iNYOChXO 5Wqiut5wHeXs9xf/PpYxP5Sz94jbrbUH6f7PZnTLYAciDYLteY/NSRmKXDcldOZiNH/Z Ma2VNM8dN3fg8RpajQqbtgrH4yDjOPHRHdmSc7sHPMRY086QvVRoT1xVtFrqVvtAM+dj h8sjAOCoeqtvFxw/KN+CFz4FTC3Z/Q24T6CKJyrzVhOAy4L549iUZNDFXGYTS/1wYHkx ZWv30fX/Loxj9IhGDnWIYtlDTt3HgwWHhlRCV+Ac6L1dXG67xxueUg2fpKuxidadLKzp PzxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=kHNnALG8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c8-20020a056a00248800b00652c20d3522si7198954pfv.303.2023.08.03.05.53.59; Thu, 03 Aug 2023 05:54:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=kHNnALG8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235866AbjHCMQ2 (ORCPT + 99 others); Thu, 3 Aug 2023 08:16:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235354AbjHCMQZ (ORCPT ); Thu, 3 Aug 2023 08:16:25 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1511C1716; Thu, 3 Aug 2023 05:16:23 -0700 (PDT) Received: from [127.0.1.1] (91-154-35-171.elisa-laajakaista.fi [91.154.35.171]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 996E7C67; Thu, 3 Aug 2023 14:15:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1691064917; bh=FUF1g+cBUsdEqKfbNzez2Hokd0GxCCbEB2o0a2KNDys=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=kHNnALG85T2UZ9jsxoPBGsCRJi8ddcr/Id9vLH7RjLzbukpEAryOpBqYfR6YF9fXO Undu76W6QJLqayq/vpNOAMFhF78Nep7yb9+U/CLZuWW5tCk0ODZbbIQffsicwZenem pHncreFTgP9wIKUIe5cJC/3yDlK7Qu6HiJUS+W1U= From: Tomi Valkeinen Date: Thu, 03 Aug 2023 15:15:45 +0300 Subject: [PATCH v2 1/3] media: i2c: ds90ub913: Fix use of uninitialized variables MIME-Version: 1.0 Message-Id: <20230803-ub9xx-uninit-vars-v2-1-512570ecb798@ideasonboard.com> References: <20230803-ub9xx-uninit-vars-v2-0-512570ecb798@ideasonboard.com> In-Reply-To: <20230803-ub9xx-uninit-vars-v2-0-512570ecb798@ideasonboard.com> To: Mauro Carvalho Chehab , Laurent Pinchart , Sakari Ailus , Andy Shevchenko , Hans Verkuil Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Tomi Valkeinen X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1323; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=FUF1g+cBUsdEqKfbNzez2Hokd0GxCCbEB2o0a2KNDys=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBky5qSirgPH9zPThBDC93DQo5bx72emrcDGxbpv ac30JTkfx+JAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCZMuakgAKCRD6PaqMvJYe 9RopEACtjE3K40xcWVdMWnD6/aLAj3cGmLF6yGhjC6N2i/GcuHm1WFBIT4zM76hgJdHt0eL/GF7 0hGtPuKBgB11Q9nP5/H0VGZwZE7Q9d+lBOsYPogkQhhz/AUFBoBXrvJ0+Sc0XZH76pR8hHF/3QS nF5fOVIs86jL5vPzbrSgpqBEEm/abJTJNX4RHv/0aZbWsNZSLIiIqWIEWzEUkwlOOSC97pd2wSh JKXgnCwaeGpbcsFn26Vx5NTS3tSV2GA7XrnK7u/cUZNjp1LBtZfGGcyxAmT9OfLlHv4wXghRuVA hmHRRxe9nU94njr+L08gjP2c47k0YjZevaJPBqUGjp3ZS4mm6Pc9kLe5DR2fjiht2SyDofK8Elm TerHWe/07ft2/eAg0swQ7C3cRVnX/jr10w5K5wGGrfVQwVI6yhSo3abgIt76cKbA/ThKlv9pIgB aS0E5XIlVXfL+lFhwcfjvS7qitY5TuBVTNWuoMMGgkz9AEyo6mIeH698fa76RLz42ak6HUBgd3L 5nz4FurbhtbB7lYzAJrbPGr7VW8PYE4x89aeBogxLq65YGsM2CpY4UdyUf5bpw9yEkpN5pbrsdq ffZkeGnOzw/XY0J4H1Qxc7UtGOmPoB7sB/7NopIkmcUp6QQS1qencSSyMPzy8X7xz3FsnMWr3iU y7BgeQ0Ihbqkq9g== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773212535802079689 X-GMAIL-MSGID: 1773212535802079689 smatch reports some uninitialized variables: drivers/media/i2c/ds90ub913.c:481 ub913_log_status() error: uninitialized symbol 'v1'. drivers/media/i2c/ds90ub913.c:481 ub913_log_status() error: uninitialized symbol 'v2'. These are used only for printing debug information, and the use of an uninitialized variable only happens if an i2c transaction has failed, which will print an error. Thus, fix the errors just by initializing the variables to 0. Fixes: c158d0d4ff15 ("media: i2c: add DS90UB913 driver") Reported-by: Hans Verkuil Closes: https://lore.kernel.org/all/8d6daeb1-b62a-bbb2-b840-8759c84f2085@xs4all.nl/ Signed-off-by: Tomi Valkeinen --- drivers/media/i2c/ds90ub913.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/ds90ub913.c b/drivers/media/i2c/ds90ub913.c index 80d9cf6dd945..b2115e3519e2 100644 --- a/drivers/media/i2c/ds90ub913.c +++ b/drivers/media/i2c/ds90ub913.c @@ -469,7 +469,7 @@ static int ub913_log_status(struct v4l2_subdev *sd) { struct ub913_data *priv = sd_to_ub913(sd); struct device *dev = &priv->client->dev; - u8 v = 0, v1, v2; + u8 v = 0, v1 = 0, v2 = 0; ub913_read(priv, UB913_REG_MODE_SEL, &v); dev_info(dev, "MODE_SEL %#02x\n", v); From patchwork Thu Aug 3 12:15:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 130582 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f41:0:b0:3e4:2afc:c1 with SMTP id v1csp1146931vqx; Thu, 3 Aug 2023 06:26:24 -0700 (PDT) X-Google-Smtp-Source: APBJJlEVGII5R4u1iiDNE4wy7dh783QbYqpSRkTI+7zDkzLJC2X5SxF9cAgO9TGvGu8n0Dvo9IVu X-Received: by 2002:a17:907:77cf:b0:982:26c5:6525 with SMTP id kz15-20020a17090777cf00b0098226c56525mr7645124ejc.60.1691069184036; Thu, 03 Aug 2023 06:26:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691069184; cv=none; d=google.com; s=arc-20160816; b=r7azVWAZNa4iPQ1HdkdOs2gvZWBZcCRNefkabNUYvL3v55Y1cAXXrAll6bwQj+jb7n B5yXe6tquv7SagI41RDQc3edIHak+OSZ2mij7vfDR6PcAi6fhzUoFURE5la6PdvyXvnW 1d3+8RILVHhEFiNHffHpX0fgzUvvWWbxujtjHN9Fmb8dnsxDkOY7SmGBIJmoOnb77Vvc erUF5K7cz62u+yxUheZT41uQasJZAKpgY/HmrhXF2wYnChrmVmc706qaJdFflGuiFB14 VMxTAxrhz9D8jiWUeIMMcCmUdgMlKsZJVhThkgGtWe2+Fl0JkArSnXLQ5qVgg+M8GKj/ NTUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=sk7M6H1VHtK+GZJeGa1E1lQzQNjTdtjaWNRUaJgAXpc=; fh=OqXResVBGmKVif32WrPB9+w/XjWhGxZKnootS83aEBI=; b=TZn0bJqR0sVIzR8yMWEAQ7i6C71VJVsCb8JBXQMBGM9zPxQFHHPb6jpPMgBZKhPsaw CVaLEbUqLq+rVGK9R7MjF4oSRexBpTAViKn6vQVq2YX5zQK34xbz4hh9gueTvmV2I1Z6 +OisP9Sj+dQZ6S7G9HudSNVmIoRuaiqw8EWyAUrRsVObOejoK+T4qbcGS8GVxTPEKc0Q anJgfwbwOsM4Wn68Cc5wbqfU8SnFQTaEzhr1wbKSqgWyKODTJJ1uwfDVO4pW4WKhG4DI B/oEJ/qc404SgdqvJTJSjBYN8z/fi1Qoffa2OOPRu7cdbN6TkpCmieJ/xhBleneOEjO+ FGfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=TJKAY4NR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b27-20020a170906151b00b0099c518e9e51si2175526ejd.127.2023.08.03.06.25.59; Thu, 03 Aug 2023 06:26:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=TJKAY4NR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235856AbjHCMQ0 (ORCPT + 99 others); Thu, 3 Aug 2023 08:16:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235843AbjHCMQY (ORCPT ); Thu, 3 Aug 2023 08:16:24 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D85B3B1; Thu, 3 Aug 2023 05:16:23 -0700 (PDT) Received: from [127.0.1.1] (91-154-35-171.elisa-laajakaista.fi [91.154.35.171]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 5113ED4A; Thu, 3 Aug 2023 14:15:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1691064917; bh=Vr87S8JB3GTlOm1impkDXZI+XrjWqCD9MJquwKbXKLc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=TJKAY4NRrA5qtAxkCyK0XLonSqh7V81KFI8rmQmyy5ezMTNCVm5DJNYjM/7hSlePu zlxCAnmucZZCahVxgsSoPg90ccEVG68dvkBEg7rRoX9ayH9SDp0CoPJ4y66LnN8rFK OA5HoDLnZ6JtwaPimi9SlaRPl4QzmN31ktRM5pGQ= From: Tomi Valkeinen Date: Thu, 03 Aug 2023 15:15:46 +0300 Subject: [PATCH v2 2/3] media: i2c: ds90ub953: Fix use of uninitialized variables MIME-Version: 1.0 Message-Id: <20230803-ub9xx-uninit-vars-v2-2-512570ecb798@ideasonboard.com> References: <20230803-ub9xx-uninit-vars-v2-0-512570ecb798@ideasonboard.com> In-Reply-To: <20230803-ub9xx-uninit-vars-v2-0-512570ecb798@ideasonboard.com> To: Mauro Carvalho Chehab , Laurent Pinchart , Sakari Ailus , Andy Shevchenko , Hans Verkuil Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Tomi Valkeinen X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1544; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=Vr87S8JB3GTlOm1impkDXZI+XrjWqCD9MJquwKbXKLc=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBky5qTSyBs2s9Dctr6+/nKcJU5IQoL5DB0EJmC0 xXjV9NpT3WJAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCZMuakwAKCRD6PaqMvJYe 9ZSWD/9Lrr6SSSG7H8TH6Sw1fcd4/h1X4OmH+sSAXf1uOJW9TIqixpJl5LL1bj/4OkY423QQU8f kB9aQDc2c8CTRaKjlbF8S9QQ0rgMgYAOwz3Ii6laafVPDUjHYgrgV99JMdoORxWczxVrEO5zM9V YYdPUDAPlizw+PJXlUZguTwBaaZfzD6YcMVWU9GR9tGThr253Klte5LJYOIkNO4zIhuPouAEybH 2KhBbLC4hfHujSOivsUBBH0ot/kjySgbOKlE3D/B772YVQle9WYHMahyIhvh/tWg1uf74eoWv10 hwRYPgea1djdRSMvJEIejUOv4KFwEI+9bpbBErf/g2EJAx14boDbyUuokGIEXPp9Hu602AGwuUm J02npHgFiLqkgZtkRDvy1IHqQN7F3XLaV2/sJ+vwOd3x+l3He8Dxy8GSI0ITaSP/r95QvB623NW P9rlY4SNjEvRkblENntRdgAb7L5zemNL+UKj1BQ3kUkcMgRiUbU9uNA52cGzXGmb2rGLFZRXN6x mDOMO/YS5WftUYJ4egA0gkUGdmCV1R31mbvdh17eE7cfiNmeW2H+F2QLnbE5xfNjzGL+yJtsIK/ B4exbEtj6tTjuGowXL0HAIV2dsFs6/SblC7QBD4ZD6InF07vBcPqo2eRCSSARntalLayvJAZIgS yx/8HxXQNYRsGaA== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773214560840465348 X-GMAIL-MSGID: 1773214560840465348 smatch reports some uninitialized variables: drivers/media/i2c/ds90ub953.c:655 ub953_log_status() error: uninitialized symbol 'gpio_local_data'. drivers/media/i2c/ds90ub953.c:655 ub953_log_status() error: uninitialized symbol 'gpio_input_ctrl'. drivers/media/i2c/ds90ub953.c:655 ub953_log_status() error: uninitialized symbol 'gpio_pin_sts'. These are used only for printing debug information, and the use of an uninitialized variable only happens if an i2c transaction has failed, which will print an error. Thus, fix the errors just by initializing the variables to 0. Fixes: 6363db1c9d45 ("media: i2c: add DS90UB953 driver") Reported-by: Hans Verkuil Closes: https://lore.kernel.org/all/8d6daeb1-b62a-bbb2-b840-8759c84f2085@xs4all.nl/ Signed-off-by: Tomi Valkeinen --- drivers/media/i2c/ds90ub953.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/i2c/ds90ub953.c b/drivers/media/i2c/ds90ub953.c index cadf75eb0773..27471249a62a 100644 --- a/drivers/media/i2c/ds90ub953.c +++ b/drivers/media/i2c/ds90ub953.c @@ -593,9 +593,9 @@ static int ub953_log_status(struct v4l2_subdev *sd) u8 v = 0, v1 = 0, v2 = 0; unsigned int i; char id[UB953_REG_FPD3_RX_ID_LEN]; - u8 gpio_local_data; - u8 gpio_input_ctrl; - u8 gpio_pin_sts; + u8 gpio_local_data = 0; + u8 gpio_input_ctrl = 0; + u8 gpio_pin_sts = 0; for (i = 0; i < sizeof(id); i++) ub953_read(priv, UB953_REG_FPD3_RX_ID(i), &id[i]); From patchwork Thu Aug 3 12:15:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 130570 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f41:0:b0:3e4:2afc:c1 with SMTP id v1csp1128145vqx; Thu, 3 Aug 2023 05:59:42 -0700 (PDT) X-Google-Smtp-Source: APBJJlFtEU5GIc1dz5e2iCpSKcir7dmeTqRLN5VXecGQxqL3ujMFVjy6zB9hOPKRY0usq17eAF+c X-Received: by 2002:a17:907:97d5:b0:992:13c7:560 with SMTP id js21-20020a17090797d500b0099213c70560mr9233283ejc.38.1691067581726; Thu, 03 Aug 2023 05:59:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691067581; cv=none; d=google.com; s=arc-20160816; b=q64/0ptrFp2+C/rO6KBIdtXH8tSdLMvwWmNfhZbPADWhMMH/8vYFMeGISGIReOlHLJ U8q8rijdI7yf2lJ6poWNoyS4T4Lmqfyveqg9BrMgsqF/h6Oe723YuwAVlSsTKVy0Sqn4 eeSvgjiateGhFGmidxDZJNEOvWnFyBfejHkxLGaVJCthqR/Z2TJSer6l7jF5x7SGunbe oMHEhU/sOJXcFN5otnhhy17s8Woqd9OVpuidwCRWqORrmRaTLtBG033O7nZmcM+ru7Oy XaYbbYtVV/0QqrQJkFO+YHwA1LKjgiB4pjK5+J/lk2MncaNjSixD38rDGutvl/ivtUmc eH0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=3JHocNfFIvImhguOggnzRsvrPhHlenPNGYaxVMeN9Po=; fh=OqXResVBGmKVif32WrPB9+w/XjWhGxZKnootS83aEBI=; b=Nc+d/n3WUbQHshQ+xzSVCvSyT9s9corYnH2lkxYa5ebBmfA7VwtiklQJbW52WQxA3k MF3KWb2pgpYqtzqK6o+VZ5t9uZqfJiZbvvLQe7/UsFcFe5PMe5SIjbl9Vf8A8zlhnxmv u3TLdJPR/4YFntAqmkSnToB+30sVDbO2SHI/I6NXKY0blaxOI5+AFuXERTTGO5gH3BOH Yh8N43uaqn33W5RcRGIefwBSf/Oiw3K4wOu80tiXXNZqPjton2lLBGmBgVyj8Og4kE1P BUOOH6HZpKvfbkjoZARKfUIq49IwRHCXHKYhDoTnNJbLVrnfOqdZGt5+N4e6tvVH8FbC 0Uww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=pDakRJGS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a24-20020a170906245800b0099367350a83si11549268ejb.898.2023.08.03.05.59.17; Thu, 03 Aug 2023 05:59:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=pDakRJGS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235868AbjHCMQb (ORCPT + 99 others); Thu, 3 Aug 2023 08:16:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235863AbjHCMQ1 (ORCPT ); Thu, 3 Aug 2023 08:16:27 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2CF5B1; Thu, 3 Aug 2023 05:16:25 -0700 (PDT) Received: from [127.0.1.1] (91-154-35-171.elisa-laajakaista.fi [91.154.35.171]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 06090EEA; Thu, 3 Aug 2023 14:15:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1691064918; bh=X/zAB0Jj0qtm9fUujGG3j4YnlOSerudhleIY+ZFE7Pk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=pDakRJGS/sF3EpPJcPIuJYXGMRiWHbk47Puxtkb+cID4P0jbPwXt+fCWVbVM99tDd zrcb22Zcbs+nG8/mXPTqdZIksgQswYnA1o6yP3mB2EYFcvqsL7tNF5bIt30Dyu2T3O afAsozyQqTDxm5oQniH+C0rxCdRjOLlES7PuwntM= From: Tomi Valkeinen Date: Thu, 03 Aug 2023 15:15:47 +0300 Subject: [PATCH v2 3/3] media: i2c: ds90ub960: Fix PLL config for 1200 MHz CSI rate MIME-Version: 1.0 Message-Id: <20230803-ub9xx-uninit-vars-v2-3-512570ecb798@ideasonboard.com> References: <20230803-ub9xx-uninit-vars-v2-0-512570ecb798@ideasonboard.com> In-Reply-To: <20230803-ub9xx-uninit-vars-v2-0-512570ecb798@ideasonboard.com> To: Mauro Carvalho Chehab , Laurent Pinchart , Sakari Ailus , Andy Shevchenko , Hans Verkuil Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Tomi Valkeinen X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=958; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=X/zAB0Jj0qtm9fUujGG3j4YnlOSerudhleIY+ZFE7Pk=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBky5qTlwogM7bSwQkRLy7uH14HFuTygXBUZ/UFm RoihrGzwX+JAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCZMuakwAKCRD6PaqMvJYe 9WjID/sEMMwT0p0hDZLH8aL8mh3obRi+owyf43NC174eD0THUq+pyJoTCff0+maEGVri/JvL+EA V3NfvuysUJnQ9hbw/iNVqrEAcoRH9nbfePhp919njbqbYOEb5hTN3BdrFPpWvuOsxBdM6e/ub3J o/kSPmhgBAv7aS+CnxUHq3gkVBgVXrVasIhrq7VugEBbmZosK1iAvkaRixzSVbjsvqkA0lI8+yD BHGasMrR/bZtrk5OEvmNzNPOeNluC4HQxx3bCdKjqZUnYsXb9bZLrP7+C4xmuh+C4kw5Ia3qo2s Dm6MBemKuiDkOCj5bD7yPkKowOQP2eFWjYZfMMb0fFwIk8sVgFh3YKPNWHOvztH97vHjafH721o j5N8b1KW84wyOqTn0LxxueJOlJVIyWsdhkBS+UrMb6D+igCesY0R1CYR6wqI8AaJDuBL/DZHPe8 54X+JVz3D8Vxp0ccGUArl+pHIH/7jbZjET9TOK/2Cd50PGzNNhJ1IvHhzpgh4RQUEoxer8fDxI8 UGhfZQWAU15ryf/qsRFCfqXSj7RV+1TjyEw3DGmZeIcOwLzcPqDxjRNsvq6TAVfSh7i5t0xPh4W Rhsef5JJjz1NyJ8z4IUWXs/qfaJzCuDEPq4ryeN9Rwwxy8UbImfWQKpQhGxMj2vyoLJGU9XkY+Z 6ujGJUociowXRIw== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773212880361207678 X-GMAIL-MSGID: 1773212880361207678 smatch reports: drivers/media/i2c/ds90ub960.c:1788 ub960_init_tx_ports() error: uninitialized symbol 'pll_div'. This is caused by 'pll_div' not being set for 1200 MHz CSI rate. Set the 'pll_div' correctly. Fixes: afe267f2d368 ("media: i2c: add DS90UB960 driver") Reported-by: Hans Verkuil Closes: https://lore.kernel.org/all/8d6daeb1-b62a-bbb2-b840-8759c84f2085@xs4all.nl/ Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- drivers/media/i2c/ds90ub960.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/i2c/ds90ub960.c b/drivers/media/i2c/ds90ub960.c index 4833b39b9178..4ab45e326d80 100644 --- a/drivers/media/i2c/ds90ub960.c +++ b/drivers/media/i2c/ds90ub960.c @@ -1763,6 +1763,7 @@ static int ub960_init_tx_ports(struct ub960_data *priv) break; case MHZ(1200): speed_select = 1; + pll_div = 0x18; break; case MHZ(800): speed_select = 2;