Linux kernel staging patches
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: "Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-media@vger.kernel.org, devicetree@vger.kernel.org,
	linux-staging@lists.linux.dev, linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH v2 2/2] media: staging: max96712: Add support for MAX96724
Date: Tue, 27 Aug 2024 21:21:25 +0300	[thread overview]
Message-ID: <44676cc2-a9e0-45b9-b08b-5280e8aa7a06@stanley.mountain> (raw)
In-Reply-To: <20240827131841.629920-3-niklas.soderlund+renesas@ragnatech.se>

On Tue, Aug 27, 2024 at 03:18:41PM +0200, Niklas Söderlund wrote:
> @@ -181,7 +186,8 @@ static void max96712_pattern_enable(struct max96712_priv *priv, bool enable)
>  	}
>  
>  	/* PCLK 75MHz. */
> -	max96712_write(priv, 0x0009, 0x01);
> +	if (!priv->max96724)
> +		max96712_write(priv, 0x0009, 0x01);
>  

I don't like this either.  The comment should move.  I didn't see the ! the
first couple times I read this.  I don't like the MAX96712_ID and
MAX96724_ID defines because when humans read they only see the general shape of
the words.

https://www.dictionary.com/e/typoglycemia/
https://en.wikipedia.org/wiki/Hamming_distance

I guess the best we can do is remove the _ID so at least the last characters are
different.

It should be something like:

	if (priv->id == MAX96712) {
		/* PCLK 75MHz. */
		max96712_write(priv, 0x0009, 0x01);
	}

Or maybe put in function.

regards,
dan carpenter


  parent reply	other threads:[~2024-08-27 18:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-27 13:18 [PATCH v2 0/2] media: staging: max96712: Add support for MAX96724 Niklas Söderlund
2024-08-27 13:18 ` [PATCH v2 1/2] dt-bindings: i2c: maxim,max96712: Add compatible " Niklas Söderlund
2024-08-27 14:53   ` Krzysztof Kozlowski
2024-08-27 18:03     ` Niklas Söderlund
2024-08-28  5:45       ` Krzysztof Kozlowski
2024-08-27 13:18 ` [PATCH v2 2/2] media: staging: max96712: Add support " Niklas Söderlund
2024-08-27 13:32   ` Sakari Ailus
2024-08-27 17:57     ` Niklas Söderlund
2024-08-27 21:00       ` Sakari Ailus
2024-08-27 13:55   ` Tommaso Merciai
2024-08-28 10:02     ` Julien Massot
2024-09-04 12:45       ` Tommaso Merciai
2024-08-27 18:21   ` Dan Carpenter [this message]
2024-08-28  5:51   ` Biju Das
2024-08-28  9:41   ` Julien Massot
2024-08-28 10:00     ` Niklas Söderlund

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44676cc2-a9e0-45b9-b08b-5280e8aa7a06@stanley.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=mchehab@kernel.org \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox