public inbox for linux-clk@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: "Nuno Sá" <nuno.sa@analog.com>
Cc: linux-clk@vger.kernel.org, linux-fpga@vger.kernel.org,
	Stephen Boyd <sboyd@kernel.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Moritz Fischer <mdf@kernel.org>, Wu Hao <hao.wu@intel.com>,
	Xu Yilun <yilun.xu@intel.com>, Tom Rix <trix@redhat.com>
Subject: Re: [PATCH v2 6/6] clk: clk-axi-clkgen: fix coding style issues
Date: Mon, 17 Mar 2025 08:26:50 +0300	[thread overview]
Message-ID: <402a575c-5bfc-4dac-bac6-d7f4e7ee5462@stanley.mountain> (raw)
In-Reply-To: <20250313-dev-axi-clkgen-limits-v2-6-173ae2ad6311@analog.com>

On Thu, Mar 13, 2025 at 03:14:48PM +0000, Nuno Sá wrote:
> @@ -224,8 +226,8 @@ static void axi_clkgen_calc_clk_params(unsigned int divider,
>  
>  		if (params->edge == 0 || frac_divider == 1)
>  			params->low--;
> -		if (((params->edge == 0) ^ (frac_divider == 1)) ||
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

> -			(divider == 2 && frac_divider == 1))
> +		if ((params->edge == 0 ^ frac_divider == 1) ||
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This works, but the code was a lot easier to read with parentheses.

regards,
dan carpenter


  parent reply	other threads:[~2025-03-17  5:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-13 15:14 [PATCH v2 0/6] clk: clk-axi-clkgen: improvements and some fixes Nuno Sá via B4 Relay
2025-03-13 15:14 ` [PATCH v2 1/6] clk: clk-axi-clkgen: fix fpfd_max frequency for zynq Nuno Sá via B4 Relay
2025-03-13 15:14 ` [PATCH v2 2/6] clk: clk-axi-clkgen: make sure to include mod_devicetable.h Nuno Sá via B4 Relay
2025-03-13 15:14 ` [PATCH v2 3/6] include: fpga: adi-axi-common: add new helper macros Nuno Sá via B4 Relay
2025-03-13 15:14 ` [PATCH v2 4/6] clk: clk-axi-clkgen: detect axi_clkgen_limits at runtime Nuno Sá via B4 Relay
2025-03-13 15:14 ` [PATCH v2 5/6] clk: clk-axi-clkgen move to min/max() Nuno Sá via B4 Relay
2025-03-13 15:14 ` [PATCH v2 6/6] clk: clk-axi-clkgen: fix coding style issues Nuno Sá via B4 Relay
2025-03-14  9:23   ` kernel test robot
2025-03-17  5:26   ` Dan Carpenter [this message]
2025-03-17 16:47     ` Nuno Sá

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=402a575c-5bfc-4dac-bac6-d7f4e7ee5462@stanley.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=hao.wu@intel.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-fpga@vger.kernel.org \
    --cc=mdf@kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=nuno.sa@analog.com \
    --cc=sboyd@kernel.org \
    --cc=trix@redhat.com \
    --cc=yilun.xu@intel.com \
    /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