Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp8003093rwp; Wed, 19 Jul 2023 03:56:17 -0700 (PDT) X-Google-Smtp-Source: APBJJlE3cQNDuznjzJHiiR9vvO/3/cnhWdXvOk/R7kB5WEzDVaGsAm88kqMYkFetOP44ZhzgY24j X-Received: by 2002:a17:906:8a5c:b0:965:9602:1f07 with SMTP id gx28-20020a1709068a5c00b0096596021f07mr1923274ejc.39.1689764177540; Wed, 19 Jul 2023 03:56:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689764177; cv=none; d=google.com; s=arc-20160816; b=eUbpHa7Fnz75pf6HqqRvMK33agd/Pur1IYhTmtvJEH02kKJU0Rv6BtCDVKf9KK8NgP EUIGomAlUtQ7CFN0JlJDXMfeZ6+jbJpsDUARda9jjD7ttV+4Tg4zYM9lXw6/opTvI+se ay4eUMIyoRliBwfMzkpjAZfkk/hlZj1wgMr3VqR8OWUDP1ke2DN5wyMSGMRVExNhV30h +Chyv2YT5J/ps/7Jnkp8n1o8gSECJy8ks0XWJ9X7MT4wb/IkzaxbByn0u+so+43RBBkq VRY0TscZL5CNhU7RuhzMk04Q9yqgUq6YQRO653ORmweqvvZy0UbLQzKaLKJf1dLRH3MG YiZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=n1lbOXanic4cpJ2nG8RVA/9xi4FHVktpJ1KzEpctfbw=; fh=olfNxmcd9EVaPm9J+MhQva/w+VyVM6ZrgWZYSmMHw78=; b=Z11HFHlM6uECmTifxfZdoA0Bm9c2YjRR/h8aTV6uTsCvq9WU7txPV2/cyhG7kFBm3c 1YgTUOya593XFYZJbi4xpdw4NiLfpfBzma475gkN82Rjl0o46hS+FgGhsG6Xdpy4RI8Y H71f5Zv2FwdYtc2dTn4Iir5TdKVttXG9+GresatXEfpb4ZiZex3YUIYGKE7Mr7IQ4YP1 fkPD9ZWWYfPSiE6Q1//UZ7n1PNMJW04ItBpVVlA7486p/DfBIaxS+YjGiM5BPH1fCmj6 47S8cs4nW2HHvgBCzpvhmqcWXMxR8cnjyOoa/MjwTBEfb83e/wF8FSupcnNhUILHaqyy YVcw== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qc4-20020a170906d8a400b00993664a998esi2644955ejb.918.2023.07.19.03.55.53; Wed, 19 Jul 2023 03:56:17 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229471AbjGSK2R (ORCPT + 99 others); Wed, 19 Jul 2023 06:28:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231337AbjGSK1j (ORCPT ); Wed, 19 Jul 2023 06:27:39 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DD9A2690; Wed, 19 Jul 2023 03:26:49 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3FA6460DFA; Wed, 19 Jul 2023 10:26:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4DF1FC433C8; Wed, 19 Jul 2023 10:26:39 +0000 (UTC) Message-ID: Date: Wed, 19 Jul 2023 12:26:37 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH 1/2] media: i2c: st_mipid02: cascade s_stream call to the source subdev Content-Language: en-US To: Alain Volmat , Benjamin Mugnier , Sylvain Petinot , Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230711123211.794838-1-alain.volmat@foss.st.com> <20230711123211.794838-2-alain.volmat@foss.st.com> From: Hans Verkuil In-Reply-To: <20230711123211.794838-2-alain.volmat@foss.st.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,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 On 11/07/2023 14:32, Alain Volmat wrote: > Cascade the s_stream call to the source subdev whenever the bridge > streaming is enable / disabled. > > Signed-off-by: Alain Volmat > --- > drivers/media/i2c/st-mipid02.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/drivers/media/i2c/st-mipid02.c b/drivers/media/i2c/st-mipid02.c > index 906553a28676..703d2f06f552 100644 > --- a/drivers/media/i2c/st-mipid02.c > +++ b/drivers/media/i2c/st-mipid02.c > @@ -547,6 +547,13 @@ static int mipid02_stream_disable(struct mipid02_dev *bridge) > struct i2c_client *client = bridge->i2c_client; > int ret; > > + if (!bridge->s_subdev) > + goto error; I'm getting this compiler warning: media-git/drivers/media/i2c/st-mipid02.c: In function 'mipid02_stream_disable': media-git/drivers/media/i2c/st-mipid02.c:568:12: warning: 'ret' may be used uninitialized [-Wmaybe-uninitialized] 568 | if (ret) | ^ media-git/drivers/media/i2c/st-mipid02.c:548:13: note: 'ret' was declared here 548 | int ret; | ^~~ I'm dropping this series, waiting for a v2. Regards, Hans > + > + ret = v4l2_subdev_call(bridge->s_subdev, video, s_stream, 0); > + if (ret) > + goto error; > + > /* Disable all lanes */ > ret = mipid02_write_reg(bridge, MIPID02_CLK_LANE_REG1, 0); > if (ret) > @@ -633,6 +640,10 @@ static int mipid02_stream_enable(struct mipid02_dev *bridge) > if (ret) > goto error; > > + ret = v4l2_subdev_call(bridge->s_subdev, video, s_stream, 1); > + if (ret) > + goto error; > + > return 0; > > error: