Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp1507545rdb; Mon, 8 Jan 2024 01:02:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IHeggVacP6FW37Jw+7DJdt6mvTOZYM9P40sQeeaAWVW4xXF87UmUeAkgmly4Tx73cqpFfq0 X-Received: by 2002:a17:90b:1d8a:b0:286:7f0d:6254 with SMTP id pf10-20020a17090b1d8a00b002867f0d6254mr790127pjb.63.1704704526257; Mon, 08 Jan 2024 01:02:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704704526; cv=none; d=google.com; s=arc-20160816; b=OCzdwjOCvcFgfgzgBALE2FNcc1s2FUEdaZYRW0joH010chAeAlwncD4DnyFqh6y6uq DqmyymJeIkjzVb0HioA1HMzT+ce/5sWMsx5inFARvExZ+3DV3/Ss7ehuwfN2r/gFB0c0 1uC/pN4JYYgdMjKTYNnxbyLtgHiqfLD/ag9FlgDZOCiowtdCSAGoK3N5sOKdk5+mnRsg wIhb1XHYmTM/D9a0d3t3vMY+RbFO+Ku5W6+luWaHZ5ZeReBDopbtEeqRixEc0JusJb+C BHVvKWMZzLTJd2B/XD5muONE4keWchJMlTiucbeiJGHbvJUzux31kqlarrU0dkeNL+Tw eK6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=uLKSp2t/4jlTaSawgtobZEwXikdvFECQfWkXy/RAs5Q=; fh=ZHslOcO0cI6WphvWcYH0Za05xuMxzS1TqqIsBK0UVO4=; b=QuYa5apWPPuA9aYeUJSmdhQ090VsUOry3/orNyOAaPswRsEAF8O3TAT95CHLNKMPem noi/mzC0BxWlsqRD7gJiAF1aiBGv4db//WVbVtPUH8qRcS3M996moTpWoJn+uHjbv601 3K42S5/KGISihCiiYRpcBMTc9OBJHzIpmyI1ZgRJlwWqu+Rd5jxuXzh6zcH6e+urmURx g3n3uauQlZF2UCX0KEriKOWR7E3mDJ/lDaAY9xgboS5QBpaviFbt9zc7U5Qt1yZk6Sku BhH3RsKGiwTunkndyS9Os3/Edu9Z1KfMgZxuns2ckPAaHB7lTfaAVMQ8UEVSgzNafdZu N2+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=KFmQqo3U; spf=pass (google.com: domain of linux-kernel+bounces-19225-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19225-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id y14-20020a17090a8b0e00b0028bf7ab5a92si5440051pjn.147.2024.01.08.01.02.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 01:02:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-19225-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=KFmQqo3U; spf=pass (google.com: domain of linux-kernel+bounces-19225-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19225-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 90F35282BDF for ; Mon, 8 Jan 2024 09:00:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6F8EFD510; Mon, 8 Jan 2024 08:59:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="KFmQqo3U" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 38F3B11707; Mon, 8 Jan 2024 08:59:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1704704384; x=1736240384; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=UD2WeMpSp+j8qkJF1AjMx4z2wT9q6XOgcAc12cmsxlA=; b=KFmQqo3UaFKU/fX0cImq56tIS6+8JYxaV5gvw59xQPKDBTVZkRqhEy7C SkSZnz7GDwuKa0iKLquku50arfZi/TWxceA59LcHARBmGSsLSnEvH7m2+ E8xZbi/artwnum8U2C4dG8SGELQEapMzKFhNd2Ou6uYsvHM/iVI1hyyzl TU4b9DQdfFrznTvZu++JHhPUXTz97pceLg+hWXt0xdSnNn/O6qBWjTVcR iZs46QW0i/RR7XXD4LI57Kd/Ho/YnJgf7uJjidoZwiKDYDV3W49/80tRE gPVxwNkUzyWv4fU8BCh8u/BJ3UTB0O0ZxexJkah/+rmg+yVYLe8h/mKow A==; X-IronPort-AV: E=McAfee;i="6600,9927,10946"; a="16427111" X-IronPort-AV: E=Sophos;i="6.04,340,1695711600"; d="scan'208";a="16427111" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jan 2024 00:59:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10946"; a="871816985" X-IronPort-AV: E=Sophos;i="6.04,340,1695711600"; d="scan'208";a="871816985" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jan 2024 00:59:40 -0800 Received: from kekkonen.localdomain (localhost [127.0.0.1]) by kekkonen.fi.intel.com (Postfix) with SMTP id 7623E11F8DE; Mon, 8 Jan 2024 10:59:37 +0200 (EET) Date: Mon, 8 Jan 2024 08:59:37 +0000 From: Sakari Ailus To: Dan Carpenter Cc: Hidenori Kobayashi , Bingbu Cao , Tianshu Qiu , Mauro Carvalho Chehab , Greg Kroah-Hartman , linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] media: staging: ipu3-imgu: Set fields before media_entity_pads_init() Message-ID: References: <20231228093926.748001-1-hidenorik@chromium.org> <27f1c487-78cc-4e56-ba79-1434aba131fd@moroto.mountain> <20240105021856.wpzmwtyzxzqfznrp@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Hi Dan, Hidenori, On Fri, Jan 05, 2024 at 10:34:20AM +0300, Dan Carpenter wrote: > On Fri, Jan 05, 2024 at 11:19:23AM +0900, Hidenori Kobayashi wrote: > > On Thu, Jan 04, 2024 at 01:04:27PM +0300, Dan Carpenter wrote: > > > On Thu, Dec 28, 2023 at 06:39:25PM +0900, Hidenori Kobayashi wrote: > > > > The pad's flags is checked in media_entity_pads_init(), so it has to be > > > > initialized beforehand. The ops initialization is also moved together > > > > for readability. > > > > > > > > > > How does this bug look like to a user? What is the Fixes tag? Does > > > this need to be backported to stable? > > > > I suppose I should have included those in the commit message. > > > > 1) To a user, the imgu driver fails to probe with the following message: > > > > [ 14.596315] ipu3-imgu 0000:00:05.0: failed initialize subdev media entity (-22) > > [ 14.596322] ipu3-imgu 0000:00:05.0: failed to register subdev0 ret (-22) > > [ 14.596327] ipu3-imgu 0000:00:05.0: failed to register pipes (-22) > > [ 14.596331] ipu3-imgu 0000:00:05.0: failed to create V4L2 devices (-22) > > > > Yeah. This is super useful information. > > > 2) Re Fixes tag, I see that the first commit of imgu driver already > > initializes the flags after media_entity_pads_init(). The documentation > > of this API ( "Drivers must set the direction of every pad ... before > > calling media_entity_pads_init") predates the first commit. So, I guess > > > > Fixes: a0ca1627b450 ("media: staging/intel-ipu3: Add v4l2 driver based on media framework") > > > > 3) Re stable, I was not sure. The probe failure only appears after a > > check was added by Commit deb866f9e3a45ae058b21765feeffae6aea6a193. That > > check is not in linux-6.6.y branch. So I was not sure if this counts as > > "a real bug that bothers people" mentioned in the document. > > Hm... I don't know either. Wait for a day and see if anyone else has > an opinion then listen to your gut and resend with whatever your gut > says? The suggested commit message seems good to me, the Fixes: line is important. Thanks for digging this up! The patch should go to v6.7, too, so please add Cc: stable (for v6.7). -- Kind regards, Sakari Ailus