Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1750746pxy; Thu, 29 Apr 2021 13:45:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGYx3wBhOhOyjR69tY3+t/aVbFEIc4H78aKGunWsWevLYc5Uq5H/OGUxH/DOCQiErE3rNi X-Received: by 2002:aa7:d14a:: with SMTP id r10mr1745683edo.385.1619729137753; Thu, 29 Apr 2021 13:45:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619729137; cv=none; d=google.com; s=arc-20160816; b=x80jjYxdqWlWnkgd8hiQvzOzTNDEj854RU/rA2LzLgbdpDXoLam/Fzwhvv8dh8EnYn c4sqQ9ybH5XTJUY3EvdU9ESPNUZO46/qV5OGt8UdXuVVFV6pj7KFV1lAGvangTTr0Bvs 8/ZT73+hb2hPk1tdvHhX1T41opmmU74ldQYUizLQxEDI2rZpC0gQANKe/IMKZCcSDD8Y PcaUWkyEB8NUlUDuLChyl89WgPrhn5bH29/T2Hze2b+109gCRfjZ6r1gQar8VKuHxR2G j84Mkz9N06qBbxnE3tUWJ0RDUWeO342VlY6aj5+9uPyPsb0mPgnruddNdXnG6ug27ba1 3FTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=ko6SwsR0FiW/vV2HmXntKcAMz9yyp6u5LRV0HH/QDXQ=; b=iXoMH7fjcr368V3GhoW0kfPSLR0mrydbRbNcLqGt0Yqs6+p/6aR7XJcg8DD4oO256r 82YmpNhY2STga2kPUpIoxhWlMXwSmuFLT6r0fWxmESMeMST75WM8p69s2xmlyCKpbIYp x23F0hU2pIiqW5ux8ZK8VLBVOeO90hvzGqkcTUb4nCQP4uTovO/hMLSNxh258qX2IXOK Ssd1WfrE6+cIof8ZFuZeK053kT65WyajCR0uX5xXV9q/a7XPvQetYzBtp7yuCBvP0Ka1 Mm0IbSI+9axsUZjtIEOL8SDsSEWZ4B7NfxYMjFNl2phKmUhgDkXpRFMdFgYPfM0V6Hic 7GGw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dc15si1107569ejb.162.2021.04.29.13.45.14; Thu, 29 Apr 2021 13:45:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236734AbhD2UPO (ORCPT + 99 others); Thu, 29 Apr 2021 16:15:14 -0400 Received: from jabberwock.ucw.cz ([46.255.230.98]:52752 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229882AbhD2UPC (ORCPT ); Thu, 29 Apr 2021 16:15:02 -0400 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 0F42A1C0B9F; Thu, 29 Apr 2021 22:14:15 +0200 (CEST) Date: Thu, 29 Apr 2021 22:14:14 +0200 From: Pavel Machek To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, Aditya Pakki , Hans Verkuil , Mauro Carvalho Chehab Subject: Re: [PATCH 056/190] Revert "media: davinci/vpfe_capture.c: Avoid BUG_ON for register failure" Message-ID: <20210429201414.GF31692@amd> References: <20210421130105.1226686-1-gregkh@linuxfoundation.org> <20210421130105.1226686-57-gregkh@linuxfoundation.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GV0iVqYguTV4Q9ER" Content-Disposition: inline In-Reply-To: <20210421130105.1226686-57-gregkh@linuxfoundation.org> User-Agent: Mutt/1.5.23 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --GV0iVqYguTV4Q9ER Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! This is no big deal either way, and I doubt it is malicious. It will only hit during development. Returning error is more in line with linux style. I'd suggest keeping it. Best regards, Pavel ci/vpfe_capture.c > index f9f7dd17c57c..bcedaf4523e0 100644 > --- a/drivers/media/platform/davinci/vpfe_capture.c > +++ b/drivers/media/platform/davinci/vpfe_capture.c > @@ -168,22 +168,21 @@ int vpfe_register_ccdc_device(const struct ccdc_hw_= device *dev) > int ret =3D 0; > printk(KERN_NOTICE "vpfe_register_ccdc_device: %s\n", dev->name); > =20 > - if (!dev->hw_ops.open || > - !dev->hw_ops.enable || > - !dev->hw_ops.set_hw_if_params || > - !dev->hw_ops.configure || > - !dev->hw_ops.set_buftype || > - !dev->hw_ops.get_buftype || > - !dev->hw_ops.enum_pix || > - !dev->hw_ops.set_frame_format || > - !dev->hw_ops.get_frame_format || > - !dev->hw_ops.get_pixel_format || > - !dev->hw_ops.set_pixel_format || > - !dev->hw_ops.set_image_window || > - !dev->hw_ops.get_image_window || > - !dev->hw_ops.get_line_length || > - !dev->hw_ops.getfid) > - return -EINVAL; > + BUG_ON(!dev->hw_ops.open); > + BUG_ON(!dev->hw_ops.enable); > + BUG_ON(!dev->hw_ops.set_hw_if_params); > + BUG_ON(!dev->hw_ops.configure); > + BUG_ON(!dev->hw_ops.set_buftype); > + BUG_ON(!dev->hw_ops.get_buftype); > + BUG_ON(!dev->hw_ops.enum_pix); > + BUG_ON(!dev->hw_ops.set_frame_format); > + BUG_ON(!dev->hw_ops.get_frame_format); > + BUG_ON(!dev->hw_ops.get_pixel_format); > + BUG_ON(!dev->hw_ops.set_pixel_format); > + BUG_ON(!dev->hw_ops.set_image_window); > + BUG_ON(!dev->hw_ops.get_image_window); > + BUG_ON(!dev->hw_ops.get_line_length); > + BUG_ON(!dev->hw_ops.getfid); > =20 > mutex_lock(&ccdc_lock); > if (!ccdc_cfg) { --=20 http://www.livejournal.com/~pavelmachek --GV0iVqYguTV4Q9ER Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAmCLE5YACgkQMOfwapXb+vK09gCgwLgfxuQdLSOaLuAryHEGjRKd XbgAoI0Umku13n4WbQwhlJN09qyflshv =4wPh -----END PGP SIGNATURE----- --GV0iVqYguTV4Q9ER--