From mboxrd@z Thu Jan 1 00:00:00 1970 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 D5D50EB64D9 for ; Mon, 19 Jun 2023 08:53:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230099AbjFSIxu (ORCPT ); Mon, 19 Jun 2023 04:53:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230392AbjFSIx1 (ORCPT ); Mon, 19 Jun 2023 04:53:27 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A35C72D5F; Mon, 19 Jun 2023 01:52:25 -0700 (PDT) Received: from [192.168.88.20] (91-154-35-171.elisa-laajakaista.fi [91.154.35.171]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id A4BA2547; Mon, 19 Jun 2023 10:51:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1687164710; bh=B00zRuFkwkcFL8RsmEawKa5iBKl4WJesv+28pc/wdYk=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=jaP57+xXVeWhodB/lrjQGKEzTI8MoWVBb9yCIpIMUnS2RqPs3OoJk5GHvK/JPAqc0 UVA/arS/Lhdil2A59pODyshl6qRXo9zeWmrxAlMZPBOJFAuanISqbpLN06svvfMCqI KJZdN7BpVrYtqbjgn0IYUT5/XafDWr0QdHXv+nq4= Message-ID: <78fdbb28-4133-0165-69ff-a0e568cd84fe@ideasonboard.com> Date: Mon, 19 Jun 2023 11:52:19 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v14 13/18] media: i2c: ds90ub953: Use v4l2_fwnode_endpoint_parse() Content-Language: en-US To: Andy Shevchenko Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, Luca Ceresoli , Matti Vaittinen , Laurent Pinchart , Sakari Ailus , Wolfram Sang , Rob Herring , Krzysztof Kozlowski , Mauro Carvalho Chehab , Peter Rosin , Liam Girdwood , Mark Brown , Michael Tretter , Hans Verkuil , Mike Pagano , =?UTF-8?Q?Krzysztof_Ha=c5=82asa?= , Marek Vasut , Satish Nagireddy References: <20230616135922.442979-1-tomi.valkeinen@ideasonboard.com> <20230616135922.442979-14-tomi.valkeinen@ideasonboard.com> From: Tomi Valkeinen In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16/06/2023 17:24, Andy Shevchenko wrote: > On Fri, Jun 16, 2023 at 04:59:17PM +0300, Tomi Valkeinen wrote: >> Use v4l2_fwnode_endpoint_parse() to parse the sink endpoint parameters. > >> + nlanes = vep.bus.mipi_csi2.num_data_lanes; >> > > I would also drop this blank line now. Ok. >> - if (ret != 1 && ret != 2 && ret != 4) >> + if (nlanes != 1 && nlanes != 2 && nlanes != 4) > > Isn't the following cleaner? > > if (!is_power_of_2(nlanes) || nlanes > 4) No, I don't think so... The current one is more human-readable. >> return dev_err_probe(dev, -EINVAL, >> - "bad number of data-lanes: %d\n", ret); >> + "bad number of data-lanes: %d\n", nlanes); > Tomi